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
This commit is contained in:
Jeff Epler 2018-04-03 21:20:42 -05:00
parent 98c7d70fe4
commit 5eb9f9d060
9 changed files with 9 additions and 9 deletions

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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