2 Copyright (c) 2013, Nordic Semiconductor ASA
5 Redistribution and use in source and binary forms, with or without
6 modification, are permitted provided that the following conditions are met:
8 * Redistributions of source code must retain the above copyright notice, this
9 list of conditions and the following disclaimer.
11 * Redistributions in binary form must reproduce the above copyright notice,
12 this list of conditions and the following disclaimer in the documentation
13 and/or other materials provided with the distribution.
15 * Neither the name of Nordic Semiconductor ASA nor the names of its
16 contributors may be used to endorse or promote products derived from
17 this software without specific prior written permission.
19 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22 DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
23 FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
25 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
26 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
27 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32 NOTE: Template files (including this one) are application specific and therefore
33 expected to be copied into the application project folder prior to its use!
42 .equ Stack_Size, __STACK_SIZE
50 .size __StackLimit, . - __StackLimit
52 .size __StackTop, . - __StackTop
57 .equ Heap_Size, __HEAP_SIZE
67 .size __HeapBase, . - __HeapBase
69 .size __HeapLimit, . - __HeapLimit
75 .long __StackTop /* Top of Stack */
76 .long Reset_Handler /* Reset Handler */
77 .long NMI_Handler /* NMI Handler */
78 .long HardFault_Handler /* Hard Fault Handler */
79 .long 0 /* Reserved */
80 .long 0 /* Reserved */
81 .long 0 /* Reserved */
82 .long 0 /* Reserved */
83 .long 0 /* Reserved */
84 .long 0 /* Reserved */
85 .long 0 /* Reserved */
86 .long SVC_Handler /* SVCall Handler */
87 .long 0 /* Reserved */
88 .long 0 /* Reserved */
89 .long PendSV_Handler /* PendSV Handler */
90 .long SysTick_Handler /* SysTick Handler */
92 /* External Interrupts */
93 .long POWER_CLOCK_IRQHandler /*POWER_CLOCK */
94 .long RADIO_IRQHandler /*RADIO */
95 .long UART0_IRQHandler /*UART0 */
96 .long SPI0_TWI0_IRQHandler /*SPI0_TWI0 */
97 .long SPI1_TWI1_IRQHandler /*SPI1_TWI1 */
99 .long GPIOTE_IRQHandler /*GPIOTE */
100 .long ADC_IRQHandler /*ADC */
101 .long TIMER0_IRQHandler /*TIMER0 */
102 .long TIMER1_IRQHandler /*TIMER1 */
103 .long TIMER2_IRQHandler /*TIMER2 */
104 .long RTC0_IRQHandler /*RTC0 */
105 .long TEMP_IRQHandler /*TEMP */
106 .long RNG_IRQHandler /*RNG */
107 .long ECB_IRQHandler /*ECB */
108 .long CCM_AAR_IRQHandler /*CCM_AAR */
109 .long WDT_IRQHandler /*WDT */
110 .long RTC1_IRQHandler /*RTC1 */
111 .long QDEC_IRQHandler /*QDEC */
112 .long LPCOMP_IRQHandler /*LPCOMP */
113 .long SWI0_IRQHandler /*SWI0 */
114 .long SWI1_IRQHandler /*SWI1 */
115 .long SWI2_IRQHandler /*SWI2 */
116 .long SWI3_IRQHandler /*SWI3 */
117 .long SWI4_IRQHandler /*SWI4 */
118 .long SWI5_IRQHandler /*SWI5 */
119 .long 0 /*Reserved */
120 .long 0 /*Reserved */
121 .long 0 /*Reserved */
122 .long 0 /*Reserved */
123 .long 0 /*Reserved */
124 .long 0 /*Reserved */
127 .size __Vectors, . - __Vectors
131 .equ NRF_POWER_RAMON_ADDRESS, 0x40000524
132 .equ NRF_POWER_RAMON_RAMxON_ONMODE_Msk, 0x3
139 .type Reset_Handler, %function
143 /* Make sure ALL RAM banks are powered on */
144 LDR R0, =NRF_POWER_RAMON_ADDRESS
146 MOVS R1, #NRF_POWER_RAMON_RAMxON_ONMODE_Msk
150 /* Loop to copy data from read only memory to RAM. The ranges
151 * of copy from/to are specified by following symbols evaluated in
153 * __etext: End of code section, i.e., begin of data sections to copy from.
154 * __data_start__/__data_end__: RAM address range that data should be
155 * copied to. Both must be aligned to 4 bytes boundary. */
158 ldr r2, =__data_start__
159 ldr r3, =__data_end__
179 .size Reset_Handler,.-Reset_Handler
184 /* Dummy Exception Handlers (infinite loops which can be modified) */
187 .type NMI_Handler, %function
190 .size NMI_Handler, . - NMI_Handler
193 .weak HardFault_Handler
194 .type HardFault_Handler, %function
197 .size HardFault_Handler, . - HardFault_Handler
201 .type SVC_Handler, %function
204 .size SVC_Handler, . - SVC_Handler
208 .type PendSV_Handler, %function
211 .size PendSV_Handler, . - PendSV_Handler
214 .weak SysTick_Handler
215 .type SysTick_Handler, %function
218 .size SysTick_Handler, . - SysTick_Handler
223 .globl Default_Handler
224 .type Default_Handler, %function
227 .size Default_Handler, . - Default_Handler
231 .set \handler, Default_Handler
234 IRQ POWER_CLOCK_IRQHandler
237 IRQ SPI0_TWI0_IRQHandler
238 IRQ SPI1_TWI1_IRQHandler
239 IRQ GPIOTE_IRQHandler
241 IRQ TIMER0_IRQHandler
242 IRQ TIMER1_IRQHandler
243 IRQ TIMER2_IRQHandler
248 IRQ CCM_AAR_IRQHandler
252 IRQ LPCOMP_IRQHandler