File tree 2 files changed +17
-13
lines changed
Components/esp8266/include
2 files changed +17
-13
lines changed Original file line number Diff line number Diff line change @@ -107,7 +107,7 @@ SECTIONS
107
107
*libm.a :(.literal .text .literal.* .text.*)
108
108
109
109
*(.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.*)
111
111
112
112
/* Generated libraries */
113
113
*liblwip2.a :(.literal .text .literal.* .text.*)
@@ -160,7 +160,7 @@ SECTIONS
160
160
*(.init.literal)
161
161
*(.init)
162
162
*(.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.* )
164
164
*(.fini.literal)
165
165
*(.fini)
166
166
*(.gnu.version)
Original file line number Diff line number Diff line change 1
1
// ESP8266 attribute definitions (previously in c_types.h)
2
2
#pragma once
3
3
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))
6
9
#define STORE_ATTR __attribute__((aligned(4)))
7
10
8
11
#define DMEM_ATTR __attribute__((section(".bss")))
9
12
#define SHMEM_ATTR
10
13
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
18
22
19
23
#define STORE_ATTR __attribute__((aligned(4)))
20
24
21
25
#ifdef ENABLE_GDB
22
- #define GDB_IRAM_ATTR IRAM_ATTR
26
+ #define GDB_IRAM_ATTR IRAM_ATTR
23
27
#else
24
- #define GDB_IRAM_ATTR
28
+ #define GDB_IRAM_ATTR
25
29
#endif
You can’t perform that action at this time.
0 commit comments