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:
parent
98c7d70fe4
commit
5eb9f9d060
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue