mirror of
https://github.com/wled/WLED.git
synced 2026-04-27 01:22:44 +00:00
Use new section for dynamic arrays
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.
This commit is contained in:
12
pio-scripts/dynarray.py
Normal file
12
pio-scripts/dynarray.py
Normal file
@@ -0,0 +1,12 @@
|
||||
# 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"])
|
||||
Reference in New Issue
Block a user