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




Loading

The execution enter prvTaskExitError method

Posted by valeriv on December 20, 2016

Hi all. The target run on STM32F439NI, in IAR environment Something happened to the code (earlier it worked).

So, I create several tasks in the main function and after this call to vTaskStartScheduler(), there call to xPortStartScheduler() and there call to vPortStartFirstTask() in file portasm.s. After this, code try to jump to first task's Run method, but I already can see in call stack that execution start from prvTaskExitError method.

I read previous discussions, and checked that I set HALNVICSetPriorityGrouping(NVICPRIORITYGROUP4);

Put attention that it is happen before the first task start run. The execution continue run properly, but call stack start from prvTaskExitError function.

Please, help me understand what happen ?

Thanks a lot

Valerie


The execution enter prvTaskExitError method

Posted by rtel on December 21, 2016

prvTaskExitError() should only ever be entered if an application task attempts to return or exit. Do any of the tasks you created return from their implementing function, ether by executing to the end of the function or by calling return?

If you want an application task to terminate then call vTaskDelete( NULL ).


The execution enter prvTaskExitError method

Posted by valeriv on December 21, 2016

Hi In order to understand the problem clearly I leave the only one task that do nothing and have delay 50 miliseconds inside. So, In IAR tasks plugin I see IDLE task, TmrSvc task and empty task that I created. Now I am sure that there is no task that attempts to return or exit.

Do you know another reason of entering prvTaskExitError() ?


The execution enter prvTaskExitError method

Posted by valeriv on December 21, 2016

Hi In order to understand the problem clearly I leave the only one task that do nothing and have delay 50 miliseconds inside. So, In IAR tasks plugin I see IDLE task, TmrSvc task and empty task that I created. Now I am sure that there is no task that attempts to return or exit.

Do you know another reason of entering prvTaskExitError() ?


The execution enter prvTaskExitError method

Posted by valeriv on December 22, 2016

Hi I think I understand now. The execution doesn't enter the function prvTaskExitError. I only see in call stack that execution starts from it. And now I think that it is right situation, It is kind of protection in case task will return from the it's implementing function.

So, Is it OK, that call stack begin from prvTaskExitError method ?

Thanks a lot for your time and consideration.

Valerie


The execution enter prvTaskExitError method

Posted by rtel on December 22, 2016
Yes, it is expected that that is at the top of the stack frame as that is the function the task will return to if it attempts to return from it's implementing function.



The execution enter prvTaskExitError method

Posted by valeriv on December 27, 2016

Thank you


[ 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