Skip to content

Commit 6bec36a

Browse files
committed
esp8266/boards: Add FLASH_2M_ROMFS variant with 320k ROM partition.
The same as the 2M flash variant but with a 320KiB ROM partition. Signed-off-by: Damien George <[email protected]>
1 parent 75ff8e5 commit 6bec36a

File tree

3 files changed

+38
-1
lines changed

3 files changed

+38
-1
lines changed

ports/esp8266/boards/ESP8266_GENERIC/board.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@
1717
"variants": {
1818
"OTA": "OTA compatible",
1919
"FLASH_1M": "1MiB flash",
20-
"FLASH_512K": "512kiB flash"
20+
"FLASH_512K": "512kiB flash",
21+
"FLASH_2M_ROMFS": "2MiB flash with ROMFS"
2122
},
2223
"vendor": "Espressif"
2324
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
LD_FILES = boards/esp8266_2MiB_ROMFS.ld
2+
3+
MICROPY_PY_ESPNOW ?= 1
4+
MICROPY_PY_BTREE ?= 1
5+
MICROPY_VFS_FAT ?= 1
6+
MICROPY_VFS_LFS2 ?= 1
7+
8+
# Add asyncio and extra micropython-lib packages (in addition to the port manifest).
9+
FROZEN_MANIFEST ?= $(BOARD_DIR)/manifest_2MiB.py
10+
11+
# Configure mpconfigboard.h.
12+
CFLAGS += -DMICROPY_ESP8266_2M -DMICROPY_VFS_ROM=1
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
/* GNU linker script for ESP8266 with 2M or more flash, and includes a ROMFS partition
2+
3+
Flash layout:
4+
0x40200000 36k header + iram/dram init
5+
0x40209000 668k firmware (irom0)
6+
0x402c0000 320k ROMFS
7+
0x40300000 1M+ filesystem (not memory mapped)
8+
*/
9+
10+
MEMORY
11+
{
12+
dport0_0_seg : org = 0x3ff00000, len = 16
13+
dram0_0_seg : org = 0x3ffe8000, len = 80K
14+
iram1_0_seg : org = 0x40100000, len = 32K
15+
irom0_0_seg : org = 0x40209000, len = 1M - 36K - 320K
16+
FLASH_ROMFS : org = 0x402b0000, len = 320K
17+
}
18+
19+
/* define ROMFS extents */
20+
_micropy_hw_romfs_start = ORIGIN(FLASH_ROMFS);
21+
_micropy_hw_romfs_size = LENGTH(FLASH_ROMFS);
22+
23+
/* define common sections and symbols */
24+
INCLUDE boards/esp8266_common.ld

0 commit comments

Comments
 (0)