i am running freertos with 3 tasks on msp430 initially and now i ported the code to stm32l152cb(stm32l152xb family) but here the execution ends in prvTaskExitError(void) how to solve this problem , the function definition is
static void prvTaskExitError( void )
{
/* A function that implements a task must not exit or attempt to return to
its caller as there is nothing to return to. If a task wants to exit it
should instead call vTaskDelete( NULL ).
Artificially force an assert() to be triggered if configASSERT() is
defined, then stop here so application writers can catch the error. */
configASSERT( uxCriticalNesting == ~0UL );
portDISABLE_INTERRUPTS();
for( ;; );
}
Does this mean that my tasks exit in between by returning some value.one of the tasks handles usart interrupts and other tasks resolve them. please throw some light on this
As you are using an STM32 make sure you call have configASSERT() defined and that you call NVIC_PriorityGroupConfig( NVIC_PriorityGroup_4 ). See: http://www.freertos.org/RTOS-Cortex-M3-M4.html
yes i am using NVIC_PriorityGroupConfig( NVIC_PriorityGroup_4 ).
you mean #define configASSERT( x ) in FreeRTOS.h file? i didnt get it , where can i find some example of such assertion function.
thanks for reply
The easiest way to cause your program to halt when assert is called is to just add the following line to FreeRTOSConfig.h
#define configASSERT( x ) if( x == 0 ) { taskDISABLE_INTERRUPTS(); for(;;); }
The traditional way of defining assert() is to pass the file name and line number into a function, in which case you would define as follows in FreeRTOSConfig.h: