atmel-samd: Fix rebooting to bootloader

Commit efbf08266b moved _estack in order to ensure 8-byte alignment
of the stack, but the address of _bootloader_dbl_tap must remain
right at the end of SRAM.

I verified by reading the source that the 4-byte-aligned address is
used for all samd21 / samd51 boards in
adafruit/circuitpython@efbf08266b.  However, I only tested on
trinket_m0.

Closes: #739
crypto-aes
Jeff Epler 5 years ago
parent 98c7d70fe4
commit 5eb9f9d060
  1. 2
      ports/atmel-samd/boards/samd21x18-bootloader-crystalless.ld
  2. 2
      ports/atmel-samd/boards/samd21x18-bootloader-external-flash-crystalless.ld
  3. 2
      ports/atmel-samd/boards/samd21x18-bootloader-external-flash.ld
  4. 2
      ports/atmel-samd/boards/samd21x18-bootloader.ld
  5. 2
      ports/atmel-samd/boards/samd51x18-bootloader-external-flash.ld
  6. 2
      ports/atmel-samd/boards/samd51x19-bootloader-external-flash.ld
  7. 2
      ports/atmel-samd/boards/samd51x19-bootloader.ld
  8. 2
      ports/atmel-samd/boards/samd51x20-bootloader-external-flash.ld
  9. 2
      ports/atmel-samd/boards/samd51x20-bootloader.ld

@ -13,7 +13,7 @@ MEMORY
/* top end of the stack */
/* stack must be double-word (8 byte) aligned */
_estack = ORIGIN(RAM) + LENGTH(RAM) - 8;
_bootloader_dbl_tap = _estack;
_bootloader_dbl_tap = ORIGIN(RAM) + LENGTH(RAM) - 4;
/* define output sections */
SECTIONS

@ -13,7 +13,7 @@ MEMORY
/* top end of the stack */
/* stack must be double-word (8 byte) aligned */
_estack = ORIGIN(RAM) + LENGTH(RAM) - 8;
_bootloader_dbl_tap = _estack;
_bootloader_dbl_tap = ORIGIN(RAM) + LENGTH(RAM) - 4;
/* define output sections */
SECTIONS

@ -13,7 +13,7 @@ MEMORY
/* top end of the stack */
/* stack must be double-word (8 byte) aligned */
_estack = ORIGIN(RAM) + LENGTH(RAM) - 8;
_bootloader_dbl_tap = _estack;
_bootloader_dbl_tap = ORIGIN(RAM) + LENGTH(RAM) - 4;
/* define output sections */
SECTIONS

@ -13,7 +13,7 @@ MEMORY
/* top end of the stack */
/* stack must be double-word (8 byte) aligned */
_estack = ORIGIN(RAM) + LENGTH(RAM) - 8;
_bootloader_dbl_tap = _estack;
_bootloader_dbl_tap = ORIGIN(RAM) + LENGTH(RAM) - 4;
/* define output sections */
SECTIONS

@ -13,7 +13,7 @@ MEMORY
/* top end of the stack */
/* stack must be double-word (8 byte) aligned */
_estack = ORIGIN(RAM) + LENGTH(RAM) - 8;
_bootloader_dbl_tap = _estack;
_bootloader_dbl_tap = ORIGIN(RAM) + LENGTH(RAM) - 4;
/* define output sections */
SECTIONS

@ -13,7 +13,7 @@ MEMORY
/* top end of the stack */
/* stack must be double-word (8 byte) aligned */
_estack = ORIGIN(RAM) + LENGTH(RAM) - 8;
_bootloader_dbl_tap = _estack;
_bootloader_dbl_tap = ORIGIN(RAM) + LENGTH(RAM) - 4;
/* define output sections */
SECTIONS

@ -13,7 +13,7 @@ MEMORY
/* top end of the stack */
/* stack must be double-word (8 byte) aligned */
_estack = ORIGIN(RAM) + LENGTH(RAM) - 8;
_bootloader_dbl_tap = _estack;
_bootloader_dbl_tap = ORIGIN(RAM) + LENGTH(RAM) - 4;
/* define output sections */
SECTIONS

@ -13,7 +13,7 @@ MEMORY
/* top end of the stack */
/* stack must be double-word (8 byte) aligned */
_estack = ORIGIN(RAM) + LENGTH(RAM) - 8;
_bootloader_dbl_tap = _estack;
_bootloader_dbl_tap = ORIGIN(RAM) + LENGTH(RAM) - 4;
/* define output sections */
SECTIONS

@ -13,7 +13,7 @@ MEMORY
/* top end of the stack */
/* stack must be double-word (8 byte) aligned */
_estack = ORIGIN(RAM) + LENGTH(RAM) - 8;
_bootloader_dbl_tap = _estack;
_bootloader_dbl_tap = ORIGIN(RAM) + LENGTH(RAM) - 4;
/* define output sections */
SECTIONS

Loading…
Cancel
Save