X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=FreeRTOS%2FSource%2Fportable%2FIAR%2FARM_CM0%2Fport.c;h=c1fa1370963c58dc1073617b8f50dc2477500b0d;hb=0885fb373227e2e4d9a9a72820f660b9ffdc67af;hp=fc8c546de7f243c826f12ee3956db23a16804a9f;hpb=617d46d8432c30e925e24d1687d310be7aa39f6c;p=freertos diff --git a/FreeRTOS/Source/portable/IAR/ARM_CM0/port.c b/FreeRTOS/Source/portable/IAR/ARM_CM0/port.c index fc8c546de..c1fa13709 100644 --- a/FreeRTOS/Source/portable/IAR/ARM_CM0/port.c +++ b/FreeRTOS/Source/portable/IAR/ARM_CM0/port.c @@ -1,5 +1,5 @@ /* - FreeRTOS V7.5.3 - Copyright (C) 2013 Real Time Engineers Ltd. + FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. All rights reserved VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. @@ -145,13 +145,13 @@ portSTACK_TYPE *pxPortInitialiseStack( portSTACK_TYPE *pxTopOfStack, pdTASK_CODE 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 + 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 + + 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(); + portDISABLE_INTERRUPTS(); for( ;; ); } /*-----------------------------------------------------------*/ @@ -182,8 +182,9 @@ portBASE_TYPE xPortStartScheduler( void ) void vPortEndScheduler( void ) { - /* It is unlikely that the CM0 port will require this function as there - is nothing to return to. */ + /* Not implemented in ports where there is nothing to return to. + Artificially force an assert. */ + configASSERT( uxCriticalNesting == 1000UL ); } /*-----------------------------------------------------------*/ @@ -210,6 +211,7 @@ void vPortEnterCritical( void ) void vPortExitCritical( void ) { + configASSERT( uxCriticalNesting ); uxCriticalNesting--; if( uxCriticalNesting == 0 ) {