CMake how-to

Test Description:

Run an helloworld on FC and print the current stack usage at the point of Hello

Few command examples for:

  • gap9_v2

  • freertos

Generate build files (Ninja generator is optional - requires installation of ninja-build package):

# without cluster:
CMAKE_GENERATOR=Ninja cmake -S . -B build

Build

# Optional: configure the build (io, platform etc)
cmake --build build --target menuconfig
# Build the actual binary
cmake --build build

Run

# Without traces
cmake --build build --target run
# with fc traces (for other traces, read gvsoc documentation)
runner_args="--trace=fc/insn"  cmake --build build --target run

Cleanup

rm -rf build