Quality RTOS & Embedded Software

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


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"

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) 2004-2010 Richard Barry. Copyright (C) 2010-2016 Real Time Engineers Ltd.
Any and all data, files, source code, html content and documentation included in the FreeRTOSTM distribution or available on this site are the exclusive property of Real Time Engineers Ltd.. See the files license.txt (included in the distribution) and this copyright notice for more information. FreeRTOSTM and FreeRTOS.orgTM are trade marks of Real Time Engineers Ltd.

Latest News:

FreeRTOS V9.0.0 is now available for download.

Free TCP/IP and file system demos for the RTOS

Sponsored Links

⇓ Now With No Code Size Limit! ⇓
⇑ Free Download Without Registering ⇑

FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Renesas Electronics Gold Alliance RTOS Partner.jpg

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Atmel RTOS partner supporting ARM Cortex-M3 and AVR32 microcontrollers

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

Xilinx Microblaze and Zynq partner

Silicon Labs low power RTOS partner

Altera RTOS partner for Nios II and Cortex-A9 SoC

Freescale Alliance RTOS Member supporting ARM and ColdFire microcontrollers

Infineon ARM Cortex-M microcontrollers

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

Cypress RTOS partner supporting ARM Cortex-M3

Fujitsu RTOS partner supporting ARM Cortex-M3 and FM3

Microsemi (previously Actel) RTOS partner supporting ARM Cortex-M3

Atollic Partner

IAR Partner

Keil ARM Partner

Embedded Artists