Skip to content

Commit 4714f43

Browse files
Norbert Fabritiusadamgreig
Norbert Fabritius
authored andcommitted
Fix _ram_start and _ram_end order
1 parent 71187f6 commit 4714f43

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

cortex-m-rt/link.x.in

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,9 @@ PROVIDE(__pre_init = DefaultPreInit);
6060
/* # Sections */
6161
SECTIONS
6262
{
63-
PROVIDE(_ram_start = ORIGIN(RAM) + LENGTH(RAM));
64-
PROVIDE(_ram_end = ORIGIN(RAM));
65-
PROVIDE(_stack_start = _ram_start);
63+
PROVIDE(_ram_start = ORIGIN(RAM));
64+
PROVIDE(_ram_end = ORIGIN(RAM) + LENGTH(RAM));
65+
PROVIDE(_stack_start = _ram_end);
6666

6767
/* ## Sections in FLASH */
6868
/* ### Vector table */

cortex-m-rt/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -517,8 +517,8 @@ cfg_global_asm! {
517517
// If enabled, initialize RAM with zeros. This is normally not necessary but might be required
518518
// on custom hardware.
519519
#[cfg(feature = "zero-init-ram")]
520-
"ldr r0, =_ram_end
521-
ldr r1, =_ram_start
520+
"ldr r0, =_ram_start
521+
ldr r1, =_ram_end
522522
movs r2, #0
523523
0:
524524
cmp r1, r0

0 commit comments

Comments
 (0)