Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem TCP & FAT




Loading

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

Posted by ideas-moose on November 15, 2017

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

Posted by rtel on November 15, 2017

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

Posted by ideas-moose on November 15, 2017

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

Posted by rtel on November 15, 2017

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.


[ Back to the top ]    [ About FreeRTOS ]    [ Sitemap ]    [ ]




Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.

Latest News

FreeRTOS kernel V10 is available for immediate download. Now MIT licensed.


FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

IAR Partner

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

STMicro RTOS partner supporting ARM7, ARM Cortex-M3, ARM Cortex-M4 and ARM Cortex-M0

Texas Instruments MCU Developer Network RTOS partner for ARM and MSP430 microcontrollers

OpenRTOS and SafeRTOS