-
Notifications
You must be signed in to change notification settings - Fork 13.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move all PROGMEM to their own section #5048
Conversation
This could also allow the single array |
According to the GCC man page, __section__ attributes should only be used for global variables. However, the PROGMEM and ICACHE_RODATA macros use this variable decorator even for local variables. Most of the time it works, but when a static or inlined function tries to use a PROGMEM/PSTR/etc. variable the compiler can throw an error like: error: XXX causes a section type conflict with YYY Change the PROGMEM macro to emit a section name that is unique (a combo of the file, line, and counter variables to ensure uniqueness). The standard linker script will place them properly in .IROM without any changes. Fixes esp8266#5036 and others.
931eccc
to
9e31fd5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome side effect (shrinks bin)
When
|
Ah, poop. I did test on my Windows VM, but for me the Arduino libs were installed under Fast fix is to drop |
According to the GCC man page, section attributes should only be used
for global variables. However, the PROGMEM and ICACHE_RODATA macros use
this variable decorator even for local variables. Most of the time it works,
but when a static or inlined function tries to use a PROGMEM/PSTR/etc.
variable the compiler can throw an error like:
error: XXX causes a section type conflict with YYY
Change the PROGMEM macro to emit a section name that is unique (a combo
of the file, line, and counter variables to ensure uniqueness). The
standard linker script will place them properly in .IROM without
any changes.
Fixes #5036 and others.