Skip to content

Latest commit

 

History

History
56 lines (43 loc) · 1.61 KB

README-BUILD2.md

File metadata and controls

56 lines (43 loc) · 1.61 KB

CHERIoT RTOS build2 support prototype

Note: you will need to use the latest staged build2 version until 0.17.0 is released.

Building the example in source (add -v to see the compilation/linking command lines, configuration report, etc):

$ cd cheriot-rtos/examples/01.hello_world
$ b config.cxx=/cheriot-tools/bin/clang++ \
    config.cheriot_rtos.board=ibex-safe-simulator

To configure the example (so that we don't have to repeat config.*):

$ b configure \
    config.cxx=/cheriot-tools/bin/clang++ \
    config.cheriot_rtos.board=ibex-safe-simulator
$ b

To build a user project (that will presumably not be inside cheriot-rtos/):

$ cp -r cheriot-rtos/examples/01.hello_world user-project
$ cd user-project
$ b config.cxx=/cheriot-tools/bin/clang++ \
    config.import.cheriot_rtos=../cheriot-rtos \
    config.cheriot_rtos.board=ibex-safe-simulator

To configure an out of source build of the user project (can have multiple out of source builds, for example, for different boards, different cheriot-rtos and/or cheriot-tools versions):

$ b configure: ./@../user-project-build-ibex/ \
    config.cxx=/cheriot-tools/bin/clang++ \
    config.import.cheriot_rtos=../cheriot-rtos \
    config.cheriot_rtos.board=ibex-safe-simulator

$ b ../user-project-build-ibex/

To configure the source directory to forward to one of the out of source builds (so can build it form the source directory):

$ b configure: ./@../user-project-build-ibex/,forward
$ b

See b(1) for details on the command line syntax.