mirror of
https://github.com/esp8266/Arduino.git
synced 2025-07-27 18:02:17 +03:00
Move all PROGMEM to their own section (#5048)
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.
This commit is contained in:
committed by
Develo
parent
adde93bcaa
commit
56b98fd4df
@ -4,11 +4,11 @@
|
||||
# Replace your-name-here with somethine appropriate before running and use
|
||||
# the generated .H files in your code as follows:
|
||||
#
|
||||
# static const uint8_t rsakey[] ICACHE_RODATA_ATTR = {
|
||||
# static const uint8_t rsakey[] PROGMEM = {
|
||||
# #include "key.h"
|
||||
# };
|
||||
#
|
||||
# static const uint8_t x509[] ICACHE_RODATA_ATTR = {
|
||||
# static const uint8_t x509[] PROGMEM = {
|
||||
# #include "x509.h"
|
||||
# };
|
||||
#
|
||||
|
Reference in New Issue
Block a user