Quality RTOS & Embedded Software

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


using FreeRTOS with C++ help me

Posted by Nobody/Anonymous on July 22, 2005
i want to modify the makefile, i´m working in a project to adapt the FreeRTOS. one of requiriments is compile the freertos in C++. I´m using the snytax "msp430-gcc -x c++ -Os -mmcu=msp430x169........". i do this adaptation on makefile but i cant compile the files .c. the answer of the compiler is "invalid conversion from 'const char* ' to const signed char*". this error apper in file tasks.c e main.c.

my question is:
is possible to have some incompatibility of FreeRTOS with C++? or can I be making something wrong?

thanks :)

RE: using FreeRTOS with C++ help me

Posted by Richard on July 22, 2005
The source code is compiled with a lot of different compilers - each of which generate warnings for slightly different conditions. The code contains a lot of casting to attempt to enable it to be compiled with all compilers without generating any warnings. [sometimes a cast required to compile with one compiler, causes another to complain]

One area where embedded compilers differ is in their representation of vanilla char types. Some have them signed, some unsigned. For this reason in the code char types should always be qualified with either signed or unsigned to force one or other to be used in all cases, no matter which compiler is utalized. It is possible that in some cases the qualifier has been missed - which is fine for C but may cause C++ to complain.

It should be a simple case of matching up the casting to enable the code to be compiled. Can you tell me which line the error comes on - then I should be able to tell you had to solve it.


RE: using FreeRTOS with C++ help me

Posted by Nobody/Anonymous on July 22, 2005
in the file main.c the error comes on call to xTaskCreate,
in the file tasks.c the error comes on line 863
"xReturn = xTaskCreate( prvIdleTask, ( const tipoCHAR * const ) "IDLE", tskIDLE_STACK_SIZE, ( void * ) NULL, tskIDLE_PRIORITY, ( xTaskHandle * ) NULL );"

RE: using FreeRTOS with C++ help me

Posted by Richard on July 22, 2005
( const tipoCHAR * const ) "IDLE"


( const signed tipoCHAR* const ) "IDLE"

Take a look at the prototype for xTaskCreate and you will see that it used "signed" before the char.

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

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

Latest News

Version 10.1.0 of the FreeRTOS kernel is available for immediate download. MIT licensed.

View a recording of the "OTA Update Security and Reliability" webinar, presented by TI and AWS.


FreeRTOS and other embedded software careers at AWS.

FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Espressif ESP32

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

Xilinx Microblaze and Zynq partner