Undefined referenced to `_vTaskDelay’

Hi, I am making a proyect using FreeRTOS with PIC24F, I already included all the Rtos’ source files and the compiler doesn’t have errors, but when I build the proyect this errors appears: build/XC1624FJ256GA110/production/main.o(.text+0xa): In function .LSM2': : undefined reference tovTaskDelay’ Please if you know how solve this problem help me Thanks

Undefined referenced to `_vTaskDelay’

Is INCLUDE_vTaskDelay set to 1 in FreeRTOSConfig.h?

Undefined referenced to `_vTaskDelay’

yes it is, I have #define INCLUDE_vTaskDelay 1

Undefined referenced to `_vTaskDelay’

Are you including FreeRTOS.h and task.h at the top of the file? Can you please show the code snippet that calls vTaskDelay().

Undefined referenced to `_vTaskDelay’

yes I am including FreeRTOS.h, task.h, queue.h and croutine.h, there is the code that calls vTaskDelay() void TOGGLELED(int x); void TareaLED0(void *pvParameters){ for(;;) { TOGGLE_LED(0); vTaskDelay (500 / portTICK_RATE_MS); } vTaskDelete(NULL); } if I comment vTaskDelay( 500/ portTICKRATEMS), the proyect build OK, but I need use vTaskDelay.

Undefined referenced to `_vTaskDelay’

In which case, if INCLUDE_vTaskDelay is really set to 1, I have no idea what the problem could be. Have your FreeRTOS source files been modified in any way? Can you verify that tasks.c contains vTaskDelay() and there there are no other per-processor definitions that are stopping it from being built?

Undefined referenced to `_vTaskDelay’

I have XC16 as compiler, are there any problem with this compiler?

Undefined referenced to `_vTaskDelay’

I wouldn’t know that, but would assume not.

Undefined referenced to `_vTaskDelay’

Post the full build output.

Undefined referenced to `_vTaskDelay’

As a test, could you make the following change to task.c ? ~~~~ +/* Start of insertion. / + #if ( INCLUDE_vTaskDelayUntil == 1 ) + #warning vTaskDelayUntil should get compiled + #else + #warning vTaskDelayUntil will not get compiled + #elif +/ End of insertion. */ + #if ( INCLUDE_vTaskDelayUntil == 1 )
 void vTaskDelayUntil( TickType_t * const pxPreviousWakeTime, const TickType_t xTimeIncrement )
 {
~~~~ ( the lines marked with a + are to be added ) My guess would be that you have multiple versions of FreeRTOSConfig.h on your disk and that the compiler see the wrong one. Check your include -I paths. You can also test this by adding a line in your FreeRTOSConfig.h file: ~~~~ #warning This FreeRTOSConfig is included ! ~~~~ The compiler should issue a warning there.