-
Notifications
You must be signed in to change notification settings - Fork 1
/
start.S
253 lines (207 loc) · 3.21 KB
/
start.S
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
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
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
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
# Copyright 2023 Dual Tachyon
# https://github.com/DualTachyon
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
.cpu cortex-m0
.fpu softvfp
.thumb
.global Stack
.global HandlerReset
.global Main
.global OVERLAY_Install
.global BOARD_FLASH_Init
.global BSS_Init
.global SystickHandler
.weak SystickHandler
.section .text.isr
Stack:
.long 0x20003FF0
Reset:
.long HandlerReset + 1
NMI:
.long HandlerNMI + 1
HardFault:
.long HandlerHardFault + 1
Reserved_10:
.long 0
Reserved_14:
.long 0
Reserved_18:
.long 0
Reserved_1C:
.long 0
Reserved_20:
.long 0
Reserved_24:
.long 0
Reserved_28:
.long 0
SVCall:
.long HandlerSVCall + 1
Reserved_30:
.long 0
Reserved_34:
.long 0
PendSV:
.long HandlerPendSV + 1
SysTick:
.long SystickHandler + 1
WWDT:
.long HandlerWWDT + 1
IWDT:
.long HandlerIWDT + 1
RTC:
.long HandlerRTC + 1
DMA:
.long HandlerDMA + 1
SARADC:
.long HandlerSARADC + 1
TIMER_BASE0:
.long HandlerTIMER_BASE0 + 1
TIMER_BASE1:
.long HandlerTIMER_BASE1 + 1
TIMER_PLUS0:
.long HandlerTIMER_PLUS0 + 1
TIMER_PLUS1:
.long HandlerTIMER_PLUS1 + 1
PWM_BASE0:
.long HandlerPWM_BASE0 + 1
PWM_BASE1:
.long HandlerPWM_BASE1 + 1
PWM_PLUS0:
.long HandlerPWM_PLUS0 + 1
PWM_PLUS1:
.long HandlerPWM_PLUS1 + 1
UART0:
.long HandlerUART0 + 1
UART1:
.long HandlerUART1 + 1
UART2:
.long HandlerUART2 + 1
SPI0:
.long HandlerSPI0 + 1
SPI1:
.long HandlerSPI1 + 1
IIC0:
.long HandlerIIC0 + 1
IIC1:
.long HandlerIIC1 + 1
CMP:
.long HandlerCMP + 1
TIMER_BASE2:
.long HandlerTIMER_BASE2 + 1
GPIOA5:
.long HandlerGPIOA5 + 1
GPIOA6:
.long HandlerGPIOA6 + 1
GPIOA7:
.long HandlerGPIOA7 + 1
GPIOB0:
.long HandlerGPIOB0 + 1
GPIOB1:
.long HandlerGPIOB1 + 1
GPIOC0:
.long HandlerGPIOC0 + 1
GPIOC1:
.long HandlerGPIOC1 + 1
GPIOA:
.long HandlerGPIOA + 1
GPIOB:
.long HandlerGPIOB + 1
GPIOC:
.long HandlerGPIOC + 1
.section .text
HandlerNMI:
b .
HandlerHardFault:
b .
HandlerSVCall:
b .
HandlerPendSV:
b .
SystickHandler:
bx lr
HandlerWWDT:
b .
HandlerIWDT:
b .
HandlerRTC:
b .
HandlerDMA:
b .
HandlerSARADC:
b .
HandlerTIMER_BASE0:
b .
HandlerTIMER_BASE1:
b .
HandlerTIMER_PLUS0:
b .
HandlerTIMER_PLUS1:
b .
HandlerPWM_BASE0:
b .
HandlerPWM_BASE1:
b .
HandlerPWM_PLUS0:
b .
HandlerPWM_PLUS1:
b .
HandlerUART0:
b .
HandlerUART1:
b .
HandlerUART2:
b .
HandlerSPI0:
b .
HandlerSPI1:
b .
HandlerIIC0:
b .
HandlerIIC1:
b .
HandlerCMP:
b .
HandlerTIMER_BASE2:
b .
HandlerGPIOA5:
b .
HandlerGPIOA6:
b .
HandlerGPIOA7:
b .
HandlerGPIOB0:
b .
HandlerGPIOB1:
b .
HandlerGPIOC0:
b .
HandlerGPIOC1:
b .
HandlerGPIOA:
b .
HandlerGPIOB:
b .
HandlerGPIOC:
b .
HandlerReset:
ldr r0, =0x20003FF0
mov sp, r0
bl DATA_Init
bl BSS_Init
#if defined(ENABLE_OVERLAY)
bl BOARD_FLASH_Init
#endif
bl Main
b .