Merge pull request #912 from t-8ch/improved-debugging
Improve debugging
This commit is contained in:
@@ -132,12 +132,9 @@ OPTIM=-Os -flto -finline-small-functions -findirect-inlining -fdiagnostics-color
|
|||||||
# global defines ---------------------------------------------------------------
|
# global defines ---------------------------------------------------------------
|
||||||
GLOBAL_DEFINES += $(DEV_GLOBAL_DEFS) -D USE_RTOS_SYSTICK -D MODEL_$(model) -D VECT_TAB_OFFSET=$(bootldr_size)U
|
GLOBAL_DEFINES += $(DEV_GLOBAL_DEFS) -D USE_RTOS_SYSTICK -D MODEL_$(model) -D VECT_TAB_OFFSET=$(bootldr_size)U
|
||||||
|
|
||||||
# Without debug code
|
DEBUG=-g3
|
||||||
DEBUG=
|
|
||||||
ifdef swd_enable
|
ifdef swd_enable
|
||||||
GLOBAL_DEFINES += -DSWD_ENABLE
|
GLOBAL_DEFINES += -DSWD_ENABLE
|
||||||
# Enable debug code generation
|
|
||||||
DEBUG=-g
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -378,6 +378,13 @@ PRIVILEGED_DATA static UBaseType_t uxTaskNumber = ( UBaseType_t ) 0U;
|
|||||||
PRIVILEGED_DATA static volatile TickType_t xNextTaskUnblockTime = ( TickType_t ) 0U; /* Initialised to portMAX_DELAY before the scheduler starts. */
|
PRIVILEGED_DATA static volatile TickType_t xNextTaskUnblockTime = ( TickType_t ) 0U; /* Initialised to portMAX_DELAY before the scheduler starts. */
|
||||||
PRIVILEGED_DATA static TaskHandle_t xIdleTaskHandle = NULL; /*< Holds the handle of the idle task. The idle task is created automatically when the scheduler is started. */
|
PRIVILEGED_DATA static TaskHandle_t xIdleTaskHandle = NULL; /*< Holds the handle of the idle task. The idle task is created automatically when the scheduler is started. */
|
||||||
|
|
||||||
|
/* Improve support for OpenOCD. The kernel tracks Ready tasks via priority lists.
|
||||||
|
* For tracking the state of remote threads, OpenOCD uses uxTopUsedPriority
|
||||||
|
* to determine the number of priority lists to read back from the remote target. */
|
||||||
|
const volatile UBaseType_t uxTopUsedPriority = configMAX_PRIORITIES - 1U;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* Context switches are held pending while the scheduler is suspended. Also,
|
/* Context switches are held pending while the scheduler is suspended. Also,
|
||||||
interrupts must not manipulate the xStateListItem of a TCB, or any of the
|
interrupts must not manipulate the xStateListItem of a TCB, or any of the
|
||||||
lists the xStateListItem can be referenced from, if the scheduler is suspended.
|
lists the xStateListItem can be referenced from, if the scheduler is suspended.
|
||||||
@@ -2093,6 +2100,10 @@ BaseType_t xReturn;
|
|||||||
/* Prevent compiler warnings if INCLUDE_xTaskGetIdleTaskHandle is set to 0,
|
/* Prevent compiler warnings if INCLUDE_xTaskGetIdleTaskHandle is set to 0,
|
||||||
meaning xIdleTaskHandle is not used anywhere else. */
|
meaning xIdleTaskHandle is not used anywhere else. */
|
||||||
( void ) xIdleTaskHandle;
|
( void ) xIdleTaskHandle;
|
||||||
|
|
||||||
|
/* OpenOCD makes use of uxTopUsedPriority for thread debugging. Prevent uxTopUsedPriority
|
||||||
|
* from getting optimized out as it is no longer used by the kernel. */
|
||||||
|
( void ) uxTopUsedPriority;
|
||||||
}
|
}
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user