Every ARM architecture must export g_instackbase

This commit is contained in:
Gregory Nutt 2014-03-23 10:05:21 -06:00
parent 293b5d7723
commit 3303e04e78
6 changed files with 29 additions and 7 deletions

View File

@ -63,8 +63,14 @@
# undef CONFIG_ARCH_USBDUMP
#endif
/* Output debug info if stack dump is selected -- even if
* debug is not selected.
/* Check if we can dump stack usage information */
#ifndef CONFIG_DEBUG
# undef CONFIG_DEBUG_STACK
#endif
/* Output debug info if stack dump is selected -- even if debug is not
* selected.
*/
#ifdef CONFIG_ARCH_STACKDUMP
@ -213,7 +219,7 @@ static void up_dumpstate(void)
#if CONFIG_ARCH_INTERRUPTSTACK > 3
istackbase = (uint32_t)&g_intstackbase;
istacksize = (CONFIG_ARCH_INTERRUPTSTACK & ~3) - 4;
istacksize = (CONFIG_ARCH_INTERRUPTSTACK & ~3);
/* Show interrupt stack info */
@ -221,6 +227,9 @@ static void up_dumpstate(void)
lldbg("IRQ stack:\n");
lldbg(" base: %08x\n", istackbase);
lldbg(" size: %08x\n", istacksize);
#ifdef CONFIG_DEBUG_STACK
lldbg(" used: %08x\n", up_check_intstack());
#endif
/* Does the current stack pointer lie within the interrupt
* stack?
@ -247,6 +256,9 @@ static void up_dumpstate(void)
lldbg("User stack:\n");
lldbg(" base: %08x\n", ustackbase);
lldbg(" size: %08x\n", ustacksize);
#ifdef CONFIG_DEBUG_STACK
lldbg(" used: %08x\n", up_check_tcbstack(rtcb));
#endif
/* Dump the user stack if the stack pointer lies within the allocated user
* stack memory.
@ -256,10 +268,14 @@ static void up_dumpstate(void)
{
up_stackdump(sp, ustackbase);
}
#else
lldbg("sp: %08x\n", sp);
lldbg("stack base: %08x\n", ustackbase);
lldbg("stack size: %08x\n", ustacksize);
#ifdef CONFIG_DEBUG_STACK
lldbg("stack used: %08x\n", up_check_tcbstack(rtcb));
#endif
/* Dump the user stack if the stack pointer lies within the allocated user
* stack memory.

View File

@ -1,7 +1,7 @@
/************************************************************************************
* arch/arm/src/c5471/c5471_vectors.S
*
* Copyright (C) 2007-2009 Gregory Nutt. All rights reserved.
* Copyright (C) 2007-2009, 2014 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@ -472,7 +472,9 @@ up_vectoraddrexcptn:
#if CONFIG_ARCH_INTERRUPTSTACK > 3
.bss
.align 4
.globl g_intstackbase
.global g_intstackalloc
.global g_intstackbase
.type g_intstackalloc, object
.type g_intstackbase, object
g_intstackalloc:
.skip ((CONFIG_ARCH_INTERRUPTSTACK & ~3) - 4)

View File

@ -2,7 +2,7 @@
* arch/arm/src/kinetis/kinetis_vectors.S
* arch/arm/src/chip/kinetis_vectors.S
*
* Copyright (C) 2011, 2013 Gregory Nutt. All rights reserved.
* Copyright (C) 2011, 2013-2014 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@ -848,6 +848,7 @@ exception_common:
#if CONFIG_ARCH_INTERRUPTSTACK > 3
.bss
.global g_intstackalloc
.global g_intstackbase
.align 4
g_intstackalloc:

View File

@ -2,7 +2,7 @@
* arch/arm/src/lpc17xx/lpc17_vectors.S
* arch/arm/src/chip/lpc17_vectors.S
*
* Copyright (C) 2010-2011, 2013 Gregory Nutt. All rights reserved.
* Copyright (C) 2010-2011, 2013-2014 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@ -460,6 +460,7 @@ exception_common:
#if CONFIG_ARCH_INTERRUPTSTACK > 3
.bss
.global g_intstackalloc
.global g_intstackbase
.align 4
g_intstackalloc:

View File

@ -469,6 +469,7 @@ exception_common:
#if CONFIG_ARCH_INTERRUPTSTACK > 3
.bss
.global g_intstackalloc
.global g_intstackbase
.align 4
g_intstackalloc:

View File

@ -450,6 +450,7 @@ exception_common:
#if CONFIG_ARCH_INTERRUPTSTACK > 3
.bss
.global g_intstackalloc
.global g_intstackbase
.align 4
g_intstackalloc: