mirror of
https://github.com/esphome/esphome.git
synced 2026-09-15 00:58:40 +00:00
libretiny: fix RTL8710B linker regex — output is .ram_image2.text not .image2.ram.text
Confused the output section name with the input glob. RTL8710B's linker
template has:
.ram_image2.text : {
KEEP(*(.image2.ram.text*))
} > BD_RAM
so we need to match ".ram_image2.text :" and inject our extra
KEEP(*(.sram.text*)) alongside the existing input glob. CI caught this;
the test_build_components rtl87xx-ard smoke test now exercises the
patcher.
This commit is contained in:
@@ -36,7 +36,11 @@ _KEEP_LINE = (
|
||||
+ _MARKER + "\n"
|
||||
)
|
||||
_LN_COPY = re.compile(r"(\.flash_copysection\s*:\s*\{\s*\n)")
|
||||
_RTL8710B_IMAGE2 = re.compile(r"(\.image2\.ram\.text\s*:\s*\{\s*\n)")
|
||||
# RTL8710B's output section is ".ram_image2.text"; its stock linker consumes
|
||||
# "*(.image2.ram.text*)" as an input glob inside that output, but we need to
|
||||
# add a second input glob "*(.sram.text*)" so the ESPHome-marked functions
|
||||
# land in the same RAM-resident output.
|
||||
_RTL8710B_IMAGE2 = re.compile(r"(\.ram_image2\.text\s*:\s*\{\s*\n)")
|
||||
|
||||
|
||||
def _detect(env):
|
||||
|
||||
Reference in New Issue
Block a user