After much poking around, I finally figured out how to make this work! The problem was that the ChibiOS initialization code had disabled interrupts before the __early_init function was run, making the bootloader not work despite my best intentions. This was fixed by enabling interrupts just before jumping to the bootloader. This in turn required changing to GNU-flavored C11 to include an inline assembly instruction.
|
||
10 | 10 |
|
11 | 11 |
|
12 | 12 |
|
13 |
|
|
13 |
|
|
14 | 14 |
|
15 | 15 |
|
16 | 16 |
|
|
||
37 | 37 |
|
38 | 38 |
|
39 | 39 |
|
40 |
|
|
40 | 41 |
|
41 | 42 |
|
42 | 43 |
|
|
||
93 | 94 |
|
94 | 95 |
|
95 | 96 |
|
97 |
|
|
98 |
|
|
99 |
|
|
100 |
|
|
101 |
|
|
102 |
|
|
103 |
|
|
104 |
|
|
105 |
|
|
106 |
|
|
96 | 107 |
|
97 | 108 |
|
98 | 109 |
|
|
||
1 | 1 |
|
2 | 2 |
|
3 |
|
|
3 |
|
|
4 | 4 |
|
5 | 5 |
|
6 | 6 |
|
|
||
2 | 2 |
|
3 | 3 |
|
4 | 4 |
|
5 |
|
|
5 |
|
|
||
10 | 10 |
|
11 | 11 |
|
12 | 12 |
|
13 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
|
|
21 |
|
|
22 |
|
|
23 |
|
|
24 |
|
|
25 |
|
|
14 | 26 |
|
15 | 27 |
|
16 | 28 |
|
|
||
45 | 45 |
|
46 | 46 |
|
47 | 47 |
|
48 |
|
|
48 | 49 |
|
49 | 50 |
|
50 | 51 |
|
|
||
192 | 193 |
|
193 | 194 |
|
194 | 195 |
|
196 |
|
|
197 |
|
|
198 |
|
|
199 |
|
|
200 |
|
|
201 |
|
|
202 |
|
|
203 |
|
|
204 |
|
|
205 |
|
|
206 |
|
|
207 |
|
|
208 |
|
|
195 | 209 |
|
196 | 210 |
|
197 | 211 |
|
|
||
493 | 507 |
|
494 | 508 |
|
495 | 509 |
|
510 |
|
|
496 | 511 |
|
497 | 512 |
|
498 | 513 |
|
|
||
1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
|
|
21 |
|
|
22 |
|
|
23 |
|
|
24 |
|
|
25 |
|
|
26 |
|
|
27 |
|
|
28 |
|
|
29 |
|
|
||
1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
|
|
21 |
|
|
22 |
|
|
23 |
|
|
24 |
|
|
25 |
|
|
26 |
|
|
27 |
|
|
28 |
|
|
29 |
|
|
30 |
|
|
31 |
|
|
32 |
|
|
33 |
|
|
34 |
|
|
35 |
|
|
36 |
|
|
37 |
|
|
38 |
|
|
39 |
|
|
40 |
|