FreeRTOS Support Archive
The FreeRTOS support forum is used to obtain active support directly from Real
Time Engineers Ltd. In return for using our top quality software and services for
free, we request you play fair and do your bit to help others too! Sign up
to receive notifications of new support topics then help where you can.
This is a read only archive of threads posted to the FreeRTOS support forum.
The archive is updated every week, so will not always contain the very latest posts.
Use these archive pages to search previous posts. Use the Live FreeRTOS Forum
link to reply to a post, or start a new support thread.
[FreeRTOS Home] [Live FreeRTOS Forum] [FAQ] [Archive Top] [September 2006 Threads] compiling errorPosted by Nobody/Anonymous on September 18, 2006 Hi All, I just started with FreeRTOS. please may someone tell me why i receive "error(128):Function argument incomplatible with its declaretion " when compiling this:
int main(void) { /* Create the sample tasks. */ xTaskCreate( Task1, "Task1", configMINIMAL_STACK_SIZE, (void *)10, tskIDLE_PRIORITY + 1, NULL);
vTaskStartScheduler();
return 0; }
void Task1( void *pvParameters ) { int x = (int)pvParameters;
for( ;; ) { // Task code goes here. }
}
RE: compiling errorPosted by Nobody/Anonymous on September 18, 2006 Assuming the error is for the xTaskCreate() call - have you a prototype for the function Task1 before main()?
RE: compiling errorPosted by Nobody/Anonymous on September 18, 2006 Thank you for you response, Yes, the prototype is on "task.h", included just above main. The error refers to the pcName argument.
signed portBASE_TYPE xTaskCreate( pdTASK_CODE pvTaskCode, const signed portCHAR * const pcName, //const portCHAR * const pcName, unsigned portSHORT usStackDepth, void *pvParameters, unsigned portBASE_TYPE uxPriority, xTaskHandle *pvCreatedTask );
Israel
RE: compiling errorPosted by Nobody/Anonymous on September 18, 2006 Not sure if we are talking at cross purposes here. I was referring to a prototype for Task1 function, not the inclusion of task.h. It seems this is not the problem anyway if the error is on the pcName parameter.
You could try casting it to const * const.
Which compiler for which chip are you using? Some compilers default char * to signed char *, and some to unsigned char * which is why FreeRTOS has to cast everything explicitly to remove the warnings.
RE: compiling errorPosted by Nobody/Anonymous on September 18, 2006 I'm trying to port to an old z80 board wit a IAR compiler, and this is the definition of types on portmacro.h
/* Type definitions. */ #define portCHARchar #define portFLOATfloat #define portDOUBLEdouble #define portLONGlong #define portSHORTshort #define portSTACK_TYPEunsigned int #define portBASE_TYPEint
RE: compiling errorPosted by Nobody/Anonymous on September 18, 2006 I'll study the compiler manual and see if i can find something related to this.
Thank you
Israel
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|