Skip to content

Commit 853e5fc

Browse files
committed
atmel-samd: Ensure at least 2k is left for the stack.
1 parent 306c921 commit 853e5fc

2 files changed

Lines changed: 16 additions & 0 deletions

File tree

atmel-samd/boards/samd21x18-bootloader.ld

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,5 +64,13 @@ SECTIONS
6464
_ebss = .;
6565
} >RAM
6666

67+
/* this just checks there is enough RAM for a minimal stack */
68+
.stack :
69+
{
70+
. = ALIGN(4);
71+
. = . + 0x800; /* Reserve a minimum of 2K for the stack. */
72+
. = ALIGN(4);
73+
} >RAM
74+
6775
.ARM.attributes 0 : { *(.ARM.attributes) }
6876
}

atmel-samd/boards/samd21x18.ld

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,5 +63,13 @@ SECTIONS
6363
_ebss = .;
6464
} >RAM
6565

66+
/* this just checks there is enough RAM for a minimal stack */
67+
.stack :
68+
{
69+
. = ALIGN(4);
70+
. = . + 0x800; /* Reserve a minimum of 2K for the stack. */
71+
. = ALIGN(4);
72+
} >RAM
73+
6674
.ARM.attributes 0 : { *(.ARM.attributes) }
6775
}

0 commit comments

Comments
 (0)