Quality RTOS & Embedded Software

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


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 ]    [ Privacy ]    [ Sitemap ]    [ ]


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

Latest News

NXP tweet showing LPC5500 (ARMv8-M Cortex-M33) running FreeRTOS.

Meet Richard Barry and learn about running FreeRTOS on RISC-V at FOSDEM 2019

Version 10.1.1 of the FreeRTOS kernel is available for immediate download. MIT licensed.

View a recording of the "OTA Update Security and Reliability" webinar, presented by TI and AWS.


Careers

FreeRTOS and other embedded software careers at AWS.



FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Espressif ESP32

IAR Partner

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Renesas

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

Xilinx Microblaze and Zynq partner