diff --git a/atmel-samd/boards/samd21x18-bootloader.ld b/atmel-samd/boards/samd21x18-bootloader.ld index 89ff084fb7..b43c292b16 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 0f1168c578..995d2754fa 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) } }