Problems with Free RTOS

Dec 28, 2006 3 Replies

Hi verybody, I'm trying to compile FreeRTOS for PIC18F devices using SDCC but with n success. I'm testing a simple example I got from somewhere. The cod 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 signe portCHAR * const pcName, unsigned portSHORT usStackDepth, voi



*pvParameters, unsigned portBASE_TYPE uxPriority, xTaskHandl
*
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 doe nothing. What is wrong here? Why are they incompatible? If I make this in the main code before calling the funcion to create task: pdTASK_CODE ptr; ptr = vTestTask; I get no errors at that point, but if I use ptr as first parameter to th function I get the same error as before. I do not understand anything... Thanks in advance

jelomer a écrit :

This is not a definition but a declaration.

Try to define the task as:

static void vTestTask( void *pvParameters ){} // Dummy task which does nothing.

In article , jelomer writes

Have you thought about asking for support on the FrreRTOS and SDCC web sites?

\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\ \/\/\/\/\ Chris Hills Staffs England /\/\/\/\/ /\/\/ chris@phaedsys.org www.phaedsys.org \/\/\ \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/

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.

  • formatting link
  • formatting link
    for Cortex-M3, ARM7, ARM9, HCS12, H8S, MSP430 Microblaze, Coldfire, AVR, x86, 8051, PIC24 & dsPIC

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required