Added all the F4 libraries to the project
[fw/stlink] / exampleF4 / CMSIS / DSP_Lib / Examples / arm_linear_interp_example / ARM / startup_ARMCM0.s
1 ;/**************************************************************************//**
2 ; * @file     startup_ARMCM0.s
3 ; * @brief    CMSIS Cortex-M0 Core Device Startup File
4 ; *           for CM0 Device Series
5 ; * @version  V1.04
6 ; * @date     14. January 2011
7 ; *------- <<< Use Configuration Wizard in Context Menu >>> ------------------
8 ; *
9 ; ******************************************************************************/
10
11
12 ; <h> Stack Configuration
13 ;   <o> Stack Size (in Bytes) <0x0-0xFFFFFFFF:8>
14 ; </h>
15
16 Stack_Size      EQU     0x00000400
17
18                 AREA    STACK, NOINIT, READWRITE, ALIGN=3
19 Stack_Mem       SPACE   Stack_Size
20 __initial_sp
21
22
23 ; <h> Heap Configuration
24 ;   <o>  Heap Size (in Bytes) <0x0-0xFFFFFFFF:8>
25 ; </h>
26
27 Heap_Size       EQU     0x00000000
28
29                 AREA    HEAP, NOINIT, READWRITE, ALIGN=3
30 __heap_base
31 Heap_Mem        SPACE   Heap_Size
32 __heap_limit
33
34
35                 PRESERVE8
36                 THUMB
37
38
39 ; Vector Table Mapped to Address 0 at Reset
40
41                 AREA    RESET, DATA, READONLY
42                 EXPORT  __Vectors
43                 EXPORT  __Vectors_End
44                 EXPORT  __Vectors_Size
45
46 __Vectors       DCD     __initial_sp              ; Top of Stack
47                 DCD     Reset_Handler             ; Reset Handler
48                 DCD     NMI_Handler               ; NMI Handler
49                 DCD     HardFault_Handler         ; Hard Fault Handler
50                 DCD     0                         ; Reserved
51                 DCD     0                         ; Reserved
52                 DCD     0                         ; Reserved
53                 DCD     0                         ; Reserved
54                 DCD     0                         ; Reserved
55                 DCD     0                         ; Reserved
56                 DCD     0                         ; Reserved
57                 DCD     SVC_Handler               ; SVCall Handler
58                 DCD     0                         ; Reserved
59                 DCD     0                         ; Reserved
60                 DCD     PendSV_Handler            ; PendSV Handler
61                 DCD     SysTick_Handler           ; SysTick Handler
62
63                 ; External Interrupts
64                 DCD     DEF_IRQHandler            ;  0: Default
65 __Vectors_End
66
67 __Vectors_Size  EQU     __Vectors_End - __Vectors
68
69                 AREA    |.text|, CODE, READONLY
70
71
72 ; Reset Handler
73
74 Reset_Handler   PROC
75                 EXPORT  Reset_Handler             [WEAK]
76                 IMPORT  SystemInit
77                 IMPORT  __main
78                 LDR     R0, =SystemInit
79                 BLX     R0
80                 LDR     R0, =__main
81                 BX      R0
82                 ENDP
83
84
85 ; Dummy Exception Handlers (infinite loops which can be modified)
86
87 NMI_Handler     PROC
88                 EXPORT  NMI_Handler               [WEAK]
89                 B       .
90                 ENDP
91 HardFault_Handler\
92                 PROC
93                 EXPORT  HardFault_Handler         [WEAK]
94                 B       .
95                 ENDP
96 SVC_Handler     PROC
97                 EXPORT  SVC_Handler               [WEAK]
98                 B       .
99                 ENDP
100 PendSV_Handler  PROC
101                 EXPORT  PendSV_Handler            [WEAK]
102                 B       .
103                 ENDP
104 SysTick_Handler PROC
105                 EXPORT  SysTick_Handler           [WEAK]
106                 B       .
107                 ENDP
108
109 Default_Handler PROC
110                 EXPORT  DEF_IRQHandler            [WEAK]
111 DEF_IRQHandler
112                 B       .
113                 ENDP
114
115
116                 ALIGN
117
118
119 ; User Initial Stack & Heap
120
121                 IF      :DEF:__MICROLIB
122                 
123                 EXPORT  __initial_sp
124                 EXPORT  __heap_base
125                 EXPORT  __heap_limit
126                 
127                 ELSE
128                 
129                 IMPORT  __use_two_region_memory
130                 EXPORT  __user_initial_stackheap
131 __user_initial_stackheap
132
133                 LDR     R0, =  Heap_Mem
134                 LDR     R1, =(Stack_Mem + Stack_Size)
135                 LDR     R2, = (Heap_Mem +  Heap_Size)
136                 LDR     R3, = Stack_Mem
137                 BX      LR
138
139                 ALIGN
140
141                 ENDIF
142
143
144                 END