FreeRTOS / FreeRTOS-Kernel

FreeRTOS kernel files only, submoduled into https://github.com/FreeRTOS/FreeRTOS and various other repos.
https://www.FreeRTOS.org
MIT License
2.66k stars 1.1k forks source link

[BUG] Build With CMake and GCC as static library #646

Closed 0x7a657573 closed 1 year ago

0x7a657573 commented 1 year ago

Describe the bug I tried to add FreeRTOS on my CMake Project but in compile time I get some error like this:

[build] ../system/FreeRTOS/portable/GCC/ARM_CM3/portmacro.h:135:51: error: unknown type name 'inline' [build] attribute( ( always_inline ) ) static inline uint8_t ucPortCountLeadingZeros( uint32_t ulBitmap )

I think this error happen because in the FreeRTOS, CMakelists.txt at line 296 say to compiler use C90 standard. set_property(TARGET freertos_kernel PROPERTY C_STANDARD 90) when I change this line to use GNU99 standard, error is gone !

Target

Host

RichardBarry commented 1 year ago

Grateful if you can create a support thread on this at https://forums.freertos.org until we determine the route cause as the kernel should build with C90, and GCC is happy with "inline". Thanks.

0x7a657573 commented 1 year ago

I posted my Issue to forums.freertos.org