Skip to content

Commit 76dc715

Browse files
Qinghao ShiQinghao Shi
authored andcommitted
FastModels: add FVP_MPS2_M7 target support
add cmsis drivers and toolchain scripts for FVP_MPS2_M7
1 parent 1bf59cd commit 76dc715

File tree

13 files changed

+2857
-0
lines changed

13 files changed

+2857
-0
lines changed

targets/TARGET_ARM_FM/TARGET_FVP_MPS2/TARGET_FVP_MPS2_M7/device/CMSDK_CM7.h

Lines changed: 732 additions & 0 deletions
Large diffs are not rendered by default.

targets/TARGET_ARM_FM/TARGET_FVP_MPS2/TARGET_FVP_MPS2_M7/device/SMM_MPS2.h

Lines changed: 610 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
;* MPS2 CMSIS Library
2+
;*
3+
;* Copyright (c) 2006-2018 ARM Limited
4+
;* All rights reserved.
5+
;*
6+
;* Redistribution and use in source and binary forms, with or without
7+
;* modification, are permitted provided that the following conditions are met:
8+
;*
9+
;* 1. Redistributions of source code must retain the above copyright notice,
10+
;* this list of conditions and the following disclaimer.
11+
;*
12+
;* 2. Redistributions in binary form must reproduce the above copyright notice,
13+
;* this list of conditions and the following disclaimer in the documentation
14+
;* and/or other materials provided with the distribution.
15+
;*
16+
;* 3. Neither the name of the copyright holder nor the names of its contributors
17+
;* may be used to endorse or promote products derived from this software without
18+
;* specific prior written permission.
19+
;*
20+
;* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21+
;* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22+
;* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23+
;* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
24+
;* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25+
;* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26+
;* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27+
;* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28+
;* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29+
;* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
30+
;* POSSIBILITY OF SUCH DAMAGE.
31+
;*
32+
; *************************************************************
33+
; *** Scatter-Loading Description File ***
34+
; *************************************************************
35+
36+
LR_IROM1 0x00000000 0x00400000 { ; load region size_region
37+
ER_IROM1 0x00000000 0x00400000 { ; load address = execution address
38+
*.o (RESET, +First)
39+
*(InRoot$$Sections)
40+
.ANY (+RO)
41+
}
42+
; Total: 64 vectors = 256 bytes (0x100) to be reserved in RAM
43+
RW_IRAM1 (0x20000000+0x100) (0x400000-0x100) { ; RW data
44+
.ANY (+RW +ZI)
45+
}
46+
}
47+
Lines changed: 290 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,290 @@
1+
; MPS2 CMSIS Library
2+
;
3+
; Copyright (c) 2006-2018 ARM Limited
4+
; All rights reserved.
5+
;
6+
; Redistribution and use in source and binary forms, with or without
7+
; modification, are permitted provided that the following conditions are met:
8+
;
9+
; 1. Redistributions of source code must retain the above copyright notice,
10+
; this list of conditions and the following disclaimer.
11+
;
12+
; 2. Redistributions in binary form must reproduce the above copyright notice,
13+
; this list of conditions and the following disclaimer in the documentation
14+
; and/or other materials provided with the distribution.
15+
;
16+
; 3. Neither the name of the copyright holder nor the names of its contributors
17+
; may be used to endorse or promote products derived from this software without
18+
; specific prior written permission.
19+
;
20+
; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21+
; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22+
; IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23+
; ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
24+
; LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25+
; CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26+
; SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27+
; INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28+
; CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29+
; ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
30+
; POSSIBILITY OF SUCH DAMAGE.
31+
;******************************************************************************
32+
; @file startup_CMSDK_CM7.s
33+
; @brief CMSIS Core Device Startup File for
34+
; CMSDK_CM7 Device
35+
;
36+
;******************************************************************************
37+
;
38+
;-------- <<< Use Configuration Wizard in Context Menu >>> ------------------
39+
;
40+
41+
42+
; <h> Stack Configuration
43+
; <o> Stack Size (in Bytes) <0x0-0xFFFFFFFF:8>
44+
; </h>
45+
46+
Stack_Size EQU 0x00004000
47+
48+
AREA STACK, NOINIT, READWRITE, ALIGN=3
49+
Stack_Mem SPACE Stack_Size
50+
__initial_sp
51+
52+
53+
; <h> Heap Configuration
54+
; <o> Heap Size (in Bytes) <0x0-0xFFFFFFFF:8>
55+
; </h>
56+
57+
Heap_Size EQU 0x00001000
58+
59+
AREA HEAP, NOINIT, READWRITE, ALIGN=3
60+
__heap_base
61+
Heap_Mem SPACE Heap_Size
62+
__heap_limit
63+
64+
65+
PRESERVE8
66+
THUMB
67+
68+
69+
; Vector Table Mapped to Address 0 at Reset
70+
71+
AREA RESET, DATA, READONLY
72+
EXPORT __Vectors
73+
EXPORT __Vectors_End
74+
EXPORT __Vectors_Size
75+
76+
__Vectors DCD __initial_sp ; Top of Stack
77+
DCD Reset_Handler ; Reset Handler
78+
DCD NMI_Handler ; NMI Handler
79+
DCD HardFault_Handler ; Hard Fault Handler
80+
DCD MemManage_Handler ; MPU Fault Handler
81+
DCD BusFault_Handler ; Bus Fault Handler
82+
DCD UsageFault_Handler ; Usage Fault Handler
83+
DCD 0 ; Reserved
84+
DCD 0 ; Reserved
85+
DCD 0 ; Reserved
86+
DCD 0 ; Reserved
87+
DCD SVC_Handler ; SVCall Handler
88+
DCD DebugMon_Handler ; Debug Monitor Handler
89+
DCD 0 ; Reserved
90+
DCD PendSV_Handler ; PendSV Handler
91+
DCD SysTick_Handler ; SysTick Handler
92+
93+
; External Interrupts
94+
DCD UARTRX0_Handler ; UART 0 RX Handler
95+
DCD UARTTX0_Handler ; UART 0 TX Handler
96+
DCD UARTRX1_Handler ; UART 1 RX Handler
97+
DCD UARTTX1_Handler ; UART 1 TX Handler
98+
DCD UARTRX2_Handler ; UART 2 RX Handler
99+
DCD UARTTX2_Handler ; UART 2 TX Handler
100+
DCD PORT0_COMB_Handler ; GPIO Port 0 Combined Handler
101+
DCD PORT1_COMB_Handler ; GPIO Port 1 Combined Handler
102+
DCD TIMER0_Handler ; TIMER 0 handler
103+
DCD TIMER1_Handler ; TIMER 1 handler
104+
DCD DUALTIMER_HANDLER ; Dual timer handler
105+
DCD SPI_Handler ; SPI exceptions Handler
106+
DCD UARTOVF_Handler ; UART 0,1,2 Overflow Handler
107+
DCD ETHERNET_Handler ; Ethernet Overflow Handler
108+
DCD I2S_Handler ; I2S Handler
109+
DCD TSC_Handler ; Touch Screen handler
110+
DCD PORT2_COMB_Handler ; GPIO Port 2 Combined Handler
111+
DCD PORT3_COMB_Handler ; GPIO Port 3 Combined Handler
112+
DCD UARTRX3_Handler ; UART 3 RX Handler
113+
DCD UARTTX3_Handler ; UART 3 TX Handler
114+
DCD UARTRX4_Handler ; UART 4 RX Handler
115+
DCD UARTTX4_Handler ; UART 4 TX Handler
116+
DCD ADCSPI_Handler ; SHIELD ADC SPI exceptions Handler
117+
DCD SHIELDSPI_Handler ; SHIELD SPI exceptions Handler
118+
DCD PORT0_0_Handler ; GPIO Port 0 pin 0 Handler
119+
DCD PORT0_1_Handler ; GPIO Port 0 pin 1 Handler
120+
DCD PORT0_2_Handler ; GPIO Port 0 pin 2 Handler
121+
DCD PORT0_3_Handler ; GPIO Port 0 pin 3 Handler
122+
DCD PORT0_4_Handler ; GPIO Port 0 pin 4 Handler
123+
DCD PORT0_5_Handler ; GPIO Port 0 pin 5 Handler
124+
DCD PORT0_6_Handler ; GPIO Port 0 pin 6 Handler
125+
DCD PORT0_7_Handler ; GPIO Port 0 pin 7 Handler
126+
__Vectors_End
127+
128+
__Vectors_Size EQU __Vectors_End - __Vectors
129+
130+
AREA |.text|, CODE, READONLY
131+
132+
133+
; Reset Handler
134+
135+
Reset_Handler PROC
136+
EXPORT Reset_Handler [WEAK]
137+
IMPORT SystemInit
138+
IMPORT __main
139+
LDR R0, =SystemInit
140+
BLX R0
141+
LDR R0, =__main
142+
BX R0
143+
ENDP
144+
145+
146+
; Dummy Exception Handlers (infinite loops which can be modified)
147+
148+
NMI_Handler PROC
149+
EXPORT NMI_Handler [WEAK]
150+
B .
151+
ENDP
152+
HardFault_Handler\
153+
PROC
154+
EXPORT HardFault_Handler [WEAK]
155+
B .
156+
ENDP
157+
MemManage_Handler\
158+
PROC
159+
EXPORT MemManage_Handler [WEAK]
160+
B .
161+
ENDP
162+
BusFault_Handler\
163+
PROC
164+
EXPORT BusFault_Handler [WEAK]
165+
B .
166+
ENDP
167+
UsageFault_Handler\
168+
PROC
169+
EXPORT UsageFault_Handler [WEAK]
170+
B .
171+
ENDP
172+
SVC_Handler PROC
173+
EXPORT SVC_Handler [WEAK]
174+
B .
175+
ENDP
176+
DebugMon_Handler\
177+
PROC
178+
EXPORT DebugMon_Handler [WEAK]
179+
B .
180+
ENDP
181+
PendSV_Handler PROC
182+
EXPORT PendSV_Handler [WEAK]
183+
B .
184+
ENDP
185+
SysTick_Handler PROC
186+
EXPORT SysTick_Handler [WEAK]
187+
B .
188+
ENDP
189+
190+
Default_Handler PROC
191+
EXPORT UARTRX0_Handler [WEAK]
192+
EXPORT UARTTX0_Handler [WEAK]
193+
EXPORT UARTRX1_Handler [WEAK]
194+
EXPORT UARTTX1_Handler [WEAK]
195+
EXPORT UARTRX2_Handler [WEAK]
196+
EXPORT UARTTX2_Handler [WEAK]
197+
EXPORT PORT0_COMB_Handler [WEAK]
198+
EXPORT PORT1_COMB_Handler [WEAK]
199+
EXPORT TIMER0_Handler [WEAK]
200+
EXPORT TIMER1_Handler [WEAK]
201+
EXPORT DUALTIMER_HANDLER [WEAK]
202+
EXPORT SPI_Handler [WEAK]
203+
EXPORT UARTOVF_Handler [WEAK]
204+
EXPORT ETHERNET_Handler [WEAK]
205+
EXPORT I2S_Handler [WEAK]
206+
EXPORT TSC_Handler [WEAK]
207+
EXPORT PORT2_COMB_Handler [WEAK]
208+
EXPORT PORT3_COMB_Handler [WEAK]
209+
EXPORT UARTRX3_Handler [WEAK]
210+
EXPORT UARTTX3_Handler [WEAK]
211+
EXPORT UARTRX4_Handler [WEAK]
212+
EXPORT UARTTX4_Handler [WEAK]
213+
EXPORT ADCSPI_Handler [WEAK]
214+
EXPORT SHIELDSPI_Handler [WEAK]
215+
EXPORT PORT0_0_Handler [WEAK]
216+
EXPORT PORT0_1_Handler [WEAK]
217+
EXPORT PORT0_2_Handler [WEAK]
218+
EXPORT PORT0_3_Handler [WEAK]
219+
EXPORT PORT0_4_Handler [WEAK]
220+
EXPORT PORT0_5_Handler [WEAK]
221+
EXPORT PORT0_6_Handler [WEAK]
222+
EXPORT PORT0_7_Handler [WEAK]
223+
224+
UARTRX0_Handler
225+
UARTTX0_Handler
226+
UARTRX1_Handler
227+
UARTTX1_Handler
228+
UARTRX2_Handler
229+
UARTTX2_Handler
230+
PORT0_COMB_Handler
231+
PORT1_COMB_Handler
232+
TIMER0_Handler
233+
TIMER1_Handler
234+
DUALTIMER_HANDLER
235+
SPI_Handler
236+
UARTOVF_Handler
237+
ETHERNET_Handler
238+
I2S_Handler
239+
TSC_Handler
240+
PORT2_COMB_Handler
241+
PORT3_COMB_Handler
242+
UARTRX3_Handler
243+
UARTTX3_Handler
244+
UARTRX4_Handler
245+
UARTTX4_Handler
246+
ADCSPI_Handler
247+
SHIELDSPI_Handler
248+
PORT0_0_Handler
249+
PORT0_1_Handler
250+
PORT0_2_Handler
251+
PORT0_3_Handler
252+
PORT0_4_Handler
253+
PORT0_5_Handler
254+
PORT0_6_Handler
255+
PORT0_7_Handler
256+
B .
257+
258+
ENDP
259+
260+
261+
ALIGN
262+
263+
264+
; User Initial Stack & Heap
265+
266+
IF :DEF:__MICROLIB
267+
268+
EXPORT __initial_sp
269+
EXPORT __heap_base
270+
EXPORT __heap_limit
271+
272+
ELSE
273+
274+
IMPORT __use_two_region_memory
275+
EXPORT __user_initial_stackheap
276+
277+
__user_initial_stackheap PROC
278+
LDR R0, = Heap_Mem
279+
LDR R1, =(Stack_Mem + Stack_Size)
280+
LDR R2, = (Heap_Mem + Heap_Size)
281+
LDR R3, = Stack_Mem
282+
BX LR
283+
ENDP
284+
285+
ALIGN
286+
287+
ENDIF
288+
289+
290+
END

0 commit comments

Comments
 (0)