Hey Everyone, I am struggling to resolve my issue once I add FreeRTOS to my KEIL project. Before adding it, everything builds ok and runs. I then simply add FreeRTOS (using STM32CubeMX), don't change anything in the Cube and when I try to build, I get about 100 errors. They all seem to be somewhat related to portmacro.h and port.c
The first few errors are:
../Middlewares/Third_Party/FreeRTOS/Source/portable/RVDS/ARM_CM4F\portmacro.h(167): error: unknown type name '__forceinline'
../Middlewares/Third_Party/FreeRTOS/Source/portable/RVDS/ARM_CM4F\portmacro.h(170): error: expected 'volatile', 'inline', 'goto', or '('
Any thoughts would be helpful.....
I am using ARM Compiler 6.19
Language C = c99
MDK uVision = 5.38.0
Thanks!
I went to the link above, but not sure I am following how to build the kernels of FreeRTOS.
Do I build the files from the kernel first and then use STM32CubeMX to create the project or other way around?
How do I rebuild the kernel?
The other option I guess is use ARM Compiler 5, however with the KEIL MDK, seems like the latest version support ARM Compiler 6 out the box and is more of pain to downgrade to ARM Compiler 5. I can also try this.....
You are building, and including the header file, from this directory - which is only correct for ARM compiler 5. https://github.com/FreeRTOS/FreeRTOS-Kernel/tree/main/portable/RVDS/ARM_CM4F
If you want to use ARM compiler 6 then you need to instead build, and include the header file, from this directory github.com/.../ARM_CM4F (i.e. change the include path, remove the C file you are currently building, and instead build the files in the GCC directory)