Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem TCP & FAT




Loading

Undefined referenced to `_vTaskDelay'

Posted by fabiolo93 on February 9, 2017

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/XC16_24FJ256GA110/production/main.o(.text+0xa): In function .LSM2': : undefined reference to_vTaskDelay'

Please if you know how solve this problem help me Thanks


Undefined referenced to `_vTaskDelay'

Posted by rtel on February 9, 2017

Is INCLUDE_vTaskDelay set to 1 in FreeRTOSConfig.h?


Undefined referenced to `_vTaskDelay'

Posted by fabiolo93 on February 9, 2017

yes it is, I have #define INCLUDE_vTaskDelay 1


Undefined referenced to `_vTaskDelay'

Posted by rtel on February 9, 2017

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'

Posted by fabiolo93 on February 9, 2017

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(;;) { TOGGLELED(0); vTaskDelay (500 / portTICKRATE_MS); } vTaskDelete(NULL); }

if I comment vTaskDelay( 500/ portTICKRATEMS), the proyect build OK, but I need use vTaskDelay.


Undefined referenced to `_vTaskDelay'

Posted by rtel on February 9, 2017

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'

Posted by fabiolo93 on February 9, 2017

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


Undefined referenced to `_vTaskDelay'

Posted by rtel on February 9, 2017

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


Undefined referenced to `_vTaskDelay'

Posted by rs9562 on February 9, 2017

Post the full build output.


Undefined referenced to `_vTaskDelay'

Posted by heinbali01 on February 10, 2017

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.


[ Back to the top ]    [ About FreeRTOS ]    [ Sitemap ]    [ ]




Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.

Latest News

FreeRTOS kernel V10 is available for immediate download. Now MIT licensed.


FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

IAR Partner

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

STMicro RTOS partner supporting ARM7, ARM Cortex-M3, ARM Cortex-M4 and ARM Cortex-M0

Texas Instruments MCU Developer Network RTOS partner for ARM and MSP430 microcontrollers

OpenRTOS and SafeRTOS