Skip to content

Commit 1bf59cd

Browse files
Qinghao ShiQinghao Shi
authored andcommitted
FastModels: add FVP_MPS2_M0P target support
add cmsis drivers and toolchain scripts for FVP_MPS2_M0P
1 parent 67abec3 commit 1bf59cd

File tree

13 files changed

+2744
-0
lines changed

13 files changed

+2744
-0
lines changed

targets/TARGET_ARM_FM/TARGET_FVP_MPS2/TARGET_FVP_MPS2_M0P/device/CMSDK_CM0plus.h

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

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

Lines changed: 614 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: 270 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,270 @@
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_CM0P.s
33+
; @brief CMSIS Core Device Startup File for
34+
; CMSDK_CM0P 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 0 ; Reserved
81+
DCD 0 ; Reserved
82+
DCD 0 ; Reserved
83+
DCD 0 ; Reserved
84+
DCD 0 ; Reserved
85+
DCD 0 ; Reserved
86+
DCD 0 ; Reserved
87+
DCD SVC_Handler ; SVCall Handler
88+
DCD 0 ; Reserved
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+
SVC_Handler PROC
158+
EXPORT SVC_Handler [WEAK]
159+
B .
160+
ENDP
161+
PendSV_Handler PROC
162+
EXPORT PendSV_Handler [WEAK]
163+
B .
164+
ENDP
165+
SysTick_Handler PROC
166+
EXPORT SysTick_Handler [WEAK]
167+
B .
168+
ENDP
169+
170+
Default_Handler PROC
171+
EXPORT UARTRX0_Handler [WEAK]
172+
EXPORT UARTTX0_Handler [WEAK]
173+
EXPORT UARTRX1_Handler [WEAK]
174+
EXPORT UARTTX1_Handler [WEAK]
175+
EXPORT UARTRX2_Handler [WEAK]
176+
EXPORT UARTTX2_Handler [WEAK]
177+
EXPORT PORT0_COMB_Handler [WEAK]
178+
EXPORT PORT1_COMB_Handler [WEAK]
179+
EXPORT TIMER0_Handler [WEAK]
180+
EXPORT TIMER1_Handler [WEAK]
181+
EXPORT DUALTIMER_HANDLER [WEAK]
182+
EXPORT SPI_Handler [WEAK]
183+
EXPORT UARTOVF_Handler [WEAK]
184+
EXPORT ETHERNET_Handler [WEAK]
185+
EXPORT I2S_Handler [WEAK]
186+
EXPORT TSC_Handler [WEAK]
187+
EXPORT PORT2_COMB_Handler [WEAK]
188+
EXPORT PORT3_COMB_Handler [WEAK]
189+
EXPORT UARTRX3_Handler [WEAK]
190+
EXPORT UARTTX3_Handler [WEAK]
191+
EXPORT UARTRX4_Handler [WEAK]
192+
EXPORT UARTTX4_Handler [WEAK]
193+
EXPORT ADCSPI_Handler [WEAK]
194+
EXPORT SHIELDSPI_Handler [WEAK]
195+
EXPORT PORT0_0_Handler [WEAK]
196+
EXPORT PORT0_1_Handler [WEAK]
197+
EXPORT PORT0_2_Handler [WEAK]
198+
EXPORT PORT0_3_Handler [WEAK]
199+
EXPORT PORT0_4_Handler [WEAK]
200+
EXPORT PORT0_5_Handler [WEAK]
201+
EXPORT PORT0_6_Handler [WEAK]
202+
EXPORT PORT0_7_Handler [WEAK]
203+
204+
UARTRX0_Handler
205+
UARTTX0_Handler
206+
UARTRX1_Handler
207+
UARTTX1_Handler
208+
UARTRX2_Handler
209+
UARTTX2_Handler
210+
PORT0_COMB_Handler
211+
PORT1_COMB_Handler
212+
TIMER0_Handler
213+
TIMER1_Handler
214+
DUALTIMER_HANDLER
215+
SPI_Handler
216+
UARTOVF_Handler
217+
ETHERNET_Handler
218+
I2S_Handler
219+
TSC_Handler
220+
PORT2_COMB_Handler
221+
PORT3_COMB_Handler
222+
UARTRX3_Handler
223+
UARTTX3_Handler
224+
UARTRX4_Handler
225+
UARTTX4_Handler
226+
ADCSPI_Handler
227+
SHIELDSPI_Handler
228+
PORT0_0_Handler
229+
PORT0_1_Handler
230+
PORT0_2_Handler
231+
PORT0_3_Handler
232+
PORT0_4_Handler
233+
PORT0_5_Handler
234+
PORT0_6_Handler
235+
PORT0_7_Handler
236+
B .
237+
238+
ENDP
239+
240+
241+
ALIGN
242+
243+
244+
; User Initial Stack & Heap
245+
246+
IF :DEF:__MICROLIB
247+
248+
EXPORT __initial_sp
249+
EXPORT __heap_base
250+
EXPORT __heap_limit
251+
252+
ELSE
253+
254+
IMPORT __use_two_region_memory
255+
EXPORT __user_initial_stackheap
256+
257+
__user_initial_stackheap PROC
258+
LDR R0, = Heap_Mem
259+
LDR R1, =(Stack_Mem + Stack_Size)
260+
LDR R2, = (Heap_Mem + Heap_Size)
261+
LDR R3, = Stack_Mem
262+
BX LR
263+
ENDP
264+
265+
ALIGN
266+
267+
ENDIF
268+
269+
270+
END

0 commit comments

Comments
 (0)