You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Phase 0b-i (#491): emit firmware.map next to firmware.elf for ESP32 link #508
Part of #491 (firmware.map auto-emit), narrowed to ESP32 because that's the target for Phase 4 of #493. Other platforms missing the flag (Apollo3, NXP LPC, RP2040) can be addressed in follow-up sub-issues.
Background
crates/fbuild-build/src/esp32/esp32_linker.rs builds the ESP32 link command but does not pass -Wl,-Map=…/firmware.map. Every other platform that ships through fbuild's own linker layer (avr_linker.rs, teensy_linker.rs, generic_arm/arm_linker.rs covering STM32/NRF52, esp8266_linker.rs, ch32v_linker.rs, renesas_linker.rs, sam_linker.rs, silabs_linker.rs, nrf52_linker.rs) already does. ESP32 is the outlier.
This blocks fbuild bloat / fbuild symbols from filling the ARCHIVE / OBJECT / SECTION columns on ESP32 firmware (and therefore the "flash bytes by archive" rollup), which is a hard prerequisite for Phase 4 of #493 (the shrink integration that needs archive attribution to report "libc.a/lib_a-vfprintf.o" deltas).
Scope
crates/fbuild-build/src/esp32/esp32_linker.rs: after the existing -o firmware.elf argv push, also append -Wl,-Map=<output_dir>/firmware.map. Match the pattern used in teensy_linker.rs:94, avr_linker.rs:112, etc.
Regression test analogous to the existing teensy/AVR tests:
Build the link argv via the existing test fixture.
Assert the argv contains a -Wl,-Map= token that resolves to firmware.map in the same directory as firmware.elf.
After a clean fbuild build tests/platform/esp32s3 -e esp32s3, firmware.map sits next to firmware.elf (smoke-verifiable manually; CI doesn't run full ESP32 builds).
Activity
fix(esp32): emit -Wl,-Map=firmware.map at link time (#508, part of #491…