I just started with FreeRTOS.
please may someone tell me why i receive "error(128):Function argument incomplatible with its declaretion " when compiling this:
/* Create the sample tasks. */
xTaskCreate( Task1, "Task1", configMINIMAL_STACK_SIZE, (void *)10, tskIDLE_PRIORITY + 1, NULL);
void Task1( void *pvParameters )
int x = (int)pvParameters;
for( ;; )
// Task code goes here.
Assuming the error is for the xTaskCreate() call – have you a prototype for the function Task1 before main()?
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(
const signed portCHAR * const pcName,
//const portCHAR * const pcName,
unsigned portSHORT usStackDepth,
unsigned portBASE_TYPE uxPriority,
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.
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 portCHAR char
#define portFLOAT float
#define portDOUBLE double
#define portLONG long
#define portSHORT short
#define portSTACK_TYPE unsigned int
#define portBASE_TYPE int
I’ll study the compiler manual and see if i can find something related to this.
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.