mirror of
https://github.com/apache/nuttx.git
synced 2026-06-04 23:03:27 +08:00
Remove CONFIG_DEBUG_STACK. Adding CONFIG_STACK_COLORATION makes this configuration option pointless
This commit is contained in:
@@ -522,13 +522,6 @@ config DEBUG_PAGING
|
|||||||
---help---
|
---help---
|
||||||
Enable demand paging debug SYSLOG output (disabled by default)
|
Enable demand paging debug SYSLOG output (disabled by default)
|
||||||
|
|
||||||
config DEBUG_STACK
|
|
||||||
bool "Stack usage debug hooks"
|
|
||||||
default n
|
|
||||||
depends on ARCH_HAVE_STACKCHECK
|
|
||||||
---help---
|
|
||||||
Enable hooks to check stack usage. Only supported by a few architectures.
|
|
||||||
|
|
||||||
comment "Driver Debug Options"
|
comment "Driver Debug Options"
|
||||||
|
|
||||||
config DEBUG_LCD
|
config DEBUG_LCD
|
||||||
|
|||||||
@@ -123,10 +123,6 @@ ifeq ($(CONFIG_STACK_COLORATION),y)
|
|||||||
CMN_CSRCS += up_checkstack.c
|
CMN_CSRCS += up_checkstack.c
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(CONFIG_DEBUG_STACK),y)
|
|
||||||
CMN_CSRCS += up_checkstack.c
|
|
||||||
endif
|
|
||||||
|
|
||||||
# A1x-specific assembly language files
|
# A1x-specific assembly language files
|
||||||
|
|
||||||
CHIP_ASRCS =
|
CHIP_ASRCS =
|
||||||
|
|||||||
@@ -165,7 +165,8 @@ void up_irqinitialize(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Colorize the interrupt stack for debug purposes */
|
/* Colorize the interrupt stack for debug purposes */
|
||||||
#if (defined(CONFIG_DEBUG_STACK) || defined(CONFIG_STACK_COLORATION)) && CONFIG_ARCH_INTERRUPTSTACK > 3
|
|
||||||
|
#if defined(CONFIG_STACK_COLORATION) && CONFIG_ARCH_INTERRUPTSTACK > 3
|
||||||
{
|
{
|
||||||
size_t intstack_size = (CONFIG_ARCH_INTERRUPTSTACK & ~3);
|
size_t intstack_size = (CONFIG_ARCH_INTERRUPTSTACK & ~3);
|
||||||
up_stack_color((FAR void *)((uintptr_t)&g_intstackbase - intstack_size),
|
up_stack_color((FAR void *)((uintptr_t)&g_intstackbase - intstack_size),
|
||||||
|
|||||||
@@ -76,12 +76,6 @@
|
|||||||
# undef CONFIG_ARCH_USBDUMP
|
# undef CONFIG_ARCH_USBDUMP
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Check if we can dump stack usage information */
|
|
||||||
|
|
||||||
#ifndef CONFIG_DEBUG
|
|
||||||
# undef CONFIG_DEBUG_STACK
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* The following is just intended to keep some ugliness out of the mainline
|
/* The following is just intended to keep some ugliness out of the mainline
|
||||||
* code. We are going to print the task name if:
|
* code. We are going to print the task name if:
|
||||||
*
|
*
|
||||||
@@ -237,7 +231,7 @@ static void up_dumpstate(void)
|
|||||||
lldbg("IRQ stack:\n");
|
lldbg("IRQ stack:\n");
|
||||||
lldbg(" base: %08x\n", istackbase);
|
lldbg(" base: %08x\n", istackbase);
|
||||||
lldbg(" size: %08x\n", istacksize);
|
lldbg(" size: %08x\n", istacksize);
|
||||||
#if defined(CONFIG_DEBUG_STACK) || defined(CONFIG_STACK_COLORATION)
|
#ifdef CONFIG_STACK_COLORATION
|
||||||
lldbg(" used: %08x\n", up_check_intstack());
|
lldbg(" used: %08x\n", up_check_intstack());
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -264,7 +258,7 @@ static void up_dumpstate(void)
|
|||||||
lldbg("User stack:\n");
|
lldbg("User stack:\n");
|
||||||
lldbg(" base: %08x\n", ustackbase);
|
lldbg(" base: %08x\n", ustackbase);
|
||||||
lldbg(" size: %08x\n", ustacksize);
|
lldbg(" size: %08x\n", ustacksize);
|
||||||
#if defined(CONFIG_DEBUG_STACK) || defined(CONFIG_STACK_COLORATION)
|
#ifdef CONFIG_STACK_COLORATION
|
||||||
lldbg(" used: %08x\n", up_check_tcbstack(rtcb));
|
lldbg(" used: %08x\n", up_check_tcbstack(rtcb));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -272,7 +266,7 @@ static void up_dumpstate(void)
|
|||||||
lldbg("sp: %08x\n", sp);
|
lldbg("sp: %08x\n", sp);
|
||||||
lldbg("stack base: %08x\n", ustackbase);
|
lldbg("stack base: %08x\n", ustackbase);
|
||||||
lldbg("stack size: %08x\n", ustacksize);
|
lldbg("stack size: %08x\n", ustacksize);
|
||||||
#if defined(CONFIG_DEBUG_STACK) || defined(CONFIG_STACK_COLORATION)
|
#ifdef CONFIG_STACK_COLORATION
|
||||||
lldbg("stack used: %08x\n", up_check_tcbstack(rtcb));
|
lldbg("stack used: %08x\n", up_check_tcbstack(rtcb));
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -611,7 +611,7 @@ __start:
|
|||||||
|
|
||||||
bl up_boot
|
bl up_boot
|
||||||
|
|
||||||
#if defined(CONFIG_DEBUG_STACK) || defined(CONFIG_STACK_COLORATION)
|
#ifdef CONFIG_STACK_COLORATION
|
||||||
/* Write a known value to the IDLE thread stack to support stack
|
/* Write a known value to the IDLE thread stack to support stack
|
||||||
* monitoring logic
|
* monitoring logic
|
||||||
*/
|
*/
|
||||||
@@ -678,7 +678,7 @@ __start:
|
|||||||
.long _edata
|
.long _edata
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(CONFIG_DEBUG_STACK) || defined(CONFIG_STACK_COLORATION)
|
#ifdef CONFIG_STACK_COLORATION
|
||||||
.type .Lstkinit, %object
|
.type .Lstkinit, %object
|
||||||
.Lstkinit:
|
.Lstkinit:
|
||||||
.long _ebss /* Beginning of the IDLE stack, then words of IDLE stack */
|
.long _ebss /* Beginning of the IDLE stack, then words of IDLE stack */
|
||||||
|
|||||||
@@ -128,7 +128,7 @@ __start:
|
|||||||
bl board_led_initialize
|
bl board_led_initialize
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(CONFIG_DEBUG_STACK) || defined(CONFIG_STACK_COLORATION)
|
#ifdef CONFIG_STACK_COLORATION
|
||||||
/* Write a known value to the IDLE thread stack to support stack
|
/* Write a known value to the IDLE thread stack to support stack
|
||||||
* monitoring logic
|
* monitoring logic
|
||||||
*/
|
*/
|
||||||
@@ -170,7 +170,7 @@ __start:
|
|||||||
.long _edata
|
.long _edata
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(CONFIG_DEBUG_STACK) || defined(CONFIG_STACK_COLORATION)
|
#ifdef CONFIG_STACK_COLORATION
|
||||||
.type .Lstkinit, %object
|
.type .Lstkinit, %object
|
||||||
.Lstkinit:
|
.Lstkinit:
|
||||||
.long _ebss /* Beginning of the IDLE stack, then words of IDLE stack */
|
.long _ebss /* Beginning of the IDLE stack, then words of IDLE stack */
|
||||||
|
|||||||
@@ -75,12 +75,6 @@
|
|||||||
# undef CONFIG_ARCH_USBDUMP
|
# undef CONFIG_ARCH_USBDUMP
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Check if we can dump stack usage information */
|
|
||||||
|
|
||||||
#ifndef CONFIG_DEBUG
|
|
||||||
# undef CONFIG_DEBUG_STACK
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* The following is just intended to keep some ugliness out of the mainline
|
/* The following is just intended to keep some ugliness out of the mainline
|
||||||
* code. We are going to print the task name if:
|
* code. We are going to print the task name if:
|
||||||
*
|
*
|
||||||
@@ -243,7 +237,7 @@ static void up_dumpstate(void)
|
|||||||
lldbg("IRQ stack:\n");
|
lldbg("IRQ stack:\n");
|
||||||
lldbg(" base: %08x\n", istackbase);
|
lldbg(" base: %08x\n", istackbase);
|
||||||
lldbg(" size: %08x\n", istacksize);
|
lldbg(" size: %08x\n", istacksize);
|
||||||
#if defined(CONFIG_DEBUG_STACK) || defined(CONFIG_STACK_COLORATION)
|
#ifdef CONFIG_STACK_COLORATION
|
||||||
lldbg(" used: %08x\n", up_check_intstack());
|
lldbg(" used: %08x\n", up_check_intstack());
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -272,7 +266,7 @@ static void up_dumpstate(void)
|
|||||||
lldbg("User stack:\n");
|
lldbg("User stack:\n");
|
||||||
lldbg(" base: %08x\n", ustackbase);
|
lldbg(" base: %08x\n", ustackbase);
|
||||||
lldbg(" size: %08x\n", ustacksize);
|
lldbg(" size: %08x\n", ustacksize);
|
||||||
#if defined(CONFIG_DEBUG_STACK) || defined(CONFIG_STACK_COLORATION)
|
#ifdef CONFIG_STACK_COLORATION
|
||||||
lldbg(" used: %08x\n", up_check_tcbstack(rtcb));
|
lldbg(" used: %08x\n", up_check_tcbstack(rtcb));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -289,7 +283,7 @@ static void up_dumpstate(void)
|
|||||||
lldbg("sp: %08x\n", sp);
|
lldbg("sp: %08x\n", sp);
|
||||||
lldbg("stack base: %08x\n", ustackbase);
|
lldbg("stack base: %08x\n", ustackbase);
|
||||||
lldbg("stack size: %08x\n", ustacksize);
|
lldbg("stack size: %08x\n", ustacksize);
|
||||||
#if defined(CONFIG_DEBUG_STACK) || defined(CONFIG_STACK_COLORATION)
|
#ifdef CONFIG_STACK_COLORATION
|
||||||
lldbg("stack used: %08x\n", up_check_tcbstack(rtcb));
|
lldbg("stack used: %08x\n", up_check_tcbstack(rtcb));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -74,12 +74,6 @@
|
|||||||
# undef CONFIG_ARCH_USBDUMP
|
# undef CONFIG_ARCH_USBDUMP
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Check if we can dump stack usage information */
|
|
||||||
|
|
||||||
#ifndef CONFIG_DEBUG
|
|
||||||
# undef CONFIG_DEBUG_STACK
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* The following is just intended to keep some ugliness out of the mainline
|
/* The following is just intended to keep some ugliness out of the mainline
|
||||||
* code. We are going to print the task name if:
|
* code. We are going to print the task name if:
|
||||||
*
|
*
|
||||||
@@ -239,7 +233,7 @@ static void up_dumpstate(void)
|
|||||||
lldbg("Interrupt stack:\n");
|
lldbg("Interrupt stack:\n");
|
||||||
lldbg(" base: %08x\n", istackbase);
|
lldbg(" base: %08x\n", istackbase);
|
||||||
lldbg(" size: %08x\n", istacksize);
|
lldbg(" size: %08x\n", istacksize);
|
||||||
#if defined(CONFIG_DEBUG_STACK) || defined(CONFIG_STACK_COLORATION)
|
#ifdef CONFIG_STACK_COLORATION
|
||||||
lldbg(" used: %08x\n", up_check_intstack());
|
lldbg(" used: %08x\n", up_check_intstack());
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
@@ -249,7 +243,7 @@ static void up_dumpstate(void)
|
|||||||
lldbg("User stack:\n");
|
lldbg("User stack:\n");
|
||||||
lldbg(" base: %08x\n", ustackbase);
|
lldbg(" base: %08x\n", ustackbase);
|
||||||
lldbg(" size: %08x\n", ustacksize);
|
lldbg(" size: %08x\n", ustacksize);
|
||||||
#if defined(CONFIG_DEBUG_STACK) || defined(CONFIG_STACK_COLORATION)
|
#ifdef CONFIG_STACK_COLORATION
|
||||||
lldbg(" used: %08x\n", up_check_tcbstack(rtcb));
|
lldbg(" used: %08x\n", up_check_tcbstack(rtcb));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -631,7 +631,7 @@ __start:
|
|||||||
|
|
||||||
bl up_boot
|
bl up_boot
|
||||||
|
|
||||||
#if defined(CONFIG_DEBUG_STACK) || defined(CONFIG_STACK_COLORATION)
|
#ifdef CONFIG_STACK_COLORATION
|
||||||
/* Write a known value to the IDLE thread stack to support stack
|
/* Write a known value to the IDLE thread stack to support stack
|
||||||
* monitoring logic
|
* monitoring logic
|
||||||
*/
|
*/
|
||||||
@@ -748,7 +748,7 @@ arm_data_initialize:
|
|||||||
.size .Ldatainit, . -.Ldatainit
|
.size .Ldatainit, . -.Ldatainit
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(CONFIG_DEBUG_STACK) || defined(CONFIG_STACK_COLORATION)
|
#ifdef CONFIG_STACK_COLORATION
|
||||||
.type .Lstkinit, %object
|
.type .Lstkinit, %object
|
||||||
.Lstkinit:
|
.Lstkinit:
|
||||||
#ifdef CONFIG_BOOT_SDRAM_DATA
|
#ifdef CONFIG_BOOT_SDRAM_DATA
|
||||||
|
|||||||
@@ -675,7 +675,7 @@ __start:
|
|||||||
|
|
||||||
bl up_boot
|
bl up_boot
|
||||||
|
|
||||||
#if defined(CONFIG_DEBUG_STACK)) || defined(CONFIG_STACK_COLORATION)
|
#ifdef CONFIG_STACK_COLORATION
|
||||||
/* Write a known value to the IDLE thread stack to support stack
|
/* Write a known value to the IDLE thread stack to support stack
|
||||||
* monitoring logic
|
* monitoring logic
|
||||||
*/
|
*/
|
||||||
@@ -797,7 +797,7 @@ arm_data_initialize:
|
|||||||
.long _edata
|
.long _edata
|
||||||
.size .Ldatainit, . -.Ldatainit
|
.size .Ldatainit, . -.Ldatainit
|
||||||
|
|
||||||
#if defined(CONFIG_DEBUG_STACK)) || defined(CONFIG_STACK_COLORATION)
|
#ifdef CONFIG_STACK_COLORATION
|
||||||
.type .Lstkinit, %object
|
.type .Lstkinit, %object
|
||||||
.Lstkinit:
|
.Lstkinit:
|
||||||
#ifdef CONFIG_BOOT_SDRAM_DATA
|
#ifdef CONFIG_BOOT_SDRAM_DATA
|
||||||
|
|||||||
@@ -74,12 +74,6 @@
|
|||||||
# undef CONFIG_ARCH_USBDUMP
|
# undef CONFIG_ARCH_USBDUMP
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Check if we can dump stack usage information */
|
|
||||||
|
|
||||||
#ifndef CONFIG_DEBUG
|
|
||||||
# undef CONFIG_DEBUG_STACK
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* The following is just intended to keep some ugliness out of the mainline
|
/* The following is just intended to keep some ugliness out of the mainline
|
||||||
* code. We are going to print the task name if:
|
* code. We are going to print the task name if:
|
||||||
*
|
*
|
||||||
@@ -248,7 +242,7 @@ static void up_dumpstate(void)
|
|||||||
lldbg("IRQ stack:\n");
|
lldbg("IRQ stack:\n");
|
||||||
lldbg(" base: %08x\n", istackbase);
|
lldbg(" base: %08x\n", istackbase);
|
||||||
lldbg(" size: %08x\n", istacksize);
|
lldbg(" size: %08x\n", istacksize);
|
||||||
#if defined(CONFIG_DEBUG_STACK) || defined(CONFIG_STACK_COLORATION)
|
#ifdef CONFIG_STACK_COLORATION
|
||||||
lldbg(" used: %08x\n", up_check_intstack());
|
lldbg(" used: %08x\n", up_check_intstack());
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -277,7 +271,7 @@ static void up_dumpstate(void)
|
|||||||
lldbg("User stack:\n");
|
lldbg("User stack:\n");
|
||||||
lldbg(" base: %08x\n", ustackbase);
|
lldbg(" base: %08x\n", ustackbase);
|
||||||
lldbg(" size: %08x\n", ustacksize);
|
lldbg(" size: %08x\n", ustacksize);
|
||||||
#if defined(CONFIG_DEBUG_STACK) || defined(CONFIG_STACK_COLORATION)
|
#ifdef CONFIG_STACK_COLORATION
|
||||||
lldbg(" used: %08x\n", up_check_tcbstack(rtcb));
|
lldbg(" used: %08x\n", up_check_tcbstack(rtcb));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -297,7 +291,7 @@ static void up_dumpstate(void)
|
|||||||
lldbg("sp: %08x\n", sp);
|
lldbg("sp: %08x\n", sp);
|
||||||
lldbg("stack base: %08x\n", ustackbase);
|
lldbg("stack base: %08x\n", ustackbase);
|
||||||
lldbg("stack size: %08x\n", ustacksize);
|
lldbg("stack size: %08x\n", ustacksize);
|
||||||
#if defined(CONFIG_DEBUG_STACK) || defined(CONFIG_STACK_COLORATION)
|
#ifdef CONFIG_STACK_COLORATION
|
||||||
lldbg("stack used: %08x\n", up_check_tcbstack(rtcb));
|
lldbg("stack used: %08x\n", up_check_tcbstack(rtcb));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -53,10 +53,6 @@ ifeq ($(CONFIG_STACK_COLORATION),y)
|
|||||||
CMN_CSRCS += up_checkstack.c
|
CMN_CSRCS += up_checkstack.c
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(CONFIG_DEBUG_STACK),y)
|
|
||||||
CMN_CSRCS += up_checkstack.c
|
|
||||||
endif
|
|
||||||
|
|
||||||
CHIP_ASRCS = c5471_lowputc.S c5471_vectors.S
|
CHIP_ASRCS = c5471_lowputc.S c5471_vectors.S
|
||||||
CHIP_CSRCS = c5471_irq.c c5471_serial.c c5471_watchdog.c c5471_ethernet.c
|
CHIP_CSRCS = c5471_irq.c c5471_serial.c c5471_watchdog.c c5471_ethernet.c
|
||||||
|
|
||||||
|
|||||||
@@ -56,10 +56,6 @@ ifeq ($(CONFIG_STACK_COLORATION),y)
|
|||||||
CMN_CSRCS += up_checkstack.c
|
CMN_CSRCS += up_checkstack.c
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(CONFIG_DEBUG_STACK),y)
|
|
||||||
CMN_CSRCS += up_checkstack.c
|
|
||||||
endif
|
|
||||||
|
|
||||||
CHIP_ASRCS = calypso_lowputc.S
|
CHIP_ASRCS = calypso_lowputc.S
|
||||||
CHIP_CSRCS = calypso_irq.c calypso_heap.c calypso_serial.c calypso_spi.c
|
CHIP_CSRCS = calypso_irq.c calypso_heap.c calypso_serial.c calypso_spi.c
|
||||||
CHIP_CSRCS += clock.c calypso_uwire.c calypso_armio.c calypso_keypad.c
|
CHIP_CSRCS += clock.c calypso_uwire.c calypso_armio.c calypso_keypad.c
|
||||||
|
|||||||
@@ -53,11 +53,7 @@
|
|||||||
* Pre-processor Definitions
|
* Pre-processor Definitions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#if !defined(CONFIG_DEBUG)
|
#ifdef CONFIG_STACK_COLORATION
|
||||||
# undef CONFIG_DEBUG_STACK
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(CONFIG_DEBUG_STACK) || defined(CONFIG_STACK_COLORATION)
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Public Data
|
* Public Data
|
||||||
@@ -203,4 +199,4 @@ size_t up_check_intstack_remain(void)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* CONFIG_DEBUG_STACK || CONFIG_STACK_COLORATION */
|
#endif /* CONFIG_STACK_COLORATION */
|
||||||
|
|||||||
@@ -162,22 +162,14 @@ int up_create_stack(FAR struct tcb_s *tcb, size_t stack_size, uint8_t ttype)
|
|||||||
|
|
||||||
if (ttype == TCB_FLAG_TTYPE_KERNEL)
|
if (ttype == TCB_FLAG_TTYPE_KERNEL)
|
||||||
{
|
{
|
||||||
#if defined(CONFIG_DEBUG) && !(defined(CONFIG_DEBUG_STACK) || defined(CONFIG_STACK_COLORATION))
|
|
||||||
tcb->stack_alloc_ptr = (uint32_t *)kmm_zalloc(stack_size);
|
|
||||||
#else
|
|
||||||
tcb->stack_alloc_ptr = (uint32_t *)kmm_malloc(stack_size);
|
tcb->stack_alloc_ptr = (uint32_t *)kmm_malloc(stack_size);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
/* Use the user-space allocator if this is a task or pthread */
|
/* Use the user-space allocator if this is a task or pthread */
|
||||||
|
|
||||||
#if defined(CONFIG_DEBUG) && !(defined(CONFIG_DEBUG_STACK) || defined(CONFIG_STACK_COLORATION))
|
|
||||||
tcb->stack_alloc_ptr = (uint32_t *)kumm_zalloc(stack_size);
|
|
||||||
#else
|
|
||||||
tcb->stack_alloc_ptr = (uint32_t *)kumm_malloc(stack_size);
|
tcb->stack_alloc_ptr = (uint32_t *)kumm_malloc(stack_size);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_DEBUG
|
#ifdef CONFIG_DEBUG
|
||||||
@@ -230,7 +222,7 @@ int up_create_stack(FAR struct tcb_s *tcb, size_t stack_size, uint8_t ttype)
|
|||||||
* water marks.
|
* water marks.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if (defined(CONFIG_DEBUG) && defined(CONFIG_DEBUG_STACK)) || defined(CONFIG_STACK_COLORATION)
|
#ifdef CONFIG_STACK_COLORATION
|
||||||
up_stack_color(tcb->stack_alloc_ptr, tcb->adj_stack_size);
|
up_stack_color(tcb->stack_alloc_ptr, tcb->adj_stack_size);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -249,7 +241,7 @@ int up_create_stack(FAR struct tcb_s *tcb, size_t stack_size, uint8_t ttype)
|
|||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#if (defined(CONFIG_DEBUG) && defined(CONFIG_DEBUG_STACK)) || defined(CONFIG_STACK_COLORATION)
|
#ifdef CONFIG_STACK_COLORATION
|
||||||
void up_stack_color(FAR void *stackbase, size_t nbytes)
|
void up_stack_color(FAR void *stackbase, size_t nbytes)
|
||||||
{
|
{
|
||||||
/* Take extra care that we do not write outsize the stack boundaries */
|
/* Take extra care that we do not write outsize the stack boundaries */
|
||||||
|
|||||||
@@ -96,7 +96,7 @@ static void up_calibratedelay(void)
|
|||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#if (defined(CONFIG_DEBUG_STACK) || defined(CONFIG_STACK_COLORATION)) && CONFIG_ARCH_INTERRUPTSTACK > 3
|
#if defined(CONFIG_STACK_COLORATION) && CONFIG_ARCH_INTERRUPTSTACK > 3
|
||||||
static inline void up_color_intstack(void)
|
static inline void up_color_intstack(void)
|
||||||
{
|
{
|
||||||
uint32_t *ptr = (uint32_t *)&g_intstackalloc;
|
uint32_t *ptr = (uint32_t *)&g_intstackalloc;
|
||||||
|
|||||||
@@ -519,7 +519,7 @@ void up_rnginitialize(void);
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Debug ********************************************************************/
|
/* Debug ********************************************************************/
|
||||||
#if (defined(CONFIG_DEBUG) && defined(CONFIG_DEBUG_STACK)) || defined(CONFIG_STACK_COLORATION)
|
#ifdef CONFIG_STACK_COLORATION
|
||||||
void up_stack_color(FAR void *stackbase, size_t nbytes);
|
void up_stack_color(FAR void *stackbase, size_t nbytes);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -54,10 +54,6 @@ ifeq ($(CONFIG_STACK_COLORATION),y)
|
|||||||
CMN_CSRCS += up_checkstack.c
|
CMN_CSRCS += up_checkstack.c
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(CONFIG_DEBUG_STACK),y)
|
|
||||||
CMN_CSRCS += up_checkstack.c
|
|
||||||
endif
|
|
||||||
|
|
||||||
CHIP_ASRCS = dm320_lowputc.S dm320_restart.S
|
CHIP_ASRCS = dm320_lowputc.S dm320_restart.S
|
||||||
|
|
||||||
CHIP_CSRCS = dm320_allocateheap.c dm320_boot.c dm320_decodeirq.c
|
CHIP_CSRCS = dm320_allocateheap.c dm320_boot.c dm320_decodeirq.c
|
||||||
|
|||||||
@@ -75,10 +75,6 @@ ifeq ($(CONFIG_STACK_COLORATION),y)
|
|||||||
CMN_CSRCS += up_checkstack.c
|
CMN_CSRCS += up_checkstack.c
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(CONFIG_DEBUG_STACK),y)
|
|
||||||
CMN_CSRCS += up_checkstack.c
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(CONFIG_ELF),y)
|
ifeq ($(CONFIG_ELF),y)
|
||||||
CMN_CSRCS += up_elf.c
|
CMN_CSRCS += up_elf.c
|
||||||
endif
|
endif
|
||||||
|
|||||||
@@ -353,7 +353,7 @@ void up_irqinitialize(void)
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if (defined(CONFIG_DEBUG_STACK) || defined(CONFIG_STACK_COLORATION)) && CONFIG_ARCH_INTERRUPTSTACK > 3
|
#if defined(CONFIG_STACK_COLORATION) && CONFIG_ARCH_INTERRUPTSTACK > 3
|
||||||
/* Colorize the interrupt stack for debug purposes */
|
/* Colorize the interrupt stack for debug purposes */
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -68,7 +68,7 @@
|
|||||||
#ifdef CONFIG_ARCH_FPU
|
#ifdef CONFIG_ARCH_FPU
|
||||||
static inline void efm32_fpuconfig(void);
|
static inline void efm32_fpuconfig(void);
|
||||||
#endif
|
#endif
|
||||||
#if defined(CONFIG_DEBUG_STACK)) || defined(CONFIG_STACK_COLORATION)
|
#ifdef CONFIG_STACK_COLORATION
|
||||||
static void go_os_start(void *pv, unsigned int nbytes)
|
static void go_os_start(void *pv, unsigned int nbytes)
|
||||||
__attribute__ ((naked,no_instrument_function,noreturn));
|
__attribute__ ((naked,no_instrument_function,noreturn));
|
||||||
#endif
|
#endif
|
||||||
@@ -195,7 +195,7 @@ static inline void efm32_fpuconfig(void)
|
|||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#if defined(CONFIG_DEBUG_STACK)) || defined(CONFIG_STACK_COLORATION)
|
#ifdef CONFIG_STACK_COLORATION
|
||||||
static void go_os_start(void *pv, unsigned int nbytes)
|
static void go_os_start(void *pv, unsigned int nbytes)
|
||||||
{
|
{
|
||||||
/* Set the IDLE stack to the stack coloration value then jump to
|
/* Set the IDLE stack to the stack coloration value then jump to
|
||||||
@@ -301,7 +301,7 @@ void __start(void)
|
|||||||
showprogress('\r');
|
showprogress('\r');
|
||||||
showprogress('\n');
|
showprogress('\n');
|
||||||
|
|
||||||
#if defined(CONFIG_DEBUG_STACK)) || defined(CONFIG_STACK_COLORATION)
|
#ifdef CONFIG_STACK_COLORATION
|
||||||
/* Set the IDLE stack to the coloration value and jump into os_start() */
|
/* Set the IDLE stack to the coloration value and jump into os_start() */
|
||||||
|
|
||||||
go_os_start((FAR void *)&_ebss, CONFIG_IDLETHREAD_STACKSIZE);
|
go_os_start((FAR void *)&_ebss, CONFIG_IDLETHREAD_STACKSIZE);
|
||||||
|
|||||||
@@ -53,10 +53,6 @@ ifeq ($(CONFIG_STACK_COLORATION),y)
|
|||||||
CMN_CSRCS += up_checkstack.c
|
CMN_CSRCS += up_checkstack.c
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(CONFIG_DEBUG_STACK),y)
|
|
||||||
CMN_CSRCS += up_checkstack.c
|
|
||||||
endif
|
|
||||||
|
|
||||||
CHIP_ASRCS = imx_lowputc.S
|
CHIP_ASRCS = imx_lowputc.S
|
||||||
CHIP_CSRCS = imx_boot.c imx_gpio.c imx_allocateheap.c imx_irq.c
|
CHIP_CSRCS = imx_boot.c imx_gpio.c imx_allocateheap.c imx_irq.c
|
||||||
CHIP_CSRCS += imx_serial.c imx_decodeirq.c imx_spi.c
|
CHIP_CSRCS += imx_serial.c imx_decodeirq.c imx_spi.c
|
||||||
|
|||||||
@@ -59,10 +59,6 @@ ifeq ($(CONFIG_STACK_COLORATION),y)
|
|||||||
CMN_CSRCS += up_checkstack.c
|
CMN_CSRCS += up_checkstack.c
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(CONFIG_DEBUG_STACK),y)
|
|
||||||
CMN_CSRCS += up_checkstack.c
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(CONFIG_ELF),y)
|
ifeq ($(CONFIG_ELF),y)
|
||||||
CMN_CSRCS += up_elf.c
|
CMN_CSRCS += up_elf.c
|
||||||
endif
|
endif
|
||||||
|
|||||||
@@ -58,10 +58,6 @@ ifeq ($(CONFIG_STACK_COLORATION),y)
|
|||||||
CMN_CSRCS += up_checkstack.c
|
CMN_CSRCS += up_checkstack.c
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(CONFIG_DEBUG_STACK),y)
|
|
||||||
CMN_CSRCS += up_checkstack.c
|
|
||||||
endif
|
|
||||||
|
|
||||||
CHIP_ASRCS = lpc214x_lowputc.S
|
CHIP_ASRCS = lpc214x_lowputc.S
|
||||||
CHIP_CSRCS = lpc214x_decodeirq.c lpc214x_irq.c lpc214x_serial.c
|
CHIP_CSRCS = lpc214x_decodeirq.c lpc214x_irq.c lpc214x_serial.c
|
||||||
|
|
||||||
|
|||||||
@@ -62,10 +62,6 @@ ifeq ($(CONFIG_STACK_COLORATION),y)
|
|||||||
CMN_CSRCS += up_checkstack.c
|
CMN_CSRCS += up_checkstack.c
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(CONFIG_DEBUG_STACK),y)
|
|
||||||
CMN_CSRCS += up_checkstack.c
|
|
||||||
endif
|
|
||||||
|
|
||||||
CHIP_ASRCS = lpc23xx_lowputc.S
|
CHIP_ASRCS = lpc23xx_lowputc.S
|
||||||
CHIP_CSRCS += lpc23xx_pllsetup.c lpc23xx_decodeirq.c lpc23xx_irq.c
|
CHIP_CSRCS += lpc23xx_pllsetup.c lpc23xx_decodeirq.c lpc23xx_irq.c
|
||||||
CHIP_CSRCS += lpc23xx_serial.c lpc23xx_io.c
|
CHIP_CSRCS += lpc23xx_serial.c lpc23xx_io.c
|
||||||
|
|||||||
@@ -59,10 +59,6 @@ ifeq ($(CONFIG_STACK_COLORATION),y)
|
|||||||
CMN_CSRCS += up_checkstack.c
|
CMN_CSRCS += up_checkstack.c
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(CONFIG_DEBUG_STACK),y)
|
|
||||||
CMN_CSRCS += up_checkstack.c
|
|
||||||
endif
|
|
||||||
|
|
||||||
CGU_ASRCS =
|
CGU_ASRCS =
|
||||||
|
|
||||||
CGU_CSRCS = lpc31_bcrndx.c lpc31_clkdomain.c lpc31_clkexten.c
|
CGU_CSRCS = lpc31_bcrndx.c lpc31_clkdomain.c lpc31_clkexten.c
|
||||||
|
|||||||
@@ -72,10 +72,6 @@ ifeq ($(CONFIG_STACK_COLORATION),y)
|
|||||||
CMN_CSRCS += up_checkstack.c
|
CMN_CSRCS += up_checkstack.c
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(CONFIG_DEBUG_STACK),y)
|
|
||||||
CMN_CSRCS += up_checkstack.c
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(CONFIG_ELF),y)
|
ifeq ($(CONFIG_ELF),y)
|
||||||
CMN_CSRCS += up_elf.c
|
CMN_CSRCS += up_elf.c
|
||||||
endif
|
endif
|
||||||
|
|||||||
@@ -59,10 +59,6 @@ ifeq ($(CONFIG_STACK_COLORATION),y)
|
|||||||
CMN_CSRCS += up_checkstack.c
|
CMN_CSRCS += up_checkstack.c
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(CONFIG_DEBUG_STACK),y)
|
|
||||||
CMN_CSRCS += up_checkstack.c
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(CONFIG_ELF),y)
|
ifeq ($(CONFIG_ELF),y)
|
||||||
CMN_CSRCS += up_elf.c
|
CMN_CSRCS += up_elf.c
|
||||||
endif
|
endif
|
||||||
|
|||||||
@@ -78,10 +78,6 @@ ifeq ($(CONFIG_STACK_COLORATION),y)
|
|||||||
CMN_CSRCS += up_checkstack.c
|
CMN_CSRCS += up_checkstack.c
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(CONFIG_DEBUG_STACK),y)
|
|
||||||
CMN_CSRCS += up_checkstack.c
|
|
||||||
endif
|
|
||||||
|
|
||||||
# Required SAM3/4 files
|
# Required SAM3/4 files
|
||||||
|
|
||||||
CHIP_ASRCS =
|
CHIP_ASRCS =
|
||||||
|
|||||||
@@ -125,10 +125,6 @@ ifeq ($(CONFIG_STACK_COLORATION),y)
|
|||||||
CMN_CSRCS += up_checkstack.c
|
CMN_CSRCS += up_checkstack.c
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(CONFIG_DEBUG_STACK),y)
|
|
||||||
CMN_CSRCS += up_checkstack.c
|
|
||||||
endif
|
|
||||||
|
|
||||||
# SAMA5-specific assembly language files
|
# SAMA5-specific assembly language files
|
||||||
|
|
||||||
CHIP_ASRCS =
|
CHIP_ASRCS =
|
||||||
|
|||||||
@@ -427,7 +427,7 @@ void up_irqinitialize(void)
|
|||||||
|
|
||||||
/* Colorize the interrupt stack for debug purposes */
|
/* Colorize the interrupt stack for debug purposes */
|
||||||
|
|
||||||
#if (defined(CONFIG_DEBUG_STACK) || defined(CONFIG_STACK_COLORATION)) && CONFIG_ARCH_INTERRUPTSTACK > 3
|
#if defined(CONFIG_STACK_COLORATION) && CONFIG_ARCH_INTERRUPTSTACK > 3
|
||||||
{
|
{
|
||||||
size_t intstack_size = (CONFIG_ARCH_INTERRUPTSTACK & ~3);
|
size_t intstack_size = (CONFIG_ARCH_INTERRUPTSTACK & ~3);
|
||||||
up_stack_color((FAR void *)((uintptr_t)&g_intstackbase - intstack_size),
|
up_stack_color((FAR void *)((uintptr_t)&g_intstackbase - intstack_size),
|
||||||
|
|||||||
@@ -59,10 +59,6 @@ ifeq ($(CONFIG_STACK_COLORATION),y)
|
|||||||
CMN_CSRCS += up_checkstack.c
|
CMN_CSRCS += up_checkstack.c
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(CONFIG_DEBUG_STACK),y)
|
|
||||||
CMN_CSRCS += up_checkstack.c
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(CONFIG_ELF),y)
|
ifeq ($(CONFIG_ELF),y)
|
||||||
CMN_CSRCS += up_elf.c
|
CMN_CSRCS += up_elf.c
|
||||||
endif
|
endif
|
||||||
|
|||||||
@@ -83,10 +83,6 @@ ifeq ($(CONFIG_STACK_COLORATION),y)
|
|||||||
CMN_CSRCS += up_checkstack.c
|
CMN_CSRCS += up_checkstack.c
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(CONFIG_DEBUG_STACK),y)
|
|
||||||
CMN_CSRCS += up_checkstack.c
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(CONFIG_ELF),y)
|
ifeq ($(CONFIG_ELF),y)
|
||||||
CMN_CSRCS += up_elf.c
|
CMN_CSRCS += up_elf.c
|
||||||
endif
|
endif
|
||||||
|
|||||||
@@ -308,7 +308,7 @@ void up_irqinitialize(void)
|
|||||||
|
|
||||||
/* Colorize the interrupt stack for debug purposes */
|
/* Colorize the interrupt stack for debug purposes */
|
||||||
|
|
||||||
#if (defined(CONFIG_DEBUG_STACK) || defined(CONFIG_STACK_COLORATION)) && CONFIG_ARCH_INTERRUPTSTACK > 3
|
#if defined(CONFIG_STACK_COLORATION) && CONFIG_ARCH_INTERRUPTSTACK > 3
|
||||||
{
|
{
|
||||||
size_t intstack_size = (CONFIG_ARCH_INTERRUPTSTACK & ~3);
|
size_t intstack_size = (CONFIG_ARCH_INTERRUPTSTACK & ~3);
|
||||||
up_stack_color((FAR void *)((uintptr_t)&g_intstackbase - intstack_size),
|
up_stack_color((FAR void *)((uintptr_t)&g_intstackbase - intstack_size),
|
||||||
|
|||||||
@@ -65,7 +65,7 @@
|
|||||||
#ifdef CONFIG_ARCH_FPU
|
#ifdef CONFIG_ARCH_FPU
|
||||||
static inline void stm32_fpuconfig(void);
|
static inline void stm32_fpuconfig(void);
|
||||||
#endif
|
#endif
|
||||||
#if defined(CONFIG_DEBUG_STACK) || defined(CONFIG_STACK_COLORATION)
|
#ifdef CONFIG_STACK_COLORATION
|
||||||
static void go_os_start(void *pv, unsigned int nbytes)
|
static void go_os_start(void *pv, unsigned int nbytes)
|
||||||
__attribute__ ((naked,no_instrument_function,noreturn));
|
__attribute__ ((naked,no_instrument_function,noreturn));
|
||||||
#endif
|
#endif
|
||||||
@@ -195,7 +195,8 @@ static inline void stm32_fpuconfig(void)
|
|||||||
* Set the IDLE stack to the
|
* Set the IDLE stack to the
|
||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
#if defined(CONFIG_DEBUG_STACK) || defined(CONFIG_STACK_COLORATION)
|
|
||||||
|
#ifdef CONFIG_STACK_COLORATION
|
||||||
static void go_os_start(void *pv, unsigned int nbytes)
|
static void go_os_start(void *pv, unsigned int nbytes)
|
||||||
{
|
{
|
||||||
/* Set the IDLE stack to the stack coloration value then jump to
|
/* Set the IDLE stack to the stack coloration value then jump to
|
||||||
@@ -310,7 +311,7 @@ void __start(void)
|
|||||||
showprogress('\r');
|
showprogress('\r');
|
||||||
showprogress('\n');
|
showprogress('\n');
|
||||||
|
|
||||||
#if defined(CONFIG_DEBUG_STACK) || defined(CONFIG_STACK_COLORATION)
|
#ifdef CONFIG_STACK_COLORATION
|
||||||
/* Set the IDLE stack to the coloration value and jump into os_start() */
|
/* Set the IDLE stack to the coloration value and jump into os_start() */
|
||||||
|
|
||||||
go_os_start((FAR void *)&_ebss, CONFIG_IDLETHREAD_STACKSIZE);
|
go_os_start((FAR void *)&_ebss, CONFIG_IDLETHREAD_STACKSIZE);
|
||||||
|
|||||||
@@ -58,10 +58,6 @@ ifeq ($(CONFIG_STACK_COLORATION),y)
|
|||||||
CMN_CSRCS += up_checkstack.c
|
CMN_CSRCS += up_checkstack.c
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(CONFIG_DEBUG_STACK),y)
|
|
||||||
CMN_CSRCS += up_checkstack.c
|
|
||||||
endif
|
|
||||||
|
|
||||||
CHIP_ASRCS =
|
CHIP_ASRCS =
|
||||||
CHIP_CSRCS = str71x_prccu.c str71x_lowputc.c str71x_decodeirq.c str71x_irq.c
|
CHIP_CSRCS = str71x_prccu.c str71x_lowputc.c str71x_decodeirq.c str71x_irq.c
|
||||||
CHIP_CSRCS += str71x_serial.c
|
CHIP_CSRCS += str71x_serial.c
|
||||||
|
|||||||
@@ -59,10 +59,6 @@ ifeq ($(CONFIG_STACK_COLORATION),y)
|
|||||||
CMN_CSRCS += up_checkstack.c
|
CMN_CSRCS += up_checkstack.c
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(CONFIG_DEBUG_STACK),y)
|
|
||||||
CMN_CSRCS += up_checkstack.c
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(CONFIG_BUILD_PROTECTED),y)
|
ifeq ($(CONFIG_BUILD_PROTECTED),y)
|
||||||
CMN_CSRCS += up_mpu.c up_task_start.c up_pthread_start.c
|
CMN_CSRCS += up_mpu.c up_task_start.c up_pthread_start.c
|
||||||
ifneq ($(CONFIG_DISABLE_SIGNALS),y)
|
ifneq ($(CONFIG_DISABLE_SIGNALS),y)
|
||||||
|
|||||||
@@ -62,10 +62,6 @@ ifeq ($(CONFIG_STACK_COLORATION),y)
|
|||||||
CMN_CSRCS += up_checkstack.c
|
CMN_CSRCS += up_checkstack.c
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(CONFIG_DEBUG_STACK),y)
|
|
||||||
CMN_CSRCS += up_checkstack.c
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(CONFIG_ARCH_ROMGETC),y)
|
ifeq ($(CONFIG_ARCH_ROMGETC),y)
|
||||||
CMN_CSRCS += up_romgetc.c
|
CMN_CSRCS += up_romgetc.c
|
||||||
endif
|
endif
|
||||||
|
|||||||
@@ -62,10 +62,6 @@ ifeq ($(CONFIG_STACK_COLORATION),y)
|
|||||||
CMN_CSRCS += up_checkstack.c
|
CMN_CSRCS += up_checkstack.c
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(CONFIG_DEBUG_STACK),y)
|
|
||||||
CMN_CSRCS += up_checkstack.c
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(CONFIG_ARCH_ROMGETC),y)
|
ifeq ($(CONFIG_ARCH_ROMGETC),y)
|
||||||
CMN_CSRCS += up_romgetc.c
|
CMN_CSRCS += up_romgetc.c
|
||||||
endif
|
endif
|
||||||
|
|||||||
@@ -53,11 +53,7 @@
|
|||||||
* Pre-processor Definitions
|
* Pre-processor Definitions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#if !defined(CONFIG_DEBUG)
|
#ifdef CONFIG_STACK_COLORATION
|
||||||
# undef CONFIG_DEBUG_STACK
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(CONFIG_DEBUG_STACK)) || defined(CONFIG_STACK_COLORATION)
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Public Data
|
* Public Data
|
||||||
@@ -199,4 +195,4 @@ size_t up_check_intstack_remain(void)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* CONFIG_DEBUG_STACK || CONFIG_STACK_COLORATION */
|
#endif /* CONFIG_STACK_COLORATION */
|
||||||
|
|||||||
@@ -120,11 +120,7 @@ int up_create_stack(FAR struct tcb_s *tcb, size_t stack_size, uint8_t ttype)
|
|||||||
* then create a zeroed stack to make stack dumps easier to trace.
|
* then create a zeroed stack to make stack dumps easier to trace.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined(CONFIG_DEBUG) && !(defined(CONFIG_DEBUG_STACK) || defined(CONFIG_STACK_COLORATION))
|
|
||||||
tcb->stack_alloc_ptr = (uint32_t *)kumm_zalloc(stack_size);
|
|
||||||
#else
|
|
||||||
tcb->stack_alloc_ptr = (uint32_t *)kumm_malloc(stack_size);
|
tcb->stack_alloc_ptr = (uint32_t *)kumm_malloc(stack_size);
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef CONFIG_DEBUG
|
#ifdef CONFIG_DEBUG
|
||||||
/* Was the allocation successful? */
|
/* Was the allocation successful? */
|
||||||
@@ -147,7 +143,7 @@ int up_create_stack(FAR struct tcb_s *tcb, size_t stack_size, uint8_t ttype)
|
|||||||
* water marks.
|
* water marks.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if (defined(CONFIG_DEBUG_STACK)) || defined(CONFIG_STACK_COLORATION))
|
#ifdef CONFIG_STACK_COLORATION
|
||||||
memset(tcb->stack_alloc_ptr, STACK_COLOR, stack_size);
|
memset(tcb->stack_alloc_ptr, STACK_COLOR, stack_size);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -65,12 +65,6 @@
|
|||||||
* Pre-processor Definitions
|
* Pre-processor Definitions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
/* Check if we can dump stack usage information */
|
|
||||||
|
|
||||||
#ifndef CONFIG_DEBUG
|
|
||||||
# undef CONFIG_DEBUG_STACK
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Private Data
|
* Private Data
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
@@ -208,7 +202,7 @@ void up_dumpstate(void)
|
|||||||
lldbg("IRQ stack:\n");
|
lldbg("IRQ stack:\n");
|
||||||
lldbg(" base: %04x\n", istackbase);
|
lldbg(" base: %04x\n", istackbase);
|
||||||
lldbg(" size: %04x\n", istacksize);
|
lldbg(" size: %04x\n", istacksize);
|
||||||
#if defined(CONFIG_DEBUG_STACK) || defined(CONFIG_STACK_COLORATION)
|
#ifdef CONFIG_STACK_COLORATION
|
||||||
lldbg(" used: %08x\n", up_check_intstack());
|
lldbg(" used: %08x\n", up_check_intstack());
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -237,7 +231,7 @@ void up_dumpstate(void)
|
|||||||
lldbg("User stack:\n");
|
lldbg("User stack:\n");
|
||||||
lldbg(" base: %04x\n", ustackbase);
|
lldbg(" base: %04x\n", ustackbase);
|
||||||
lldbg(" size: %04x\n", ustacksize);
|
lldbg(" size: %04x\n", ustacksize);
|
||||||
#if defined(CONFIG_DEBUG_STACK) || defined(CONFIG_STACK_COLORATION)
|
#ifdef CONFIG_STACK_COLORATION
|
||||||
lldbg(" used: %08x\n", up_check_tcbstack(rtcb));
|
lldbg(" used: %08x\n", up_check_tcbstack(rtcb));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -253,7 +247,7 @@ void up_dumpstate(void)
|
|||||||
lldbg("sp: %04x\n", sp);
|
lldbg("sp: %04x\n", sp);
|
||||||
lldbg("stack base: %04x\n", ustackbase);
|
lldbg("stack base: %04x\n", ustackbase);
|
||||||
lldbg("stack size: %04x\n", ustacksize);
|
lldbg("stack size: %04x\n", ustacksize);
|
||||||
#if defined(CONFIG_DEBUG_STACK) || defined(CONFIG_STACK_COLORATION)
|
#ifdef CONFIG_STACK_COLORATION
|
||||||
lldbg("stack used: %08x\n", up_check_tcbstack(rtcb));
|
lldbg("stack used: %08x\n", up_check_tcbstack(rtcb));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -111,7 +111,7 @@ int up_use_stack(struct tcb_s *tcb, void *stack, size_t stack_size)
|
|||||||
* that we can use later to test for high water marks.
|
* that we can use later to test for high water marks.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if (defined(CONFIG_DEBUG) && defined(CONFIG_DEBUG_STACK)) || defined(CONFIG_STACK_COLORATION))
|
#ifdef CONFIG_STACK_COLORATION
|
||||||
memset(tcb->stack_alloc_ptr, STACK_COLOR, stack_size);
|
memset(tcb->stack_alloc_ptr, STACK_COLOR, stack_size);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -129,22 +129,14 @@ int up_create_stack(FAR struct tcb_s *tcb, size_t stack_size, uint8_t ttype)
|
|||||||
|
|
||||||
if (ttype == TCB_FLAG_TTYPE_KERNEL)
|
if (ttype == TCB_FLAG_TTYPE_KERNEL)
|
||||||
{
|
{
|
||||||
#if defined(CONFIG_DEBUG) && !(defined(CONFIG_DEBUG_STACK) || defined(CONFIG_STACK_COLORATION))
|
|
||||||
tcb->stack_alloc_ptr = (uint32_t *)kmm_zalloc(stack_size);
|
|
||||||
#else
|
|
||||||
tcb->stack_alloc_ptr = (uint32_t *)kmm_malloc(stack_size);
|
tcb->stack_alloc_ptr = (uint32_t *)kmm_malloc(stack_size);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
/* Use the user-space allocator if this is a task or pthread */
|
/* Use the user-space allocator if this is a task or pthread */
|
||||||
|
|
||||||
#if defined(CONFIG_DEBUG) && !(defined(CONFIG_DEBUG_STACK) || defined(CONFIG_STACK_COLORATION))
|
|
||||||
tcb->stack_alloc_ptr = (uint32_t *)kumm_zalloc(stack_size);
|
|
||||||
#else
|
|
||||||
tcb->stack_alloc_ptr = (uint32_t *)kumm_malloc(stack_size);
|
tcb->stack_alloc_ptr = (uint32_t *)kumm_malloc(stack_size);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_DEBUG
|
#ifdef CONFIG_DEBUG
|
||||||
@@ -169,7 +161,7 @@ int up_create_stack(FAR struct tcb_s *tcb, size_t stack_size, uint8_t ttype)
|
|||||||
* water marks.
|
* water marks.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if (defined(CONFIG_DEBUG) && defined(CONFIG_DEBUG_STACK)) || defined(CONFIG_STACK_COLORATION)
|
#ifdef CONFIG_STACK_COLORATION
|
||||||
memset(tcb->stack_alloc_ptr, STACK_COLOR, stack_size);
|
memset(tcb->stack_alloc_ptr, STACK_COLOR, stack_size);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -65,12 +65,6 @@
|
|||||||
* Pre-processor Definitions
|
* Pre-processor Definitions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
/* Check if we can dump stack usage information */
|
|
||||||
|
|
||||||
#ifndef CONFIG_DEBUG
|
|
||||||
# undef CONFIG_DEBUG_STACK
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Private Data
|
* Private Data
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
@@ -185,7 +179,7 @@ void up_dumpstate(void)
|
|||||||
lldbg("IRQ stack:\n");
|
lldbg("IRQ stack:\n");
|
||||||
lldbg(" base: %08x\n", istackbase);
|
lldbg(" base: %08x\n", istackbase);
|
||||||
lldbg(" size: %08x\n", istacksize);
|
lldbg(" size: %08x\n", istacksize);
|
||||||
#if defined(CONFIG_DEBUG_STACK) || defined(CONFIG_STACK_COLORATION)
|
#ifdef CONFIG_STACK_COLORATION
|
||||||
lldbg(" used: %08x\n", up_check_intstack());
|
lldbg(" used: %08x\n", up_check_intstack());
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -214,7 +208,7 @@ void up_dumpstate(void)
|
|||||||
lldbg("User stack:\n");
|
lldbg("User stack:\n");
|
||||||
lldbg(" base: %08x\n", ustackbase);
|
lldbg(" base: %08x\n", ustackbase);
|
||||||
lldbg(" size: %08x\n", ustacksize);
|
lldbg(" size: %08x\n", ustacksize);
|
||||||
#if defined(CONFIG_DEBUG_STACK) || defined(CONFIG_STACK_COLORATION)
|
#ifdef CONFIG_STACK_COLORATION
|
||||||
lldbg(" used: %08x\n", up_check_tcbstack(rtcb));
|
lldbg(" used: %08x\n", up_check_tcbstack(rtcb));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -230,7 +224,7 @@ void up_dumpstate(void)
|
|||||||
lldbg("sp: %08x\n", sp);
|
lldbg("sp: %08x\n", sp);
|
||||||
lldbg("stack base: %08x\n", ustackbase);
|
lldbg("stack base: %08x\n", ustackbase);
|
||||||
lldbg("stack size: %08x\n", ustacksize);
|
lldbg("stack size: %08x\n", ustacksize);
|
||||||
#if defined(CONFIG_DEBUG_STACK) || defined(CONFIG_STACK_COLORATION)
|
#ifdef CONFIG_STACK_COLORATION
|
||||||
lldbg("stack used: %08x\n", up_check_tcbstack(rtcb));
|
lldbg("stack used: %08x\n", up_check_tcbstack(rtcb));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -111,7 +111,7 @@ int up_use_stack(struct tcb_s *tcb, void *stack, size_t stack_size)
|
|||||||
* that we can use later to test for high water marks.
|
* that we can use later to test for high water marks.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if (defined(CONFIG_DEBUG) && defined(CONFIG_DEBUG_STACK)) || defined(CONFIG_STACK_COLORATION)
|
#ifdef CONFIG_STACK_COLORATION
|
||||||
memset(tcb->stack_alloc_ptr, STACK_COLOR, stack_size);
|
memset(tcb->stack_alloc_ptr, STACK_COLOR, stack_size);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -141,7 +141,7 @@ static void up_calibratedelay(void)
|
|||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#if (defined(CONFIG_DEBUG_STACK) || defined(CONFIG_STACK_COLORATION)) && CONFIG_ARCH_INTERRUPTSTACK > 3
|
#if defined(CONFIG_STACK_COLORATION) && CONFIG_ARCH_INTERRUPTSTACK > 3
|
||||||
static inline void up_color_intstack(void)
|
static inline void up_color_intstack(void)
|
||||||
{
|
{
|
||||||
uint8_t *ptr = (uint8_t *)&g_intstackalloc;
|
uint8_t *ptr = (uint8_t *)&g_intstackalloc;
|
||||||
|
|||||||
@@ -126,22 +126,14 @@ int up_create_stack(FAR struct tcb_s *tcb, size_t stack_size, uint8_t ttype)
|
|||||||
|
|
||||||
if (ttype == TCB_FLAG_TTYPE_KERNEL)
|
if (ttype == TCB_FLAG_TTYPE_KERNEL)
|
||||||
{
|
{
|
||||||
#if defined(CONFIG_DEBUG) && !defined(CONFIG_DEBUG_STACK)
|
|
||||||
tcb->stack_alloc_ptr = (uint32_t *)kmm_zalloc(stack_size);
|
|
||||||
#else
|
|
||||||
tcb->stack_alloc_ptr = (uint32_t *)kmm_malloc(stack_size);
|
tcb->stack_alloc_ptr = (uint32_t *)kmm_malloc(stack_size);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
/* Use the user-space allocator if this is a task or pthread */
|
/* Use the user-space allocator if this is a task or pthread */
|
||||||
|
|
||||||
#if defined(CONFIG_DEBUG) && !defined(CONFIG_DEBUG_STACK)
|
|
||||||
tcb->stack_alloc_ptr = (uint32_t *)kumm_zalloc(stack_size);
|
|
||||||
#else
|
|
||||||
tcb->stack_alloc_ptr = (uint32_t *)kumm_malloc(stack_size);
|
tcb->stack_alloc_ptr = (uint32_t *)kumm_malloc(stack_size);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_DEBUG
|
#ifdef CONFIG_DEBUG
|
||||||
@@ -166,7 +158,7 @@ int up_create_stack(FAR struct tcb_s *tcb, size_t stack_size, uint8_t ttype)
|
|||||||
* water marks.
|
* water marks.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined(CONFIG_DEBUG) && defined(CONFIG_DEBUG_STACK)
|
#ifdef CONFIG_STACK_COLORATION
|
||||||
memset(tcb->stack_alloc_ptr, 0xaa, stack_size);
|
memset(tcb->stack_alloc_ptr, 0xaa, stack_size);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -147,22 +147,14 @@ int up_create_stack(FAR struct tcb_s *tcb, size_t stack_size, uint8_t ttype)
|
|||||||
|
|
||||||
if (ttype == TCB_FLAG_TTYPE_KERNEL)
|
if (ttype == TCB_FLAG_TTYPE_KERNEL)
|
||||||
{
|
{
|
||||||
#if defined(CONFIG_DEBUG) && !defined(CONFIG_DEBUG_STACK)
|
|
||||||
tcb->stack_alloc_ptr = (uint32_t *)kmm_zalloc(stack_size);
|
|
||||||
#else
|
|
||||||
tcb->stack_alloc_ptr = (uint32_t *)kmm_malloc(stack_size);
|
tcb->stack_alloc_ptr = (uint32_t *)kmm_malloc(stack_size);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
/* Use the user-space allocator if this is a task or pthread */
|
/* Use the user-space allocator if this is a task or pthread */
|
||||||
|
|
||||||
#if defined(CONFIG_DEBUG) && !defined(CONFIG_DEBUG_STACK)
|
|
||||||
tcb->stack_alloc_ptr = (uint32_t *)kumm_zalloc(stack_size);
|
|
||||||
#else
|
|
||||||
tcb->stack_alloc_ptr = (uint32_t *)kumm_malloc(stack_size);
|
tcb->stack_alloc_ptr = (uint32_t *)kumm_malloc(stack_size);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_DEBUG
|
#ifdef CONFIG_DEBUG
|
||||||
@@ -187,7 +179,7 @@ int up_create_stack(FAR struct tcb_s *tcb, size_t stack_size, uint8_t ttype)
|
|||||||
* water marks.
|
* water marks.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined(CONFIG_DEBUG) && defined(CONFIG_DEBUG_STACK)
|
#ifdef CONFIG_STACK_COLORATION
|
||||||
memset(tcb->stack_alloc_ptr, 0xaa, stack_size);
|
memset(tcb->stack_alloc_ptr, 0xaa, stack_size);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -126,22 +126,14 @@ int up_create_stack(FAR struct tcb_s *tcb, size_t stack_size, uint8_t ttype)
|
|||||||
|
|
||||||
if (ttype == TCB_FLAG_TTYPE_KERNEL)
|
if (ttype == TCB_FLAG_TTYPE_KERNEL)
|
||||||
{
|
{
|
||||||
#if defined(CONFIG_DEBUG) && !defined(CONFIG_DEBUG_STACK)
|
|
||||||
tcb->stack_alloc_ptr = (uint32_t *)kmm_zalloc(stack_size);
|
|
||||||
#else
|
|
||||||
tcb->stack_alloc_ptr = (uint32_t *)kmm_malloc(stack_size);
|
tcb->stack_alloc_ptr = (uint32_t *)kmm_malloc(stack_size);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
/* Use the user-space allocator if this is a task or pthread */
|
/* Use the user-space allocator if this is a task or pthread */
|
||||||
|
|
||||||
#if defined(CONFIG_DEBUG) && !defined(CONFIG_DEBUG_STACK)
|
|
||||||
tcb->stack_alloc_ptr = (uint32_t *)kumm_zalloc(stack_size);
|
|
||||||
#else
|
|
||||||
tcb->stack_alloc_ptr = (uint32_t *)kumm_malloc(stack_size);
|
tcb->stack_alloc_ptr = (uint32_t *)kumm_malloc(stack_size);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_DEBUG
|
#ifdef CONFIG_DEBUG
|
||||||
@@ -166,7 +158,7 @@ int up_create_stack(FAR struct tcb_s *tcb, size_t stack_size, uint8_t ttype)
|
|||||||
* water marks.
|
* water marks.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined(CONFIG_DEBUG) && defined(CONFIG_DEBUG_STACK)
|
#ifdef CONFIG_STACK_COLORATION
|
||||||
memset(tcb->stack_alloc_ptr, 0xaa, stack_size);
|
memset(tcb->stack_alloc_ptr, 0xaa, stack_size);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user