summaryrefslogtreecommitdiff
path: root/nuttx/arch/avr
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2015-01-24 06:49:51 -0600
committerGregory Nutt <gnutt@nuttx.org>2015-01-24 06:49:51 -0600
commit0b34d78f7f3cf30969bdf12ad24f64aaa2dd28e0 (patch)
tree6c121a2ca991c45b2f33b0ae190da802c5b0cce3 /nuttx/arch/avr
parent7b8e6ff54398eab1bc9f205ca7e9719228ef4526 (diff)
downloadpx4-nuttx-0b34d78f7f3cf30969bdf12ad24f64aaa2dd28e0.tar.gz
px4-nuttx-0b34d78f7f3cf30969bdf12ad24f64aaa2dd28e0.tar.bz2
px4-nuttx-0b34d78f7f3cf30969bdf12ad24f64aaa2dd28e0.zip
Remove CONFIG_DEBUG_STACK. Adding CONFIG_STACK_COLORATION makes this configuration option pointless
Diffstat (limited to 'nuttx/arch/avr')
-rw-r--r--nuttx/arch/avr/src/at90usb/Make.defs4
-rw-r--r--nuttx/arch/avr/src/atmega/Make.defs4
-rw-r--r--nuttx/arch/avr/src/avr/up_checkstack.c8
-rw-r--r--nuttx/arch/avr/src/avr/up_createstack.c6
-rw-r--r--nuttx/arch/avr/src/avr/up_dumpstate.c12
-rw-r--r--nuttx/arch/avr/src/avr/up_usestack.c2
-rw-r--r--nuttx/arch/avr/src/avr32/up_createstack.c10
-rw-r--r--nuttx/arch/avr/src/avr32/up_dumpstate.c12
-rw-r--r--nuttx/arch/avr/src/avr32/up_usestack.c2
-rw-r--r--nuttx/arch/avr/src/common/up_initialize.c2
10 files changed, 13 insertions, 49 deletions
diff --git a/nuttx/arch/avr/src/at90usb/Make.defs b/nuttx/arch/avr/src/at90usb/Make.defs
index a7e1526ac..50245c338 100644
--- a/nuttx/arch/avr/src/at90usb/Make.defs
+++ b/nuttx/arch/avr/src/at90usb/Make.defs
@@ -62,10 +62,6 @@ ifeq ($(CONFIG_STACK_COLORATION),y)
CMN_CSRCS += up_checkstack.c
endif
-ifeq ($(CONFIG_DEBUG_STACK),y)
-CMN_CSRCS += up_checkstack.c
-endif
-
ifeq ($(CONFIG_ARCH_ROMGETC),y)
CMN_CSRCS += up_romgetc.c
endif
diff --git a/nuttx/arch/avr/src/atmega/Make.defs b/nuttx/arch/avr/src/atmega/Make.defs
index e61ef3ecc..c2d679b7d 100644
--- a/nuttx/arch/avr/src/atmega/Make.defs
+++ b/nuttx/arch/avr/src/atmega/Make.defs
@@ -62,10 +62,6 @@ ifeq ($(CONFIG_STACK_COLORATION),y)
CMN_CSRCS += up_checkstack.c
endif
-ifeq ($(CONFIG_DEBUG_STACK),y)
-CMN_CSRCS += up_checkstack.c
-endif
-
ifeq ($(CONFIG_ARCH_ROMGETC),y)
CMN_CSRCS += up_romgetc.c
endif
diff --git a/nuttx/arch/avr/src/avr/up_checkstack.c b/nuttx/arch/avr/src/avr/up_checkstack.c
index da7697be4..eb5f22d74 100644
--- a/nuttx/arch/avr/src/avr/up_checkstack.c
+++ b/nuttx/arch/avr/src/avr/up_checkstack.c
@@ -53,11 +53,7 @@
* Pre-processor Definitions
****************************************************************************/
-#if !defined(CONFIG_DEBUG)
-# undef CONFIG_DEBUG_STACK
-#endif
-
-#if defined(CONFIG_DEBUG_STACK)) || defined(CONFIG_STACK_COLORATION)
+#ifdef CONFIG_STACK_COLORATION
/****************************************************************************
* Public Data
@@ -199,4 +195,4 @@ size_t up_check_intstack_remain(void)
}
#endif
-#endif /* CONFIG_DEBUG_STACK || CONFIG_STACK_COLORATION */
+#endif /* CONFIG_STACK_COLORATION */
diff --git a/nuttx/arch/avr/src/avr/up_createstack.c b/nuttx/arch/avr/src/avr/up_createstack.c
index ff3d26d01..0b5e4ab93 100644
--- a/nuttx/arch/avr/src/avr/up_createstack.c
+++ b/nuttx/arch/avr/src/avr/up_createstack.c
@@ -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.
*/
-#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);
-#endif
#ifdef CONFIG_DEBUG
/* 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.
*/
-#if (defined(CONFIG_DEBUG_STACK)) || defined(CONFIG_STACK_COLORATION))
+#ifdef CONFIG_STACK_COLORATION
memset(tcb->stack_alloc_ptr, STACK_COLOR, stack_size);
#endif
diff --git a/nuttx/arch/avr/src/avr/up_dumpstate.c b/nuttx/arch/avr/src/avr/up_dumpstate.c
index 1049c1fac..1f77c899a 100644
--- a/nuttx/arch/avr/src/avr/up_dumpstate.c
+++ b/nuttx/arch/avr/src/avr/up_dumpstate.c
@@ -65,12 +65,6 @@
* Pre-processor Definitions
****************************************************************************/
-/* Check if we can dump stack usage information */
-
-#ifndef CONFIG_DEBUG
-# undef CONFIG_DEBUG_STACK
-#endif
-
/****************************************************************************
* Private Data
****************************************************************************/
@@ -208,7 +202,7 @@ void up_dumpstate(void)
lldbg("IRQ stack:\n");
lldbg(" base: %04x\n", istackbase);
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());
#endif
@@ -237,7 +231,7 @@ void up_dumpstate(void)
lldbg("User stack:\n");
lldbg(" base: %04x\n", ustackbase);
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));
#endif
@@ -253,7 +247,7 @@ void up_dumpstate(void)
lldbg("sp: %04x\n", sp);
lldbg("stack base: %04x\n", ustackbase);
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));
#endif
diff --git a/nuttx/arch/avr/src/avr/up_usestack.c b/nuttx/arch/avr/src/avr/up_usestack.c
index 7113971a4..84817e356 100644
--- a/nuttx/arch/avr/src/avr/up_usestack.c
+++ b/nuttx/arch/avr/src/avr/up_usestack.c
@@ -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.
*/
-#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);
#endif
diff --git a/nuttx/arch/avr/src/avr32/up_createstack.c b/nuttx/arch/avr/src/avr32/up_createstack.c
index be5e37e7e..2956dd451 100644
--- a/nuttx/arch/avr/src/avr32/up_createstack.c
+++ b/nuttx/arch/avr/src/avr32/up_createstack.c
@@ -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 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);
-#endif
}
else
#endif
{
/* 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);
-#endif
}
#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.
*/
-#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);
#endif
diff --git a/nuttx/arch/avr/src/avr32/up_dumpstate.c b/nuttx/arch/avr/src/avr32/up_dumpstate.c
index 6884a037d..4bba418b8 100644
--- a/nuttx/arch/avr/src/avr32/up_dumpstate.c
+++ b/nuttx/arch/avr/src/avr32/up_dumpstate.c
@@ -65,12 +65,6 @@
* Pre-processor Definitions
****************************************************************************/
-/* Check if we can dump stack usage information */
-
-#ifndef CONFIG_DEBUG
-# undef CONFIG_DEBUG_STACK
-#endif
-
/****************************************************************************
* Private Data
****************************************************************************/
@@ -185,7 +179,7 @@ void up_dumpstate(void)
lldbg("IRQ stack:\n");
lldbg(" base: %08x\n", istackbase);
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());
#endif
@@ -214,7 +208,7 @@ void up_dumpstate(void)
lldbg("User stack:\n");
lldbg(" base: %08x\n", ustackbase);
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));
#endif
@@ -230,7 +224,7 @@ void up_dumpstate(void)
lldbg("sp: %08x\n", sp);
lldbg("stack base: %08x\n", ustackbase);
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));
#endif
diff --git a/nuttx/arch/avr/src/avr32/up_usestack.c b/nuttx/arch/avr/src/avr32/up_usestack.c
index 5c43c54d6..8e7f398c0 100644
--- a/nuttx/arch/avr/src/avr32/up_usestack.c
+++ b/nuttx/arch/avr/src/avr32/up_usestack.c
@@ -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.
*/
-#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);
#endif
diff --git a/nuttx/arch/avr/src/common/up_initialize.c b/nuttx/arch/avr/src/common/up_initialize.c
index 92297d066..991e0a084 100644
--- a/nuttx/arch/avr/src/common/up_initialize.c
+++ b/nuttx/arch/avr/src/common/up_initialize.c
@@ -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)
{
uint8_t *ptr = (uint8_t *)&g_intstackalloc;