mirror of
https://github.com/esphome/esphome.git
synced 2026-10-04 18:11:29 +00:00
Name the ldscript key, warn when a pre-2.4.2 core cannot honor it, pin the rule
KEY_LDSCRIPT replaces the bare literal at both the table entry and the lookup, so a typo cannot silently fall back to the layout-moving default; the regeneration recipe notes that overrides must survive a refresh; a board pinning an override on an Arduino core <= 2.4.2 warns that the layout cannot be honored; and board_ld_script gains the test pinning d1_wroom_02's shipped layout and the size defaults.
This commit is contained in:
committed by
J. Nick Koston
parent
a25509bda0
commit
7ca1b79544
@@ -0,0 +1,15 @@
|
||||
"""Tests for the per-board linker-script rule."""
|
||||
|
||||
from esphome.components.esp8266.boards import BOARDS, board_ld_script
|
||||
|
||||
|
||||
def test_d1_wroom_02_keeps_its_shipped_layout() -> None:
|
||||
"""The override must survive a BOARDS regeneration or key typo: the
|
||||
2m.ld default moves _FS_end and the preferences sector on deployed
|
||||
devices."""
|
||||
assert board_ld_script(BOARDS["d1_wroom_02"]) == "eagle.flash.2m64.ld"
|
||||
|
||||
|
||||
def test_default_boards_use_the_flash_size_layout() -> None:
|
||||
assert board_ld_script(BOARDS["d1_mini"]) == "eagle.flash.4m.ld"
|
||||
assert board_ld_script(BOARDS["esp01_1m"]) == "eagle.flash.1m.ld"
|
||||
Reference in New Issue
Block a user