i want to modify the makefile, im working in a project to adapt the FreeRTOS. one of requiriments is compile the freertos in C++. Im 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 :)
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. Regards.
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 );"
Change ( const tipoCHAR * const ) "IDLE" to ( const signed tipoCHAR* const ) "IDLE" Take a look at the prototype for xTaskCreate and you will see that it used "signed" before the char.
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.