2022-07-02 17:12:55 +01:00
|
|
|
/*
|
|
|
|
GNU linker script for SAMD51x20
|
|
|
|
*/
|
|
|
|
|
2023-01-27 15:02:05 +00:00
|
|
|
/*
|
|
|
|
_codesize is defined in mpconfigmcu.mk or mpconfigboard.mk as
|
|
|
|
MICROPY_HW_CODESIZE and is set in Makefile
|
|
|
|
*/
|
|
|
|
|
|
|
|
_flashsize = 1024K; /* The physical flash size */
|
|
|
|
_bootloader = 16K; /* Must match the ORIGIN value of FLASH */
|
|
|
|
|
2022-07-02 17:12:55 +01:00
|
|
|
/* Specify the memory areas */
|
|
|
|
MEMORY
|
|
|
|
{
|
2023-01-27 15:02:05 +00:00
|
|
|
FLASH (rx) : ORIGIN = 0x00004000, LENGTH = _codesize
|
2022-07-02 17:12:55 +01:00
|
|
|
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 256K
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Top end of the stack, with room for double-tap variable */
|
|
|
|
_estack = ORIGIN(RAM) + LENGTH(RAM) - 8;
|
|
|
|
_sstack = _estack - 16K;
|
|
|
|
|
2023-01-27 15:02:05 +00:00
|
|
|
_oflash_fs = ORIGIN(FLASH) + _codesize;
|
|
|
|
_sflash_fs = _flashsize - _codesize - _bootloader;
|
2022-07-02 17:12:55 +01:00
|
|
|
|
|
|
|
_sheap = _ebss;
|
|
|
|
_eheap = _sstack;
|