Quality RTOS & Embedded Software

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




Loading

Type undefined reference to `vTaskDelete'

Posted by mahendra12345 on September 15, 2016

Hello there, I'm using WIN32 simmulator with mingw to learn FreeRTOS. Everything is working greate and I've create project asscodiated with task, queue, semaphore, mutex etc Now the problem is when i wanted to delete perticular task then my compiler shows me message "Type undefined reference to `vTaskDelete'"

I've included all necessary header files but i really don't know whats wrong with it. More ever with eclipse when i click on vTaskDelete() api with ctl pressed then I can see the deleration of the api in** task.**h

Here is my code

~~~

include "FreeRTOS/FreeRTOS.h"
include "task.h"
include "scheduler_task.hpp"
include
include

TaskHandlet TaskHandler1; TaskHandlet TaskHandler2; TaskHandlet TaskHandler3; TaskHandlet TaskHandler4;

void enableFlushAfterPrintf() { setvbuf(stdout, 0, _IONBF, 0); setvbuf(stdin, 0, _IONBF, 0); }

void Task1(void *p){ for(;;){ printf("task 1n"); vTaskDelete(TaskHandler_1); } }

void Task2(void *p){ for(;;){ printf("task 2n"); vTaskDelete(TaskHandler_2); } }

void Task4(void *p){ for(;;){ printf("Tassk4 is Runningn"); vTaskDelete(TaskHandler_4); } }

void Task3(void *p){ for(;;){ printf("task3 is running created task2 and task4n"); xTaskCreate(Task2, "task2", 1024, NULL, 2, &TaskHandler2); xTaskCreate(Task4, "task4", 1024, NULL, 4, &TaskHandler4); printf("task 3 is complated after creating task 2 and 4n"); vTaskDelete(TaskHandler_3); } }

int main(void){ enableFlushAfterPrintf(); xTaskCreate(Task3, "task3", 1024, NULL, 3, &TaskHandler3); xTaskCreate(Task1, "task1", 1024, NULL, 1, &TaskHandler1); vTaskStartScheduler(); }

~~~

can any one help me ?


Type undefined reference to `vTaskDelete'

Posted by davedoors on September 15, 2016

The 'Task' at the start of the function name tells you the function is implemented in tasks.c. A quick search for the function in the file shows it is protected by #if ( INCLUDEvTaskDelete == 1 ). Does your FreeRTOSConfig.h have INCLUDEvTaskDelete set to 1?


Type undefined reference to `vTaskDelete'

Posted by mahendra12345 on September 15, 2016

it was defined as 0 putting 1 solved problem Thanks...


[ 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