This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

LAUNCHXL2-RM57L: FreeRTOS/POSIX build errors

Part Number: LAUNCHXL2-RM57L

Hello,

I added FreeRTOS+POSIX to my already working GCC + FreeRTOS project. I am using CCS version 7.4.0.00015. After adding all dependencies I got compiler errors saying that the following types were redefined in POSIX types.h/time.h and compiler types.h: 

I added -iquote"${workspace_loc:/${ProjName}/include/FreeRTOS_POSIX}" to the compiler flags to make sure that the correct sys/types.h was included at the POSIX and library files. With this, every time "sys/types.h" is included with quotes the POSIX file will be used and every time <sys/types.h> is included with angle brackets the compiler library file will be used. However that did not fix the problem.

After analyzing the intermediate files from running the preprocessor only (-E) I was able to find out that almost all of the FreeRTOS+POSIX headers (time.h, pthread.h etc.) include both sys/types.h files and therefore they break. They do not include them explicitly but when going down the include chain they eventually get included. I had FreeRTOS+POSIX running on another project with the TI compiler and it was working as expected. However, I did not see a sys/types.h file in the TI compiler library files. The problem showed up when I migrated to GCC.

Can anyone please provide guidance on how can I resolve this issue? I don't want to make a hacky fix that will end up breaking something else.

Thanks,

Surialic