src/FreeRTOS/tasks.c:1011: error 47: indirections to different types assignment
from type ‘struct TaskControlBlock_t generic* fixed’
to type ‘struct TaskControlBlock_t generic* int fixed’
src/FreeRTOS/tasks.c:1954: error 78: incompatible types
from type ‘struct TaskControlBlock_t generic* near* fixed’
to type ‘struct TaskControlBlock_t generic* int generic* const fixed’
In the last release (10.0.1) these types were void *. In the head
revision of SVN they are no longer void * but ‘type safe’ - each type is
different. Are you using the latest release (downloaded as a zip or exe
file) or checking the files out of SVN?
Hmm, the version in SVN has been tested with several compilers with no
issues. Could this be an issue with SDCC? I last attempted to use
typesafe handles some years back and had to back out the changes due to
a debugger issue. I believe the code is all perfectly valid C, and
quite old C too, nothing that relies on a later version of the standard.
I changed to version 10.0.0 today but I’m still getting these errors.
So I tried different Versions of SDCC. Last week I had Vesion 3.5.0 from Ubuntu Repository installed.
Version 3.6.0 and 3.7.0 gives me additional errors:
src/FreeRTOS/tasks.c:558: error 226: no type specifier for ‘prvInitialiseNewTask parameter 6’
src/FreeRTOS/tasks.c:738: error 226: no type specifier for ‘xTaskCreate parameter 6’
src/FreeRTOS/tasks.c:831: error 226: no type specifier for ‘prvInitialiseNewTask parameter 6’
parameter 6 is always “TaskHandle_t * const pxCreatedTask”
I tried to analyse the TaskHandle_t structure and TCB_t structure but they seem to be equal as far as I can see. I guess I have to see how SDCC interprets them.
SDCC is the only one I have used - but it was a VERY long time ago, so
no doubt an obsolete version of the compiler. V10.0.0 is very well
exercised with many compilers, and uses the void* handles instead of the
typesafe handles.
SDCC seems to by complaning about the “const” if I change “TaskHandle_t * const pxCreatedTask” to “TaskHandle_t * pxCreatedTask” for each funktion i get over this point.
Why did you define it as const, since it gets set during the Initialization ?