Quality RTOS & Embedded Software

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


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 ]    [ Sitemap ]    [ ]

Copyright (C) 2004-2010 Richard Barry. Copyright (C) 2010-2016 Real Time Engineers Ltd.
Any and all data, files, source code, html content and documentation included in the FreeRTOSTM distribution or available on this site are the exclusive property of Real Time Engineers Ltd.. See the files license.txt (included in the distribution) and this copyright notice for more information. FreeRTOSTM and FreeRTOS.orgTM are trade marks of Real Time Engineers Ltd.

Latest News:

FreeRTOS V9.0.0 is now available for download.

Free TCP/IP and file system demos for the RTOS

Sponsored Links

⇓ Now With No Code Size Limit! ⇓
⇑ Free Download Without Registering ⇑

FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Renesas Electronics Gold Alliance RTOS Partner.jpg

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Atmel RTOS partner supporting ARM Cortex-M3 and AVR32 microcontrollers

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

Xilinx Microblaze and Zynq partner

Silicon Labs low power RTOS partner

Altera RTOS partner for Nios II and Cortex-A9 SoC

Freescale Alliance RTOS Member supporting ARM and ColdFire microcontrollers

Infineon ARM Cortex-M microcontrollers

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

Cypress RTOS partner supporting ARM Cortex-M3

Fujitsu RTOS partner supporting ARM Cortex-M3 and FM3

Microsemi (previously Actel) RTOS partner supporting ARM Cortex-M3

Atollic Partner

IAR Partner

Keil ARM Partner

Embedded Artists