Commit deb379e
committed
feat: configurable link section attribute for irqs
This change introduces a new config field that allows `svd2rust`
to target which linker sections get assigned to the `__INTERRUPTS`
static, with reasonable defaults.
Previously on RISC-V, the choice was always left up to the compiler, and
it seemed to always pick `.rodata`. Unfortunately, in my context, that
meant placing the LUT in a memory range that had a lot of highly
variable latency, which cost not just time but predictability in
servicing interrupts.
With this change in place, I'm able to target a particular section
(e.g. `.data`, or `.trap.rodata`) for the placement of the static, which
grants more granular control over the ultimate loaded memory address.
For the full details about the problem, please see: esp-rs/esp-hal@e29f3d51 parent d1ddb1b commit deb379e
2 files changed
+39
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
118 | 118 | | |
119 | 119 | | |
120 | 120 | | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
121 | 129 | | |
122 | 130 | | |
123 | 131 | | |
| |||
132 | 140 | | |
133 | 141 | | |
134 | 142 | | |
135 | | - | |
| 143 | + | |
136 | 144 | | |
137 | 145 | | |
138 | 146 | | |
| |||
144 | 152 | | |
145 | 153 | | |
146 | 154 | | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
147 | 163 | | |
148 | 164 | | |
149 | 165 | | |
| |||
158 | 174 | | |
159 | 175 | | |
160 | 176 | | |
161 | | - | |
| 177 | + | |
162 | 178 | | |
163 | 179 | | |
164 | 180 | | |
| |||
172 | 188 | | |
173 | 189 | | |
174 | 190 | | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
175 | 199 | | |
176 | 200 | | |
177 | 201 | | |
| |||
186 | 210 | | |
187 | 211 | | |
188 | 212 | | |
| 213 | + | |
189 | 214 | | |
190 | 215 | | |
191 | 216 | | |
| |||
197 | 222 | | |
198 | 223 | | |
199 | 224 | | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
200 | 233 | | |
201 | 234 | | |
202 | 235 | | |
| |||
210 | 243 | | |
211 | 244 | | |
212 | 245 | | |
| 246 | + | |
213 | 247 | | |
214 | 248 | | |
215 | 249 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
| 62 | + | |
| 63 | + | |
62 | 64 | | |
63 | 65 | | |
64 | 66 | | |
| |||
120 | 122 | | |
121 | 123 | | |
122 | 124 | | |
| 125 | + | |
123 | 126 | | |
124 | 127 | | |
125 | 128 | | |
| |||
0 commit comments