mirror of
https://github.com/micropython/micropython.git
synced 2026-01-06 20:20:14 +01:00
The flash driver is update to support the new `mp_vfs_rom_ioctl()` function, and the buffer protocol is added to `samd_flash_type` (it is needed for VfsRom on devices without external flash). For SAMD21, only boards with external SPI flash have VfsRom enabled, due to size constraints. For such boards, the VfsRom filesystem has a size of 12k and is placed at the upper end of the flash. The `onewire`, `ds18x20` and `dht` drivers have been removed from frozen bytecode as they can be placed into the VfsRom files when needed. For SAMD51, the VfsRom filesystem has a default size of 64k for SAMD51x19 and 256K for SAMD51x20. It is placed at the upper end of the flash. For boards with external SPI flash, the code size is reduced from 496K to 432K. If that is not sufficient for some boards or configurations, it can be changed for each board or board variant. Tested with ADAFRUIT_ITSYBITSY_M0_EXPRESS, ADAFRUIT_ITSYBITSY_M4_EXPRESS, SPARKFUN_SAMD51_THING_PLUS, SEEED_XIAO_SAMD21, SAMD_GENERIC_D51X19, and SAMD_GENERIC_D51X20. Signed-off-by: Damien George <damien@micropython.org> Signed-off-by: robert-hh <robert@hammelrath.com>
38 lines
1.1 KiB
Plaintext
38 lines
1.1 KiB
Plaintext
/*
|
|
GNU linker script for SAMD51x20
|
|
*/
|
|
|
|
/*
|
|
_codesize and _micropy_hw_romfs_part0_size are defined in mpconfigmcu.mk or mpconfigboard.mk
|
|
as MICROPY_HW_CODESIZE and MICROPY_HW_ROMFS_BYTES and are set in Makefile.
|
|
*/
|
|
|
|
_flashsize = 1024K; /* The physical flash size */
|
|
_bootloader = 16K; /* Must match the ORIGIN value of FLASH */
|
|
|
|
/* Specify the memory areas */
|
|
MEMORY
|
|
{
|
|
FLASH (rx) : ORIGIN = 0x00004000, LENGTH = _codesize
|
|
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;
|
|
|
|
/*
|
|
The VfsROM file system is placed at the end of the flash.
|
|
For device with SPI flash the number for _sflash_fs might be 0 and
|
|
the origin beyond the end of the flash. That does not matter since
|
|
these devices do not use the MCU flash file system.
|
|
*/
|
|
|
|
_oflash_fs = ORIGIN(FLASH) + _codesize + _micropy_hw_romfs_part0_size;
|
|
_sflash_fs = _flashsize - _codesize - _bootloader - _micropy_hw_romfs_part0_size;
|
|
|
|
_micropy_hw_romfs_part0_start = ORIGIN(FLASH) + _codesize;
|
|
|
|
_sheap = _ebss;
|
|
_eheap = _sstack;
|