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+ // http://stackoverflow.com/a/35441900
5+ #define MACROQUOT (x ) #x
6+ #define MACROQUOTE (x ) MACROQUOT(x)
7+
8+ #define STORE_TYPEDEF_ATTR __attribute__((aligned(4), packed))
69#define STORE_ATTR __attribute__((aligned(4)))
710
811#define DMEM_ATTR __attribute__((section(".bss")))
912#define SHMEM_ATTR
1013
11- #ifdef ICACHE_FLASH
12- #define ICACHE_FLASH_ATTR __attribute__((section(".irom0.text")))
13- #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_FLASH_ATTR \
15+ __attribute__((section(".irom0.text." __FILE__ MACROQUOTE(__LINE__) MACROQUOTE(__COUNTER__))))
16+ #define ICACHE_RAM_ATTR \
17+ __attribute__((section(".iram.text." __FILE__ MACROQUOTE(__LINE__) MACROQUOTE(__COUNTER__))))
18+ #define ICACHE_RODATA_ATTR \
19+ __attribute__((section(".irom0.text." __FILE__ MACROQUOTE(__LINE__) MACROQUOTE(__COUNTER__))))
20+
21+ #define IRAM_ATTR ICACHE_RAM_ATTR
1822
1923#define STORE_ATTR __attribute__((aligned(4)))
2024
2125#ifdef ENABLE_GDB
22- #define GDB_IRAM_ATTR IRAM_ATTR
26+ #define GDB_IRAM_ATTR IRAM_ATTR
2327#else
24- #define GDB_IRAM_ATTR
28+ #define GDB_IRAM_ATTR
2529#endif
You can’t perform that action at this time.
0 commit comments