Added all the F4 libraries to the project
[fw/stlink] / exampleF4 / CMSIS / DSP_Lib / Examples / arm_class_marks_example / GCC / 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 /* Version: CodeSourcery Sourcery G++ Lite (with CS3)                        */
13 /*****************************************************************************/
14
15
16 /*
17 // <h> Stack Configuration
18 //   <o> Stack Size (in Bytes) <0x0-0xFFFFFFFF:8>
19 // </h>
20 */
21
22     .equ    Stack_Size, 0x00000100
23     .section ".stack", "w"
24     .align  3
25     .globl  __cs3_stack_mem
26     .globl  __cs3_stack_size
27 __cs3_stack_mem:
28     .if     Stack_Size
29     .space  Stack_Size
30     .endif
31     .size   __cs3_stack_mem,  . - __cs3_stack_mem
32     .set    __cs3_stack_size, . - __cs3_stack_mem
33
34
35 /*
36 // <h> Heap Configuration
37 //   <o>  Heap Size (in Bytes) <0x0-0xFFFFFFFF:8>
38 // </h>
39 */
40
41     .equ    Heap_Size,  0x00001000
42     
43     .section ".heap", "w"
44     .align  3
45     .globl  __cs3_heap_start
46     .globl  __cs3_heap_end
47 __cs3_heap_start:
48     .if     Heap_Size
49     .space  Heap_Size
50     .endif
51 __cs3_heap_end:
52
53
54 /* Vector Table */
55
56     .section ".cs3.interrupt_vector"
57     .globl  __cs3_interrupt_vector_cortex_m
58     .type   __cs3_interrupt_vector_cortex_m, %object
59
60 __cs3_interrupt_vector_cortex_m:
61     .long   __cs3_stack                 /* Top of Stack                 */
62     .long   __cs3_reset                 /* Reset Handler                */
63     .long   NMI_Handler                 /* NMI Handler                  */
64     .long   HardFault_Handler           /* Hard Fault Handler           */
65     .long   0                           /* Reserved                     */
66     .long   0                           /* Reserved                     */
67     .long   0                           /* Reserved                     */
68     .long   0                           /* Reserved                     */
69     .long   0                           /* Reserved                     */
70     .long   0                           /* Reserved                     */
71     .long   0                           /* Reserved                     */
72     .long   SVC_Handler                 /* SVCall Handler               */
73     .long   0                           /* Reserved                     */
74     .long   0                           /* Reserved                     */
75     .long   PendSV_Handler              /* PendSV Handler               */
76     .long   SysTick_Handler             /* SysTick Handler              */
77
78     /* External Interrupts */
79     .long   DEF_IRQHandler              /*  0: Default                  */
80
81
82     .size   __cs3_interrupt_vector_cortex_m, . - __cs3_interrupt_vector_cortex_m
83
84
85     .thumb
86
87
88 /* Reset Handler */
89
90     .section .cs3.reset,"x",%progbits
91     .thumb_func
92     .globl  __cs3_reset_cortex_m
93     .type   __cs3_reset_cortex_m, %function
94 __cs3_reset_cortex_m:
95     .fnstart
96     LDR     R0, =SystemInit
97     BLX     R0
98     LDR     R0,=_start
99     BX      R0
100     .pool
101     .cantunwind
102     .fnend
103     .size   __cs3_reset_cortex_m,.-__cs3_reset_cortex_m
104
105     .section ".text"
106
107 /* Exception Handlers */
108
109     .weak   NMI_Handler
110     .type   NMI_Handler, %function
111 NMI_Handler:
112     B       .
113     .size   NMI_Handler, . - NMI_Handler
114
115     .weak   HardFault_Handler
116     .type   HardFault_Handler, %function
117 HardFault_Handler:
118     B       .
119     .size   HardFault_Handler, . - HardFault_Handler
120
121     .weak   SVC_Handler
122     .type   SVC_Handler, %function
123 SVC_Handler:
124     B       .
125     .size   SVC_Handler, . - SVC_Handler
126
127     .weak   PendSV_Handler
128     .type   PendSV_Handler, %function
129 PendSV_Handler:
130     B       .
131     .size   PendSV_Handler, . - PendSV_Handler
132
133     .weak   SysTick_Handler
134     .type   SysTick_Handler, %function
135 SysTick_Handler:
136     B       .
137     .size   SysTick_Handler, . - SysTick_Handler
138
139
140 /* IRQ Handlers */
141
142     .globl  Default_Handler
143     .type   Default_Handler, %function
144 Default_Handler:
145     B       .
146     .size   Default_Handler, . - Default_Handler
147
148     .macro  IRQ handler
149     .weak   \handler
150     .set    \handler, Default_Handler
151     .endm
152
153     IRQ     DEF_IRQHandler
154
155     .end