include FreeRTOS into IAR

simob47 wrote on Thursday, November 15, 2018:

Hi evryone,

I just migrate from GCC to IAR, how can I integrate FreeRTOS into IAR Embedded Workbench?

Thanks for your answers guys.

rtel wrote on Thursday, November 15, 2018:

Most FreeRTOS files are common to both GCC and IAR, the changes you need
to make are:

Replace FreeRTOS/Source/portable/GCC/[port] with
FreeRTOS/Source/portable/IAR/[port] in your include path.

Remove any source files from the same GCC specific port directory as
above with the source files from the same IAR port directory as above.

Note IAR will also have an assembly file in the port layer, whereas GCC
does not. FreeRTOSConfig.h is included from the assembly file so you
may need to make a few changes in FreeRTOSConfig.h to prevent anything
that is not a pre-processor directive from being included in the asm
file - as including C code in the assembly file will result in build
errors. You can see an example of how to do that by searching for
IAR_SYSTEMS_ASM” in
https://sourceforge.net/p/freertos/code/HEAD/tree/trunk/FreeRTOS/Demo/MSP430X_MSP430FR5969_LaunchPad_IAR_CCS/FreeRTOSConfig.h

simob47 wrote on Friday, November 16, 2018:

thank you for your reply. I will try.

peltier wrote on Saturday, November 17, 2018:

I am using FreeRtos into IAR environment.
I have added the symbol ICCARM in my SDK environment . The SDK sub-menu is:
project properties:
C/C++ Build
ARM Compiler
PreProcessor
If you use C/++ Preprocessor in Assembly files , do the same in sub-menu , ARM Assembler.
A good explanation for the macro GNU ( the same but for gcc)
https://stackoverflow.com/questions/19908922/what-is-this-ifdef-gnuc-about