Build Error for FreeRTOS demo in CCS 7.3, compiler TI 16.9.6.LTS – sprintf() – task.c – MSP430X – Launchpad MSP430FR5969

Build Error for FreeRTOS demo in CCS 7.3, compiler TI 16.9.6.LTS – sprintf() – MSP430X – Launchpad MSP430FR5969 Hi FreeRTOS experts, I am running Win7 (64-bit) with CCS 7.3, compiler TI 16.9.6.LTS. For my TI Launchpad MSP430FR5969 I downloaded the CCS/IAR version of the FreeRTOS (v.9.0.0) demo and imported it as described on the project page: http://www.freertos.org/MSP430FR5969FreeRTOS_Demo.html. However, when building the project I encounter 5 error messages for task.c related to conversions and modifiers, namely:
  • 2631 Conversion u not allowed in printfsupport=minimal mode tasks.c /RTOSDemo/FreeRTOSSource line 4018, 4114, 4130 C/C++ Problem
  • 2632 Modifiers are not allowed in printfsupport=minimal mode tasks.c /RTOSDemo/FreeRTOSSource line 4114, 4130 C/C++ Problem.
Affected lines in task.c are 4018, 4114, 4130. I tried to run it with different TI compiler versions: problem still persists. The GCC compiler results in over 100 errors. I tried also full printf() support with no change. Any help would be appreciated. Thank you! P.S.: Changing #define mainCREATESIMPLEBLINKYDEMOONLY 1 (or 0) did not affect the issue since it relates to task.c. Ideas-moose

Build Error for FreeRTOS demo in CCS 7.3, compiler TI 16.9.6.LTS – sprintf() – task.c – MSP430X – Launchpad MSP430FR5969

Looks like an incompatibility with the compiler’s standard C library. You could change the definition of portLUPRINTFSPECIFIERREQUIRED to see if that helps (it switches the format specifiers as they are non standard), or include the small printf-stdarg.c file in your build (there are lots of copies in the FreeRTOS download), or edit the source code so it works with your printf version, or, if you are not using the vTaskGetRunTimeStats() function – simply set configUSESTATSFORMATTINGFUNCTIONS to 0 in FreeRTOSConfig.h. The function in question is just a ‘helper’ function, not part of the FreeRTOS kernel.

Build Error for FreeRTOS demo in CCS 7.3, compiler TI 16.9.6.LTS – sprintf() – task.c – MSP430X – Launchpad MSP430FR5969

set configUSESTATSFORMATTING_FUNCTIONS to 0 in FreeRTOSConfig.h
This step works well for the blinky demo and the code compiles. For the detailed demo it does not since appears to be called vTaskGetRunTimeStats(). For now I can get started without this function. Nevertheless, I tried to follow your other two routes. I was unable to make them work.
  • When including printf-stdarg.c in main.c CSS returns errors as printf() is redefined. What is necessary to remove the clash?
  • Where can I define portLUPRINTFSPECIFIERREQUIRED appropriately? Is it a simple boolean (0,1) or is a function required? I can only find a reference in a if statement of tasks.c. When placed as #define portLUPRINTFSPECIFIERREQUIRED 1 (or 0) in main.c it does not compile when vTaskGetRunTimeStats() is called.
I appreciate your help! Thanks!

Build Error for FreeRTOS demo in CCS 7.3, compiler TI 16.9.6.LTS – sprintf() – task.c – MSP430X – Launchpad MSP430FR5969

is redefined. What is necessary to remove the clash?
Remove the other definition.
/ Where can I define portLUPRINTFSPECIFIER_REQUIRED appropriately?
FreeRTOSConfig.h would probably work.
Is it a simple boolean (0,1) or is a function required?
Have a look at how it is used in the code, you referenced the line number in your first post. I can only find a
reference in a if statement of tasks.c. When placed as #define portLUPRINTFSPECIFIER_REQUIRED 1 (or 0) in main.c
That is because it is a pre-processor macro that must be defined in a header file that is included in tasks.c. As before per last reply, your first post highlighted the lines of code that use the macro, so you can see how it is used.