mirror of
https://github.com/wled/WLED.git
synced 2026-03-13 08:29:49 +08:00
Use a custom linker section to hold dynamic arrays such as the usermod list. This provides an extensible solution for wider use in the future (such as FX or Bus drivers), as well as IDF v5 compatibility.
13 lines
542 B
Python
13 lines
542 B
Python
# Add a section to the linker script to store our dynamic arrays
|
|
# This is implemented as a pio post-script to ensure that our extra linker
|
|
# script fragments are processed last, after the base platform scripts have
|
|
# been loaded and all sections defined.
|
|
Import("env")
|
|
|
|
if env.get("PIOPLATFORM") == "espressif8266":
|
|
# Use a shim on this platform so we can share the same output blocks
|
|
# names as used by later platforms (ESP32)
|
|
env.Append(LINKFLAGS=["-Ttools/esp8266_rodata.ld"])
|
|
|
|
env.Append(LINKFLAGS=["-Ttools/dynarray.ld"])
|