diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2011-06-15 23:54:25 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2011-06-15 23:54:25 +0000 |
commit | c70a8e40fe9eed5b9c5460d1b4a4160f20d7e72c (patch) | |
tree | 4072756cd5eaa266c4ee4f6527a7a3369e5e3b69 | |
parent | ebcd165244ce88f7c34d483f0aee8acbfaad112f (diff) | |
download | nuttx-c70a8e40fe9eed5b9c5460d1b4a4160f20d7e72c.tar.gz nuttx-c70a8e40fe9eed5b9c5460d1b4a4160f20d7e72c.tar.bz2 nuttx-c70a8e40fe9eed5b9c5460d1b4a4160f20d7e72c.zip |
Make room for the noinit section before the heap
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3710 42af7a65-404d-4744-a932-0658087f49c3
-rwxr-xr-x | nuttx/arch/avr/src/at90usb/at90usb_head.S | 12 | ||||
-rwxr-xr-x | nuttx/arch/avr/src/atmega/atmega_head.S | 12 | ||||
-rw-r--r-- | nuttx/arch/avr/src/avr/up_dumpstate.c | 6 | ||||
-rw-r--r-- | nuttx/configs/amber/hello/ld.script | 2 | ||||
-rw-r--r-- | nuttx/configs/amber/ostest/ld.script | 2 | ||||
-rw-r--r-- | nuttx/configs/micropendous3/hello/ld.script | 2 | ||||
-rw-r--r-- | nuttx/configs/micropendous3/ostest/ld.script | 2 |
7 files changed, 19 insertions, 19 deletions
diff --git a/nuttx/arch/avr/src/at90usb/at90usb_head.S b/nuttx/arch/avr/src/at90usb/at90usb_head.S index 49b0e0e90..a3f56245f 100755 --- a/nuttx/arch/avr/src/at90usb/at90usb_head.S +++ b/nuttx/arch/avr/src/at90usb/at90usb_head.S @@ -46,9 +46,9 @@ * Pre-processor definitions ****************************************************************************/ -/* Stack is allocated just after .bss and before the heap */ +/* Stack is allocated just after uninitialized data and just before the heap */ -#define STACKBASE (_ebss+CONFIG_IDLETHREAD_STACKSIZE-1) +#define STACKBASE (_enoinit+CONFIG_IDLETHREAD_STACKSIZE-1) /* The RAMPZ register is only available for CPUs with more than 64Kb of FLASH. * Only the AT90USB646, 647, 1286, and 1287 are supported by this file. @@ -72,6 +72,7 @@ .global _sdata /* Start of .data section in RAM */ .global _edata /* End of .data section in RAM */ .global _eronly /* Start of .data section in FLASH */ + .global _enoinit /* End of uninitialized data. Defined by ld.script */ .global up_lowinit /* Perform low level initialization */ .global os_start /* NuttX entry point */ @@ -263,15 +264,14 @@ __do_clear_bss: * Heap Base ****************************************************************************/ - /* This global variable is unsigned long g_heapbase and is - * exported from here only because of its coupling to other - * uses of _ebss in this file + /* This global variable is unsigned long g_heapbase and is exported from + * here only because of its coupling to other uses of _enoinit in this file */ .data .globl g_heapbase .type g_heapbase, object g_heapbase: - .word _ebss+CONFIG_IDLETHREAD_STACKSIZE + .word _enoinit+CONFIG_IDLETHREAD_STACKSIZE .size g_heapbase, .-g_heapbase .end diff --git a/nuttx/arch/avr/src/atmega/atmega_head.S b/nuttx/arch/avr/src/atmega/atmega_head.S index cad7e54c8..9b6581ce7 100755 --- a/nuttx/arch/avr/src/atmega/atmega_head.S +++ b/nuttx/arch/avr/src/atmega/atmega_head.S @@ -47,9 +47,9 @@ * Pre-processor definitions ****************************************************************************/ -/* Stack is allocated just after .bss and before the heap */ +/* Stack is allocated just after uninitialized data and just before the heap */ -#define STACKBASE (_ebss+CONFIG_IDLETHREAD_STACKSIZE-4) +#define STACKBASE (_enoinit+CONFIG_IDLETHREAD_STACKSIZE-1) /* The RAMPZ register is only available for CPUs with more than 64Kb of FLASH. * At present, only the ATMega128 is supported so RAMPZ should always be @@ -72,6 +72,7 @@ .global _sdata /* Start of .data section in RAM */ .global _edata /* End of .data section in RAM */ .global _eronly /* Start of .data section in FLASH */ + .global _enoinit /* End of uninitilized data. Defined by ld.script */ .global up_lowinit /* Perform low level initialization */ .global os_start /* NuttX entry point */ @@ -257,15 +258,14 @@ __do_clear_bss: * Heap Base ****************************************************************************/ - /* This global variable is unsigned long g_heapbase and is - * exported from here only because of its coupling to other - * uses of _ebss in this file + /* This global variable is unsigned long g_heapbase and is exported from + * here only because of its coupling to other uses of _enoinit in this file */ .data .globl g_heapbase .type g_heapbase, object g_heapbase: - .word _ebss+CONFIG_IDLETHREAD_STACKSIZE + .word _enoinit+CONFIG_IDLETHREAD_STACKSIZE .size g_heapbase, .-g_heapbase .end diff --git a/nuttx/arch/avr/src/avr/up_dumpstate.c b/nuttx/arch/avr/src/avr/up_dumpstate.c index 2e3af537b..e22aa8f8b 100644 --- a/nuttx/arch/avr/src/avr/up_dumpstate.c +++ b/nuttx/arch/avr/src/avr/up_dumpstate.c @@ -181,7 +181,7 @@ void up_dumpstate(void) if (rtcb->pid == 0) { - ustackbase = g_heapbase - 4; + ustackbase = g_heapbase - 1; ustacksize = CONFIG_IDLETHREAD_STACKSIZE; } else @@ -193,8 +193,8 @@ void up_dumpstate(void) /* Get the limits on the interrupt stack memory */ #if CONFIG_ARCH_INTERRUPTSTACK > 0 - istackbase = (uint16_t)&g_intstackbase; - istacksize = (CONFIG_ARCH_INTERRUPTSTACK & ~3) - 4; + istackbase = (uint16_t)&g_intstackbase - 1; + istacksize = CONFIG_ARCH_INTERRUPTSTACK; /* Show interrupt stack info */ diff --git a/nuttx/configs/amber/hello/ld.script b/nuttx/configs/amber/hello/ld.script index 1a44e69dd..4815e4ec0 100644 --- a/nuttx/configs/amber/hello/ld.script +++ b/nuttx/configs/amber/hello/ld.script @@ -125,7 +125,7 @@ SECTIONS _etext = . ; } > flash - _eronly = ABSOLUTE(.); /* See below */ + _eronly = ABSOLUTE(.); .data : { diff --git a/nuttx/configs/amber/ostest/ld.script b/nuttx/configs/amber/ostest/ld.script index 6ea2c6c65..e228940de 100644 --- a/nuttx/configs/amber/ostest/ld.script +++ b/nuttx/configs/amber/ostest/ld.script @@ -125,7 +125,7 @@ SECTIONS _etext = . ; } > flash - _eronly = ABSOLUTE(.); /* See below */ + _eronly = ABSOLUTE(.); .data : { diff --git a/nuttx/configs/micropendous3/hello/ld.script b/nuttx/configs/micropendous3/hello/ld.script index fe5341ac7..72eb6f585 100644 --- a/nuttx/configs/micropendous3/hello/ld.script +++ b/nuttx/configs/micropendous3/hello/ld.script @@ -125,7 +125,7 @@ SECTIONS _etext = . ; } > flash - _eronly = ABSOLUTE(.); /* See below */ + _eronly = ABSOLUTE(.); .data : { diff --git a/nuttx/configs/micropendous3/ostest/ld.script b/nuttx/configs/micropendous3/ostest/ld.script index 4f4611ed6..b2b154dfe 100644 --- a/nuttx/configs/micropendous3/ostest/ld.script +++ b/nuttx/configs/micropendous3/ostest/ld.script @@ -125,7 +125,7 @@ SECTIONS _etext = . ; } > flash - _eronly = ABSOLUTE(.); /* See below */ + _eronly = ABSOLUTE(.); .data : { |