diff options
| -rw-r--r-- | ports/esp8266/boards/ESP8266_GENERIC/board.json | 3 | ||||
| -rw-r--r-- | ports/esp8266/boards/ESP8266_GENERIC/mpconfigvariant_FLASH_2M_ROMFS.mk | 12 | ||||
| -rw-r--r-- | ports/esp8266/boards/esp8266_2MiB_ROMFS.ld | 24 |
3 files changed, 38 insertions, 1 deletions
diff --git a/ports/esp8266/boards/ESP8266_GENERIC/board.json b/ports/esp8266/boards/ESP8266_GENERIC/board.json index 2b3a6b550..8f2aa1240 100644 --- a/ports/esp8266/boards/ESP8266_GENERIC/board.json +++ b/ports/esp8266/boards/ESP8266_GENERIC/board.json @@ -17,7 +17,8 @@ "variants": { "OTA": "OTA compatible", "FLASH_1M": "1MiB flash", - "FLASH_512K": "512kiB flash" + "FLASH_512K": "512kiB flash", + "FLASH_2M_ROMFS": "2MiB flash with ROMFS" }, "vendor": "Espressif" } diff --git a/ports/esp8266/boards/ESP8266_GENERIC/mpconfigvariant_FLASH_2M_ROMFS.mk b/ports/esp8266/boards/ESP8266_GENERIC/mpconfigvariant_FLASH_2M_ROMFS.mk new file mode 100644 index 000000000..9ee3566d8 --- /dev/null +++ b/ports/esp8266/boards/ESP8266_GENERIC/mpconfigvariant_FLASH_2M_ROMFS.mk @@ -0,0 +1,12 @@ +LD_FILES = boards/esp8266_2MiB_ROMFS.ld + +MICROPY_PY_ESPNOW ?= 1 +MICROPY_PY_BTREE ?= 1 +MICROPY_VFS_FAT ?= 1 +MICROPY_VFS_LFS2 ?= 1 + +# Add asyncio and extra micropython-lib packages (in addition to the port manifest). +FROZEN_MANIFEST ?= $(BOARD_DIR)/manifest_2MiB.py + +# Configure mpconfigboard.h. +CFLAGS += -DMICROPY_ESP8266_2M -DMICROPY_VFS_ROM=1 diff --git a/ports/esp8266/boards/esp8266_2MiB_ROMFS.ld b/ports/esp8266/boards/esp8266_2MiB_ROMFS.ld new file mode 100644 index 000000000..6020c3d48 --- /dev/null +++ b/ports/esp8266/boards/esp8266_2MiB_ROMFS.ld @@ -0,0 +1,24 @@ +/* GNU linker script for ESP8266 with 2M or more flash, and includes a ROMFS partition + + Flash layout: + 0x40200000 36k header + iram/dram init + 0x40209000 668k firmware (irom0) + 0x402c0000 320k ROMFS + 0x40300000 1M+ filesystem (not memory mapped) +*/ + +MEMORY +{ + dport0_0_seg : org = 0x3ff00000, len = 16 + dram0_0_seg : org = 0x3ffe8000, len = 80K + iram1_0_seg : org = 0x40100000, len = 32K + irom0_0_seg : org = 0x40209000, len = 1M - 36K - 320K + FLASH_ROMFS : org = 0x402b0000, len = 320K +} + +/* define ROMFS extents */ +_micropy_hw_romfs_start = ORIGIN(FLASH_ROMFS); +_micropy_hw_romfs_size = LENGTH(FLASH_ROMFS); + +/* define common sections and symbols */ +INCLUDE boards/esp8266_common.ld |
