File tree Expand file tree Collapse file tree
Components/esp8266/include Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -107,7 +107,7 @@ SECTIONS
107107 *libm.a :(.literal .text .literal .* .text .*)
108108
109109 *(.rodata ._ZTV *) /* C++ vtables */
110- *(.irom0 .literal .irom .literal .irom .text .literal .irom0 .text .irom .text .irom .debug .*)
110+ *(.irom0 .literal .irom .literal .irom .text .literal .irom0 .text .irom0 . text .* . irom .text .irom .debug .*)
111111
112112 /* Generated libraries */
113113 *liblwip2.a :(.literal .text .literal .* .text .*)
@@ -160,7 +160,7 @@ SECTIONS
160160 *(.init .literal )
161161 *(.init )
162162 *(.literal .text .literal .* .text .* .stub .gnu .warning .gnu .linkonce .literal .* .gnu .linkonce .t .*.literal .gnu .linkonce .t .*)
163- *(.iram .literal .iram .text .literal .iram .text )
163+ *(.iram .literal .iram .text .literal .iram .text . iram . text .* )
164164 *(.fini .literal )
165165 *(.fini )
166166 *(.gnu .version )
Original file line number Diff line number Diff line change 11// ESP8266 attribute definitions (previously in c_types.h)
22#pragma once
33
4- #define IRAM_ATTR __attribute__((section(".iram.text")))
5- #define STORE_TYPEDEF_ATTR __attribute__((aligned(4),packed))
4+ #define STORE_TYPEDEF_ATTR __attribute__((aligned(4), packed))
65#define STORE_ATTR __attribute__((aligned(4)))
76
87#define DMEM_ATTR __attribute__((section(".bss")))
98#define SHMEM_ATTR
109
11- #ifdef ICACHE_FLASH
12- #define ICACHE_FLASH_ATTR __attribute__((section(".irom0.text")))
10+ // The following two macros cause a parameter to be enclosed in quotes
11+ #define ICACHE_RAM_ATTR __attribute__((section(".iram.text")))
12+ // by the preopressor (i.e. for concatenating ints to strings)
1313#define ICACHE_RODATA_ATTR __attribute__((section(".irom.text")))
14- #else
15- #define ICACHE_FLASH_ATTR
16- #define ICACHE_RODATA_ATTR
17- #endif
14+ #define __ICACHE_STRINGIZE_NX (A ) #A
15+ #define ATTR_STRINGIZE__ (A ) __ICACHE_STRINGIZE_NX(A)
16+ #define ICACHE_FLASH_ATTR \
17+ __attribute__(( \
18+ section("\".irom0.text." __FILE__ "." ATTR_STRINGIZE__(__LINE__) "." ATTR_STRINGIZE__(__COUNTER__) "\"")))
19+ #define IRAM_ATTR \
20+ __attribute__( \
21+ (section("\".iram.text." __FILE__ "." ATTR_STRINGIZE__(__LINE__) "." ATTR_STRINGIZE__(__COUNTER__) "\"")))
22+ #define ICACHE_RODATA_ATTR \
23+ __attribute__( \
24+ (section("\".irom.text." __FILE__ "." ATTR_STRINGIZE__(__LINE__) "." ATTR_STRINGIZE__(__COUNTER__) "\"")))
1825
1926#define STORE_ATTR __attribute__((aligned(4)))
2027
2128#ifdef ENABLE_GDB
22- #define GDB_IRAM_ATTR IRAM_ATTR
29+ #define GDB_IRAM_ATTR IRAM_ATTR
2330#else
24- #define GDB_IRAM_ATTR
31+ #define GDB_IRAM_ATTR
2532#endif
You can’t perform that action at this time.
0 commit comments