diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2013-11-01 11:16:51 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2013-11-01 11:16:51 -0600 |
commit | 1087c67c2acf53fbe1f549e89be6b70705b87792 (patch) | |
tree | 61f1d974a05187e9608eda2e79565654c03d308c /nuttx/arch/sh/src | |
parent | 9741311259ee5434987dc8c9918f29e355d22c4f (diff) | |
download | nuttx-1087c67c2acf53fbe1f549e89be6b70705b87792.tar.gz nuttx-1087c67c2acf53fbe1f549e89be6b70705b87792.tar.bz2 nuttx-1087c67c2acf53fbe1f549e89be6b70705b87792.zip |
Extend stack debug logic to include IDLE and interrupt stacks. Also color the heap as well. Based on suggestions from David Sidrane
Diffstat (limited to 'nuttx/arch/sh/src')
-rw-r--r-- | nuttx/arch/sh/src/m16c/chip.h | 2 | ||||
-rw-r--r-- | nuttx/arch/sh/src/sh1/chip.h | 2 | ||||
-rw-r--r-- | nuttx/arch/sh/src/sh1/sh1_dumpstate.c | 4 | ||||
-rw-r--r-- | nuttx/arch/sh/src/sh1/sh1_vector.S | 19 |
4 files changed, 14 insertions, 13 deletions
diff --git a/nuttx/arch/sh/src/m16c/chip.h b/nuttx/arch/sh/src/m16c/chip.h index 02140df79..83c0da2c9 100644 --- a/nuttx/arch/sh/src/m16c/chip.h +++ b/nuttx/arch/sh/src/m16c/chip.h @@ -272,7 +272,7 @@ extern uint32_t g_idle_topstack; /* Start of the heap */ #ifndef __ASSEMBLY__ # if CONFIG_ARCH_INTERRUPTSTACK > 3 - extern uint16_t g_userstack; + extern uint16_t g_intstackbase; # endif #endif diff --git a/nuttx/arch/sh/src/sh1/chip.h b/nuttx/arch/sh/src/sh1/chip.h index b679fe866..331c1b055 100644 --- a/nuttx/arch/sh/src/sh1/chip.h +++ b/nuttx/arch/sh/src/sh1/chip.h @@ -63,7 +63,7 @@ #ifndef __ASSEMBLY__ # if CONFIG_ARCH_INTERRUPTSTACK > 3 - extern uint32_t g_userstack; + extern uint32_t g_intstackbase; # endif #endif diff --git a/nuttx/arch/sh/src/sh1/sh1_dumpstate.c b/nuttx/arch/sh/src/sh1/sh1_dumpstate.c index 8990f6615..e9ffc4caa 100644 --- a/nuttx/arch/sh/src/sh1/sh1_dumpstate.c +++ b/nuttx/arch/sh/src/sh1/sh1_dumpstate.c @@ -172,7 +172,7 @@ void up_dumpstate(void) /* Get the limits on the interrupt stack memory */ #if CONFIG_ARCH_INTERRUPTSTACK > 3 - istackbase = (uint32_t)&g_userstack; + istackbase = (uint32_t)&g_intstackbase; istacksize = (CONFIG_ARCH_INTERRUPTSTACK & ~3) - 4; /* Show interrupt stack info */ @@ -196,7 +196,7 @@ void up_dumpstate(void) * at the base of the interrupt stack. */ - sp = g_userstack; + sp = g_intstackbase; lldbg("sp: %08x\n", sp); } diff --git a/nuttx/arch/sh/src/sh1/sh1_vector.S b/nuttx/arch/sh/src/sh1/sh1_vector.S index 1655a782d..a16fb8f0b 100644 --- a/nuttx/arch/sh/src/sh1/sh1_vector.S +++ b/nuttx/arch/sh/src/sh1/sh1_vector.S @@ -411,7 +411,7 @@ _up_vector: .align 2 #if CONFIG_ARCH_INTERRUPTSTACK > 3 .Lintstack: - .long _up_stackbase + .long _g_intstackbase #endif .Ldoirq: .long _up_doirq @@ -501,7 +501,7 @@ _up_fullcontextrestore: .size _up_fullcontextrestore, .-_up_fullcontextrestore /************************************************************************************ - * Name: up_interruptstack/g_userstack + * Name: g_intstackalloc/g_intstackbase * * Description: * Shouldn't happen @@ -511,15 +511,16 @@ _up_fullcontextrestore: #if CONFIG_ARCH_INTERRUPTSTACK > 3 .bss .align 2 - .globl _g_userstack - .type _g_userstack, object -_up_interruptstack: + .globl _g_intstackalloc + .type _g_intstackalloc, object + .globl _g_intstackbase + .type _g_intstackbase, object +_g_intstackalloc: .skip ((CONFIG_ARCH_INTERRUPTSTACK & ~3) - 4) -_g_userstack: -_up_stackbase: +_g_intstackbase: .skip 2 - .size _g_userstack, 4 - .size _up_interruptstack, (CONFIG_ARCH_INTERRUPTSTACK & ~3) + .size _g_intstackbase, 4 + .size _g_intstackalloc, (CONFIG_ARCH_INTERRUPTSTACK & ~3) #endif .end |