CMSIS2000  0.0.7
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
startup_ARMSC300.s
Go to the documentation of this file.
1 ;/**************************************************************************//**
2 ; * @file startup_ARMSC300.s
3 ; * @brief CMSIS Core Device Startup File for
4 ; * ARMSC300 Device Series
5 ; * @version V1.08
6 ; * @date 03. February 2012
7 ; *
8 ; * @note
9 ; * Copyright (C) 2012 ARM Limited. All rights reserved.
10 ; *
11 ; * @par
12 ; * ARM Limited (ARM) is supplying this software for use with Cortex-M
13 ; * processor based microcontrollers. This file can be freely distributed
14 ; * within development tools that are supporting such ARM based processors.
15 ; *
16 ; * @par
17 ; * THIS SOFTWARE IS PROVIDED "AS IS". NO WARRANTIES, WHETHER EXPRESS, IMPLIED
18 ; * OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF
19 ; * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE.
20 ; * ARM SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR
21 ; * CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER.
22 ; *
23 ; ******************************************************************************/
24 ;/*
25 ;//-------- <<< Use Configuration Wizard in Context Menu >>> ------------------
26 ;*/
27 
28 
29 ; <h> Stack Configuration
30 ; <o> Stack Size (in Bytes) <0x0-0xFFFFFFFF:8>
31 ; </h>
32 
33 Stack_Size EQU 0x00000400
34 
36 Stack_Mem SPACE Stack_Size
38 
39 
40 ; <h> Heap Configuration
41 ; <o> Heap Size (in Bytes) <0x0-0xFFFFFFFF:8>
42 ; </h>
43 
44 Heap_Size EQU 0x00000C00
45 
46  AREA HEAP, NOINIT, READWRITE, ALIGN=3
47 __heap_base
48 Heap_Mem SPACE Heap_Size
49 __heap_limit
50 
51 
52  PRESERVE8
53  THUMB
54 
55 
56 ; Vector Table Mapped to Address 0 at Reset
57 
59  EXPORT __Vectors
60  EXPORT __Vectors_End
61  EXPORT __Vectors_Size
62 
63 __Vectors DCD __initial_sp ; Top of Stack
70  DCD 0 ; Reserved
71  DCD 0 ; Reserved
72  DCD 0 ; Reserved
73  DCD 0 ; Reserved
75  DCD DebugMon_Handler ; Debug Monitor Handler
76  DCD 0 ; Reserved
79 
80  ; External Interrupts
81  DCD WDT_IRQHandler ; 0: Watchdog Timer
82  DCD RTC_IRQHandler ; 1: Real Time Clock
83  DCD TIM0_IRQHandler ; 2: Timer0 / Timer1
84  DCD TIM2_IRQHandler ; 3: Timer2 / Timer3
85  DCD MCIA_IRQHandler ; 4: MCIa
86  DCD MCIB_IRQHandler ; 5: MCIb
87  DCD UART0_IRQHandler ; 6: UART0 - DUT FPGA
88  DCD UART1_IRQHandler ; 7: UART1 - DUT FPGA
89  DCD UART2_IRQHandler ; 8: UART2 - DUT FPGA
90  DCD UART4_IRQHandler ; 9: UART4 - not connected
91  DCD AACI_IRQHandler ; 10: AACI / AC97
92  DCD CLCD_IRQHandler ; 11: CLCD Combined Interrupt
93  DCD ENET_IRQHandler ; 12: Ethernet
94  DCD USBDC_IRQHandler ; 13: USB Device
95  DCD USBHC_IRQHandler ; 14: USB Host Controller
96  DCD CHLCD_IRQHandler ; 15: Character LCD
97  DCD FLEXRAY_IRQHandler ; 16: Flexray
98  DCD CAN_IRQHandler ; 17: CAN
99  DCD LIN_IRQHandler ; 18: LIN
100  DCD I2C_IRQHandler ; 19: I2C ADC/DAC
101  DCD 0 ; 20: Reserved
102  DCD 0 ; 21: Reserved
103  DCD 0 ; 22: Reserved
104  DCD 0 ; 23: Reserved
105  DCD 0 ; 24: Reserved
106  DCD 0 ; 25: Reserved
107  DCD 0 ; 26: Reserved
108  DCD 0 ; 27: Reserved
109  DCD CPU_CLCD_IRQHandler ; 28: Reserved - CPU FPGA CLCD
110  DCD 0 ; 29: Reserved - CPU FPGA
111  DCD UART3_IRQHandler ; 30: UART3 - CPU FPGA
112  DCD SPI_IRQHandler ; 31: SPI Touchscreen - CPU FPGA
113 __Vectors_End
114 
115 __Vectors_Size EQU __Vectors_End - __Vectors
116 
117  AREA |.text|, CODE, READONLY
118 
119 
120 ; Reset Handler
121 
122 Reset_Handler PROC
123  EXPORT Reset_Handler [WEAK]
124  IMPORT SystemInit
125  IMPORT __main
127  BLX R0
128  LDR R0, =__main
129  BX R0
130  ENDP
131 
132 
133 ; Dummy Exception Handlers (infinite loops which can be modified)
134 
135 NMI_Handler PROC
136  EXPORT NMI_Handler [WEAK]
137  B .
138  ENDP
139 HardFault_Handler\
140  PROC
141  EXPORT HardFault_Handler [WEAK]
142  B .
143  ENDP
144 MemManage_Handler\
145  PROC
146  EXPORT MemManage_Handler [WEAK]
147  B .
148  ENDP
149 BusFault_Handler\
150  PROC
151  EXPORT BusFault_Handler [WEAK]
152  B .
153  ENDP
154 UsageFault_Handler\
155  PROC
156  EXPORT UsageFault_Handler [WEAK]
157  B .
158  ENDP
159 SVC_Handler PROC
160  EXPORT SVC_Handler [WEAK]
161  B .
162  ENDP
163 DebugMon_Handler\
164  PROC
165  EXPORT DebugMon_Handler [WEAK]
166  B .
167  ENDP
168 PendSV_Handler PROC
169  EXPORT PendSV_Handler [WEAK]
170  B .
171  ENDP
172 SysTick_Handler PROC
173  EXPORT SysTick_Handler [WEAK]
174  B .
175  ENDP
176 
177 Default_Handler PROC
178 
179  EXPORT WDT_IRQHandler [WEAK]
180  EXPORT RTC_IRQHandler [WEAK]
181  EXPORT TIM0_IRQHandler [WEAK]
182  EXPORT TIM2_IRQHandler [WEAK]
183  EXPORT MCIA_IRQHandler [WEAK]
184  EXPORT MCIB_IRQHandler [WEAK]
185  EXPORT UART0_IRQHandler [WEAK]
186  EXPORT UART1_IRQHandler [WEAK]
187  EXPORT UART2_IRQHandler [WEAK]
188  EXPORT UART3_IRQHandler [WEAK]
189  EXPORT UART4_IRQHandler [WEAK]
190  EXPORT AACI_IRQHandler [WEAK]
191  EXPORT CLCD_IRQHandler [WEAK]
192  EXPORT ENET_IRQHandler [WEAK]
193  EXPORT USBDC_IRQHandler [WEAK]
194  EXPORT USBHC_IRQHandler [WEAK]
195  EXPORT CHLCD_IRQHandler [WEAK]
196  EXPORT FLEXRAY_IRQHandler [WEAK]
197  EXPORT CAN_IRQHandler [WEAK]
198  EXPORT LIN_IRQHandler [WEAK]
199  EXPORT I2C_IRQHandler [WEAK]
200  EXPORT CPU_CLCD_IRQHandler [WEAK]
201  EXPORT SPI_IRQHandler [WEAK]
202 
204 RTC_IRQHandler
205 TIM0_IRQHandler
206 TIM2_IRQHandler
207 MCIA_IRQHandler
208 MCIB_IRQHandler
209 UART0_IRQHandler
210 UART1_IRQHandler
211 UART2_IRQHandler
212 UART3_IRQHandler
213 UART4_IRQHandler
214 AACI_IRQHandler
215 CLCD_IRQHandler
216 ENET_IRQHandler
217 USBDC_IRQHandler
218 USBHC_IRQHandler
219 CHLCD_IRQHandler
220 FLEXRAY_IRQHandler
221 CAN_IRQHandler
222 LIN_IRQHandler
223 I2C_IRQHandler
224 CPU_CLCD_IRQHandler
225 SPI_IRQHandler
226  B .
227 
228  ENDP
229 
230 
231  ALIGN
232 
233 
234 ; User Initial Stack & Heap
235 
236  IF :DEF:__MICROLIB
237 
238  EXPORT __initial_sp
239  EXPORT __heap_base
240  EXPORT __heap_limit
241 
242  ELSE
243 
244  IMPORT __use_two_region_memory
245  EXPORT __user_initial_stackheap
246 
247 __user_initial_stackheap PROC
248  LDR R0, = Heap_Mem
249  LDR R1, =(Stack_Mem + Stack_Size)
250  LDR R2, = (Heap_Mem + Heap_Size)
251  LDR R3, = Stack_Mem
252  BX LR
253  ENDP
254 
255  ALIGN
256 
257  ENDIF
258 
259 
260  END