diff options
-rw-r--r-- | cortex-m-rt/link.x.in | 6 | ||||
-rw-r--r-- | cortex-m-rt/src/lib.rs | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/cortex-m-rt/link.x.in b/cortex-m-rt/link.x.in index f699dec..01bef98 100644 --- a/cortex-m-rt/link.x.in +++ b/cortex-m-rt/link.x.in @@ -60,9 +60,9 @@ PROVIDE(__pre_init = DefaultPreInit); /* # Sections */ SECTIONS { - PROVIDE(_ram_start = ORIGIN(RAM) + LENGTH(RAM)); - PROVIDE(_ram_end = ORIGIN(RAM)); - PROVIDE(_stack_start = _ram_start); + PROVIDE(_ram_start = ORIGIN(RAM)); + PROVIDE(_ram_end = ORIGIN(RAM) + LENGTH(RAM)); + PROVIDE(_stack_start = _ram_end); /* ## Sections in FLASH */ /* ### Vector table */ diff --git a/cortex-m-rt/src/lib.rs b/cortex-m-rt/src/lib.rs index 96d89dd..b90b124 100644 --- a/cortex-m-rt/src/lib.rs +++ b/cortex-m-rt/src/lib.rs @@ -517,8 +517,8 @@ cfg_global_asm! { // If enabled, initialize RAM with zeros. This is normally not necessary but might be required // on custom hardware. #[cfg(feature = "zero-init-ram")] - "ldr r0, =_ram_end - ldr r1, =_ram_start + "ldr r0, =_ram_start + ldr r1, =_ram_end movs r2, #0 0: cmp r1, r0 |