This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

FreeRTOS error with portmacro.h - __forceinline

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!

Parents
  • 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.....

Reply
  • 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.....

Children