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] [February 2017 Threads] 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.
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|