seL4 / sel4-tutorials

Tutorials for working with seL4 and/or CAmkES.

Home Page:https://docs.sel4.systems/Tutorials

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Generate clean CMake project

iacore opened this issue · comments

Currently, the generate CMake project is incomplete.
simulate.py is located in the build directory, but it is necessary to build the project.

I worked around the issue by appending the following to hello-world/CMakeLists.txt.

set(SEL4_TUTORIALS_DIR ../projects/sel4-tutorials)
set(TUT_BOARD pc)
set(TUT_ARCH x86_64)
set(TUTORIAL_DIR hello-world)

./init --tut hello-world generates a source directory and a build directory:

$ ./init --tut hello-world
<skip a bunch of output>
Tutorials created in subdirectory "hello-world".
Build directory initialised in "hello-world_build".

The build directory is an already initialized build directory that builds a simple seL4 user level defined in the hello-world directory.

We deliberately chose to focus the tutorials on the program code parts of seL4 and they aren't trying to create copy-able directories that have self-contained CMake projects.

This is necessary to support modifying the sources between solutions and different steps in the tutorials:
../init --solution --tut hello-world ../hello-world which updates the generated sources with the solutions added.

Generating a clean CMake project isn't a goal of the tutorials.