Ver Fonte

fix:task创建后无法删除

alienwalker há 3 anos atrás
pai
commit
414387d5b5

+ 1 - 1
bsp/air105/include/FreeRTOSConfig.h

@@ -181,7 +181,7 @@ See http://www.FreeRTOS.org/RTOS-Cortex-M3-M4.html. */
 header file. */
 //#define configASSERT( x ) if( ( x ) == 0 ) { taskDISABLE_INTERRUPTS(); for( ;; ); }
 //#if(defined(__DEBUG__) || defined(DEBUG))
-#if 0
+#if 1
 #define configASSERT( x ) if( ( x ) == 0 ) { taskDISABLE_INTERRUPTS(); DBG_Trace("\r\nassert %s,%d", __FUNCTION__, __LINE__); for( ;; ); }
 #else
 #define configASSERT( x )

+ 0 - 1
bsp/common/src/core_task.c

@@ -32,7 +32,6 @@ enum
 typedef struct
 {
 	StaticTask_t TCB;
-	uint8_t dummy[1];	//不加这个就会死机
 	volatile llist_head EventHead;
 #ifdef __USE_CORE_TIMER__
 	Timer_t *EventTimer;

+ 1 - 0
os/FreeRTOS_v10/include/FreeRTOS.h

@@ -1174,6 +1174,7 @@ typedef struct xSTATIC_TCB
     #if ( ( portSTACK_GROWTH > 0 ) || ( configRECORD_STACK_HIGH_ADDRESS == 1 ) )
         void * pxDummy8;
     #endif
+    UBaseType_t     uxSizeOfStack;      /*< Support For CmBacktrace >*/
     #if ( portCRITICAL_NESTING_IN_TCB == 1 )
         UBaseType_t uxDummy9;
     #endif

+ 1 - 3
os/FreeRTOS_v10/src/tasks.c

@@ -266,10 +266,8 @@ typedef struct tskTaskControlBlock       /* The old naming convention is used to
 
     #if ( ( portSTACK_GROWTH > 0 ) || ( configRECORD_STACK_HIGH_ADDRESS == 1 ) )
         StackType_t * pxEndOfStack; /*< Points to the highest valid address for the stack. */
-	#else
-		UBaseType_t     uxSizeOfStack;      /*< Support For CmBacktrace >*/
 	#endif /* ( portSTACK_GROWTH > 0 )*/
-
+    UBaseType_t     uxSizeOfStack;      /*< Support For CmBacktrace >*/
     #if ( portCRITICAL_NESTING_IN_TCB == 1 )
         UBaseType_t uxCriticalNesting; /*< Holds the critical section nesting depth for ports that do not maintain their own count in the port layer. */
     #endif