You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by we...@apache.org on 2015/12/10 01:57:03 UTC
[2/2] incubator-mynewt-larva git commit: Get additional 32K of RAM on
nrf52. See errata #33 and #34
Get additional 32K of RAM on nrf52. See errata #33 and #34
Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/commit/acbd147d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/tree/acbd147d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/diff/acbd147d
Branch: refs/heads/master
Commit: acbd147dae0fe9f0ac90b81160042b002094ad6b
Parents: 1d324a7
Author: wes3 <wi...@micosa.io>
Authored: Wed Dec 9 11:09:54 2015 -0800
Committer: wes3 <wi...@micosa.io>
Committed: Wed Dec 9 16:56:56 2015 -0800
----------------------------------------------------------------------
hw/bsp/nrf52pdk/nrf52pdk.ld | 25 ++++++++++++++++---------
1 file changed, 16 insertions(+), 9 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/blob/acbd147d/hw/bsp/nrf52pdk/nrf52pdk.ld
----------------------------------------------------------------------
diff --git a/hw/bsp/nrf52pdk/nrf52pdk.ld b/hw/bsp/nrf52pdk/nrf52pdk.ld
index 8be5b6a..144ea23 100755
--- a/hw/bsp/nrf52pdk/nrf52pdk.ld
+++ b/hw/bsp/nrf52pdk/nrf52pdk.ld
@@ -33,10 +33,17 @@
*/
OUTPUT_FORMAT ("elf32-littlearm", "elf32-bigarm", "elf32-littlearm")
+/*
+ * NOTE: This linker script is for version 1.0 of the nrf52. See
+ * errata #33 and #34 on nordic infocenter website for details. This errata
+ * causes us to allocate a memory regision we call "CODE_RAM" so that we can
+ * access the full 64K RAM provided by the chip.
+ */
MEMORY
{
FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 0x80000
- RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x8000
+ RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x8000
+ CODE_RAM (rwx) : ORIGIN = 0x8000000, LENGTH = 0x8000
}
/* Linker script to place sections and symbol values. Should be used together
@@ -168,20 +175,20 @@ SECTIONS
__bss_end__ = .;
} > RAM
- /* Heap starts after BSS */
- __HeapBase = .;
-
/* .stack_dummy section doesn't contains any symbols. It is only
* used for linker to calculate size of stack sections, and assign
* values to stack symbols later */
.stack_dummy (COPY):
{
*(.stack*)
- } > RAM
-
- /* Set stack top to end of RAM, and stack limit move down by
- * size of stack_dummy section */
- __StackTop = ORIGIN(RAM) + LENGTH(RAM);
+ } > CODE_RAM
+
+ /*
+ * Place heap and stack in CODE_RAM. Heap is at start, stack is at the
+ * top and stack limit is the bottom of the stack.
+ */
+ __HeapBase = ORIGIN(CODE_RAM);
+ __StackTop = ORIGIN(CODE_RAM) + LENGTH(CODE_RAM);
__StackLimit = __StackTop - SIZEOF(.stack_dummy);
PROVIDE(__stack = __StackTop);