Hi verybody, I'm trying to compile FreeRTOS for PIC18F devices using SDCC but with no success. I'm testing a simple example I got from somewhere. The code mainly does nothig but when compiling I get this error: main.c:43: error 78: incompatible types from type 'void generic* ' to type 'void generic* generic* ' The error refers to the first parameter in this function: xTaskCreate( vTestTask, "Hello", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY + 1, NULL ); This function is defined: signed portBASE_TYPE xTaskCreate( pdTASK_CODE pvTaskCode, const signed portCHAR * const pcName, unsigned portSHORT usStackDepth, void *pvParameters, unsigned portBASE_TYPE uxPriority, xTaskHandle *pxCreatedTask ); // Defined in task.h and pdTASK_CODE is defined as: typedef void (*pdTASK_CODE)( void * ); // Defined in projdefs.h My task is defined as: static void vTestTask( void *pvParameters ); // Dummy task which does nothing. What is wrong here? Why are they incompatible? If I make this in the main code before calling the funcion to create a task: pdTASK_CODE ptr; ptr = vTestTask; I get no errors at that point, but if I use ptr as first parameter to the function I get the same error as before. I do not understand anything... Thanks in advance
Problems with Free RTOS
Started by ●December 28, 2006
Reply by ●December 28, 20062006-12-28
jelomer a �crit :> Hi verybody, > I'm trying to compile FreeRTOS for PIC18F devices using SDCC but with no > success. I'm testing a simple example I got from somewhere. The code > mainly does nothig but when compiling I get this error: > > main.c:43: error 78: incompatible types > from type 'void generic* ' > to type 'void generic* generic* ' > > The error refers to the first parameter in this function: > > xTaskCreate( vTestTask, "Hello", configMINIMAL_STACK_SIZE, NULL, > tskIDLE_PRIORITY + 1, NULL ); > > This function is defined: > > signed portBASE_TYPE xTaskCreate( pdTASK_CODE pvTaskCode, const signed > portCHAR * const pcName, unsigned portSHORT usStackDepth, void > *pvParameters, unsigned portBASE_TYPE uxPriority, xTaskHandle > *pxCreatedTask ); // Defined in task.h > > and pdTASK_CODE is defined as: typedef void (*pdTASK_CODE)( void * ); // > Defined in projdefs.h > > My task is defined as: > > static void vTestTask( void *pvParameters ); // Dummy task which does > nothing.This is not a definition but a declaration. Try to define the task as: static void vTestTask( void *pvParameters ){} // Dummy task which does nothing.> > What is wrong here? Why are they incompatible?> > If I make this in the main code before calling the funcion to create a > task: > pdTASK_CODE ptr; > ptr = vTestTask; > > I get no errors at that point, but if I use ptr as first parameter to the > function I get the same error as before. I do not understand anything... > > Thanks in advance > >
Reply by ●December 29, 20062006-12-29
In article <V-adnXf5xdK2Xg7YnZ2dnUVZ_umlnZ2d@giganews.com>, jelomer <jelomer@hotmail.com> writes>Hi verybody, >I'm trying to compile FreeRTOS for PIC18F devices using SDCC but with no >success. I'm testing a simple example I got from somewhere.Have you thought about asking for support on the FrreRTOS and SDCC web sites? -- \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\ \/\/\/\/\ Chris Hills Staffs England /\/\/\/\/ /\/\/ chris@phaedsys.org www.phaedsys.org \/\/\ \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
Reply by ●December 29, 20062006-12-29
> Have you thought about asking for support on the FrreRTOS and SDCC web > sites?Yes - the same question is on the FreeRTOS.org support forum, where I believe it was resolved. PIC18/SDCC/FreeRTOS.org is not an official supported combination, although SDCC on Cygnal 8051 is. Regards, Richard. + http://www.FreeRTOS.org + http://www.SafeRTOS.com for Cortex-M3, ARM7, ARM9, HCS12, H8S, MSP430 Microblaze, Coldfire, AVR, x86, 8051, PIC24 & dsPIC