Commit ff0ed56
committed
Templates ignore section attributes so requires entries in linker script for IRAM code.
In the source code you'll see quite a bit of `__forceinline` as well as `IRAM_ATTR`, which is mainly for safety
and to indicate functions/methods may be used from interrupt context.
Unfortunately, marking templated code with `IRAM_ATTR` is not sufficient to get it into IRAM:
https://stackoverflow.com/questions/36279162/section-attribute-of-a-function-template-is-silently-ignored-in-gcc
So the linker script needs to be updated to catch all such instances. To do this requires splitting the `.text` output
segment into two parts, called `.text` and `.text1`. The rBoot script also needs to know about both segments
so they both end up in the ROM image it creates.
Using `CallbackTimer` as an example, most of the code gets inlined anyway and as it's called from task context
this actually uses very little IRAM.
More details here:
esp8266/Arduino#59221 parent 7bb6fa7 commit ff0ed56
File tree
2 files changed
+54
-32
lines changed- Sming
- Arch/Esp8266/Compiler/ld
- Components/rboot
2 files changed
+54
-32
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
85 | 134 | | |
86 | 135 | | |
87 | 136 | | |
| |||
128 | 177 | | |
129 | 178 | | |
130 | 179 | | |
131 | | - | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
132 | 183 | | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | | - | |
147 | | - | |
148 | | - | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | | - | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | | - | |
161 | | - | |
162 | 184 | | |
163 | | - | |
| 185 | + | |
164 | 186 | | |
165 | 187 | | |
166 | 188 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
67 | | - | |
| 67 | + | |
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
| |||
0 commit comments