From 853e5fc652a50a5424ef62495fcbf962df7650c3 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Mon, 17 Oct 2016 15:10:00 -0700 Subject: atmel-samd: Ensure at least 2k is left for the stack. --- atmel-samd/boards/samd21x18-bootloader.ld | 8 ++++++++ atmel-samd/boards/samd21x18.ld | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/atmel-samd/boards/samd21x18-bootloader.ld b/atmel-samd/boards/samd21x18-bootloader.ld index 89ff084fb..b43c292b1 100644 --- a/atmel-samd/boards/samd21x18-bootloader.ld +++ b/atmel-samd/boards/samd21x18-bootloader.ld @@ -64,5 +64,13 @@ SECTIONS _ebss = .; } >RAM + /* this just checks there is enough RAM for a minimal stack */ + .stack : + { + . = ALIGN(4); + . = . + 0x800; /* Reserve a minimum of 2K for the stack. */ + . = ALIGN(4); + } >RAM + .ARM.attributes 0 : { *(.ARM.attributes) } } diff --git a/atmel-samd/boards/samd21x18.ld b/atmel-samd/boards/samd21x18.ld index 0f1168c57..995d2754f 100644 --- a/atmel-samd/boards/samd21x18.ld +++ b/atmel-samd/boards/samd21x18.ld @@ -63,5 +63,13 @@ SECTIONS _ebss = .; } >RAM + /* this just checks there is enough RAM for a minimal stack */ + .stack : + { + . = ALIGN(4); + . = . + 0x800; /* Reserve a minimum of 2K for the stack. */ + . = ALIGN(4); + } >RAM + .ARM.attributes 0 : { *(.ARM.attributes) } } -- cgit v1.2.3