Added a "waend" field to the thread structure in RT for debug convenience.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@15817 27425a3e-05d8-49a3-a47f-9c15f0e5edd8
This commit is contained in:
parent
d62102117e
commit
7c9082836b
|
@ -199,6 +199,11 @@ struct ch_thread {
|
||||||
* dynamic threading.
|
* dynamic threading.
|
||||||
*/
|
*/
|
||||||
stkalign_t *wabase;
|
stkalign_t *wabase;
|
||||||
|
/**
|
||||||
|
* @brief Working area end address.
|
||||||
|
* @note It is the 1st address after the working area.
|
||||||
|
*/
|
||||||
|
stkalign_t *waend;
|
||||||
#endif
|
#endif
|
||||||
/**
|
/**
|
||||||
* @brief Current thread state.
|
* @brief Current thread state.
|
||||||
|
|
|
@ -154,6 +154,7 @@ void chInstanceObjectInit(os_instance_t *oip,
|
||||||
|
|
||||||
#if (CH_DBG_ENABLE_STACK_CHECK == TRUE) || (CH_CFG_USE_DYNAMIC == TRUE)
|
#if (CH_DBG_ENABLE_STACK_CHECK == TRUE) || (CH_CFG_USE_DYNAMIC == TRUE)
|
||||||
oip->rlist.current->wabase = oicp->mainthread_base;
|
oip->rlist.current->wabase = oicp->mainthread_base;
|
||||||
|
oip->rlist.current->waend = oicp->mainthread_end;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Setting up the caller as current thread.*/
|
/* Setting up the caller as current thread.*/
|
||||||
|
|
|
@ -57,7 +57,7 @@ static CH_SYS_CORE0_MEMORY THD_WORKING_AREA(ch_c0_idle_thread_wa,
|
||||||
PORT_IDLE_THREAD_STACK_SIZE);
|
PORT_IDLE_THREAD_STACK_SIZE);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if CH_DBG_ENABLE_STACK_CHECK == TRUE
|
#if (CH_DBG_ENABLE_STACK_CHECK == TRUE) || (CH_CFG_USE_DYNAMIC == TRUE)
|
||||||
extern stkalign_t __main_thread_stack_base__, __main_thread_stack_end__;
|
extern stkalign_t __main_thread_stack_base__, __main_thread_stack_end__;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -66,12 +66,9 @@ extern stkalign_t __main_thread_stack_base__, __main_thread_stack_end__;
|
||||||
*/
|
*/
|
||||||
const os_instance_config_t ch_core0_cfg = {
|
const os_instance_config_t ch_core0_cfg = {
|
||||||
.name = "c0",
|
.name = "c0",
|
||||||
#if CH_DBG_ENABLE_STACK_CHECK == TRUE
|
#if (CH_DBG_ENABLE_STACK_CHECK == TRUE) || (CH_CFG_USE_DYNAMIC == TRUE)
|
||||||
.mainthread_base = &__main_thread_stack_base__,
|
.mainthread_base = &__main_thread_stack_base__,
|
||||||
.mainthread_end = &__main_thread_stack_end__,
|
.mainthread_end = &__main_thread_stack_end__,
|
||||||
#elif CH_CFG_USE_DYNAMIC == TRUE
|
|
||||||
.mainthread_base = NULL,
|
|
||||||
.mainthread_end = NULL,
|
|
||||||
#endif
|
#endif
|
||||||
#if CH_CFG_NO_IDLE_THREAD == FALSE
|
#if CH_CFG_NO_IDLE_THREAD == FALSE
|
||||||
.idlethread_base = THD_WORKING_AREA_BASE(ch_c0_idle_thread_wa),
|
.idlethread_base = THD_WORKING_AREA_BASE(ch_c0_idle_thread_wa),
|
||||||
|
@ -102,12 +99,9 @@ extern stkalign_t __c1_main_thread_stack_base__, __c1_main_thread_stack_end__;
|
||||||
*/
|
*/
|
||||||
const os_instance_config_t ch_core1_cfg = {
|
const os_instance_config_t ch_core1_cfg = {
|
||||||
.name = "c1",
|
.name = "c1",
|
||||||
#if CH_DBG_ENABLE_STACK_CHECK == TRUE
|
#if (CH_DBG_ENABLE_STACK_CHECK == TRUE) || (CH_CFG_USE_DYNAMIC == TRUE)
|
||||||
.mainthread_base = &__c1_main_thread_stack_base__,
|
.mainthread_base = &__c1_main_thread_stack_base__,
|
||||||
.mainthread_end = &__c1_main_thread_stack_end__,
|
.mainthread_end = &__c1_main_thread_stack_end__,
|
||||||
#elif CH_CFG_USE_DYNAMIC == TRUE
|
|
||||||
.mainthread_base = NULL,
|
|
||||||
.mainthread_end = NULL,
|
|
||||||
#endif
|
#endif
|
||||||
#if CH_CFG_NO_IDLE_THREAD == FALSE
|
#if CH_CFG_NO_IDLE_THREAD == FALSE
|
||||||
.idlethread_base = THD_WORKING_AREA_BASE(ch_c1_idle_thread_wa),
|
.idlethread_base = THD_WORKING_AREA_BASE(ch_c1_idle_thread_wa),
|
||||||
|
|
|
@ -190,6 +190,7 @@ thread_t *chThdCreateSuspendedI(const thread_descriptor_t *tdp) {
|
||||||
#if (CH_DBG_ENABLE_STACK_CHECK == TRUE) || (CH_CFG_USE_DYNAMIC == TRUE)
|
#if (CH_DBG_ENABLE_STACK_CHECK == TRUE) || (CH_CFG_USE_DYNAMIC == TRUE)
|
||||||
/* Stack boundary.*/
|
/* Stack boundary.*/
|
||||||
tp->wabase = tdp->wbase;
|
tp->wabase = tdp->wbase;
|
||||||
|
tp->waend = tdp->wend;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Setting up the port-dependent part of the working area.*/
|
/* Setting up the port-dependent part of the working area.*/
|
||||||
|
@ -359,6 +360,7 @@ thread_t *chThdCreateStatic(void *wsp, size_t size,
|
||||||
#if (CH_DBG_ENABLE_STACK_CHECK == TRUE) || (CH_CFG_USE_DYNAMIC == TRUE)
|
#if (CH_DBG_ENABLE_STACK_CHECK == TRUE) || (CH_CFG_USE_DYNAMIC == TRUE)
|
||||||
/* Stack boundary.*/
|
/* Stack boundary.*/
|
||||||
tp->wabase = (stkalign_t *)wsp;
|
tp->wabase = (stkalign_t *)wsp;
|
||||||
|
tp->waend = (stkalign_t *)wsp + (size / sizeof (stkalign_t));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Setting up the port-dependent part of the working area.*/
|
/* Setting up the port-dependent part of the working area.*/
|
||||||
|
|
|
@ -74,6 +74,8 @@
|
||||||
*****************************************************************************
|
*****************************************************************************
|
||||||
|
|
||||||
*** Next ***
|
*** Next ***
|
||||||
|
- NEW: Added a "waend" field to the thread structure in RT for debug
|
||||||
|
convenience.
|
||||||
- NEW: Removed obsolete sandbox code from ARMv7-M port. Now ARMv7-M-ALT is
|
- NEW: Removed obsolete sandbox code from ARMv7-M port. Now ARMv7-M-ALT is
|
||||||
the official port for use with sandboxes.
|
the official port for use with sandboxes.
|
||||||
- NEW: Reworked HAL MAC driver, now with callback support.
|
- NEW: Reworked HAL MAC driver, now with callback support.
|
||||||
|
|
Loading…
Reference in New Issue