1 /**************************************************************************//**
2 * @file startup_ARMCM0.s
3 * @brief CMSIS Cortex-M0 Core Device Startup File
4 * for CM0 Device Series
6 * @date 14. January 2011
7 *------- <<< Use Configuration Wizard in Context Menu >>> ------------------
9 ******************************************************************************/
11 /*****************************************************************************/
12 /* Version: CodeSourcery Sourcery G++ Lite (with CS3) */
13 /*****************************************************************************/
17 // <h> Stack Configuration
18 // <o> Stack Size (in Bytes) <0x0-0xFFFFFFFF:8>
22 .equ Stack_Size, 0x00000100
23 .section ".stack", "w"
25 .globl __cs3_stack_mem
26 .globl __cs3_stack_size
31 .size __cs3_stack_mem, . - __cs3_stack_mem
32 .set __cs3_stack_size, . - __cs3_stack_mem
36 // <h> Heap Configuration
37 // <o> Heap Size (in Bytes) <0x0-0xFFFFFFFF:8>
41 .equ Heap_Size, 0x00001000
45 .globl __cs3_heap_start
56 .section ".cs3.interrupt_vector"
57 .globl __cs3_interrupt_vector_cortex_m
58 .type __cs3_interrupt_vector_cortex_m, %object
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 */
78 /* External Interrupts */
79 .long DEF_IRQHandler /* 0: Default */
82 .size __cs3_interrupt_vector_cortex_m, . - __cs3_interrupt_vector_cortex_m
90 .section .cs3.reset,"x",%progbits
92 .globl __cs3_reset_cortex_m
93 .type __cs3_reset_cortex_m, %function
103 .size __cs3_reset_cortex_m,.-__cs3_reset_cortex_m
107 /* Exception Handlers */
110 .type NMI_Handler, %function
113 .size NMI_Handler, . - NMI_Handler
115 .weak HardFault_Handler
116 .type HardFault_Handler, %function
119 .size HardFault_Handler, . - HardFault_Handler
122 .type SVC_Handler, %function
125 .size SVC_Handler, . - SVC_Handler
128 .type PendSV_Handler, %function
131 .size PendSV_Handler, . - PendSV_Handler
133 .weak SysTick_Handler
134 .type SysTick_Handler, %function
137 .size SysTick_Handler, . - SysTick_Handler
142 .globl Default_Handler
143 .type Default_Handler, %function
146 .size Default_Handler, . - Default_Handler
150 .set \handler, Default_Handler