[PIC32] undefined reference to `vTaskDelay'

nordiste wrote on Thursday, October 14, 2010:

i have a big problem with a file who contain this function :

void demon_heure(void *ptr)

in unique file, c32 return me error :
Heure.c:16: undefined reference to `vTaskDelay’

in main file, all is OK.

the include section  of all theses files are :

#include "recepteur.h"
#include "string.h"
#include "stdlib.h"
#include "FSIO.h"
#include "ImageDecoder.h"

in recepteur.h :

#include "FreeRTOSConfig.h"
#include "FreeRTOS.h"
#include "task.h"

what is the problem ???

nordiste wrote on Thursday, October 14, 2010:

all is ok,
in main file, i put theses lines under while(1) function,
c32 does not compile code after this function.
my problem is a mismatch config.

davedoors wrote on Friday, October 15, 2010:

To use vTaskDelay you need to have

#include "FreeRTOS.h"
#include "task.h"

You do not need to include FreeRTOSConfig.h because it is included inside FreeRTOS.h.