Merge branch 'esp8266-native-library-backend' into esp8266-native-build-spec

This commit is contained in:
J. Nick Koston
2026-08-22 22:32:38 -05:00
2 changed files with 14 additions and 3 deletions
+5 -3
View File
@@ -409,8 +409,8 @@ async def to_code(config: ConfigType) -> None:
)
if config[CONF_BOARD] in BOARDS:
flash_size = BOARDS[config[CONF_BOARD]][KEY_FLASH_SIZE]
ld_scripts = ESP8266_LD_SCRIPTS[flash_size]
board_data = BOARDS[config[CONF_BOARD]]
ld_scripts = ESP8266_LD_SCRIPTS[board_data[KEY_FLASH_SIZE]]
if ver <= cv.Version(2, 3, 0):
# No ld script support
@@ -419,7 +419,9 @@ async def to_code(config: ConfigType) -> None:
# Old ld script path
ld_script = ld_scripts[0]
else:
ld_script = ld_scripts[1]
# A per-board override preserves a layout the board shipped
# with (see d1_wroom_02 in boards.py)
ld_script = board_data.get("ldscript", ld_scripts[1])
if ld_script is not None:
cg.add_platformio_option("board_build.ldscript", ld_script)
+9
View File
@@ -199,6 +199,15 @@ BOARDS = {
"name": "WeMos D1 mini Pro",
"flash_size": FLASH_SIZE_16_MB,
},
"d1_wroom_02": {
"name": "WeMos D1 ESP-WROOM-02",
"flash_size": FLASH_SIZE_2_MB,
# This board joined BOARDS after shipping with the manifest default
# (64 KB filesystem region); the flash-size default (2m.ld) would
# move _FS_end and with it the preferences sector, wiping existing
# devices' flash-backed state on update.
"ldscript": "eagle.flash.2m64.ld",
},
"d1": {
"name": "WEMOS D1 R1",
"flash_size": FLASH_SIZE_4_MB,