CMake support

Robin Müller robin.mueller.m at gmail.com
Wed Dec 9 12:50:13 UTC 2020


Hello,

I was wondering whether CMake support or an example is available or will be
added in the future. We are using a framework which has different
abstraction layers for OSes like (embedded) Linux, RTEMS and FreeRTOS, but
we would like to use the same build system to build applications and right
now CMake is our favourite because other tools like the Catch2 test
framework are also built with CMake and there is a lot more documentation
available for CMake.

I set up a blinky example for a STM32 Nucleo board and had a look at the
raw commands used to build the application and I have not seen anything
special that requires waf explicitly.

I was hoping that I could also build the same application with CMake, eg.
with the following command sequence (with RTEMS_INST being the location
where RTEMS was installed)

mkdir build
cd build
cmake .. -D -DOS_FSFW=rtems -DRTEMS_INST=$RTEMS_INST
cmake --build .

I also had another question about a specific flag used when linking RTEMS
executables.
The link command for the example application is the following:

arm-rtems6-gcc -mthumb -mcpu=cortex-m7 -mfpu=fpv5-d16 -mfloat-abi=hard
-I=$RTEMS_INST/arm-rtems6/stm32h7/lib/include -MMD
-B$RTEMS_INST/arm-rtems6/stm32h7/lib -Wl,--gc-sections init.c.1.o led.c.1.o
stm32h7xx_nucleo.c.1.o -o blinky-test.elf -Wl,-Bstatic -Wl,-Bdynamic -qrtems

Can anyone tell me the meaning of the -q flag? I did not find anything by
running arm-rtems6-gcc --help

Kind Regards
Robin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20201209/f7397377/attachment.html>


More information about the devel mailing list