Mouse code for the MacroRat
mbed-dev/targets/TARGET_NXP/TARGET_LPC13XX/device/TOOLCHAIN_ARM_MICRO/startup_LPC13xx.S@18:6a4db94011d3, 2017-05-14 (annotated)
- Committer:
- sahilmgandhi
- Date:
- Sun May 14 23:18:57 2017 +0000
- Revision:
- 18:6a4db94011d3
Publishing again
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
sahilmgandhi | 18:6a4db94011d3 | 1 | ;/***************************************************************************** |
sahilmgandhi | 18:6a4db94011d3 | 2 | ; * @file: startup_LPC13xx.s |
sahilmgandhi | 18:6a4db94011d3 | 3 | ; * @purpose: CMSIS Cortex-M3 Core Device Startup File |
sahilmgandhi | 18:6a4db94011d3 | 4 | ; * for the NXP LPC13xx Device Series |
sahilmgandhi | 18:6a4db94011d3 | 5 | ; * @version: V1.02, modified for mbed |
sahilmgandhi | 18:6a4db94011d3 | 6 | ; * @date: 27. July 2009, modified 3rd Aug 2009 |
sahilmgandhi | 18:6a4db94011d3 | 7 | ; *------- <<< Use Configuration Wizard in Context Menu >>> ------------------ |
sahilmgandhi | 18:6a4db94011d3 | 8 | ; * |
sahilmgandhi | 18:6a4db94011d3 | 9 | ; * Copyright (C) 2009 ARM Limited. All rights reserved. |
sahilmgandhi | 18:6a4db94011d3 | 10 | ; * ARM Limited (ARM) is supplying this software for use with Cortex-M3 |
sahilmgandhi | 18:6a4db94011d3 | 11 | ; * processor based microcontrollers. This file can be freely distributed |
sahilmgandhi | 18:6a4db94011d3 | 12 | ; * within development tools that are supporting such ARM based processors. |
sahilmgandhi | 18:6a4db94011d3 | 13 | ; * |
sahilmgandhi | 18:6a4db94011d3 | 14 | ; * THIS SOFTWARE IS PROVIDED "AS IS". NO WARRANTIES, WHETHER EXPRESS, IMPLIED |
sahilmgandhi | 18:6a4db94011d3 | 15 | ; * OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF |
sahilmgandhi | 18:6a4db94011d3 | 16 | ; * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE. |
sahilmgandhi | 18:6a4db94011d3 | 17 | ; * ARM SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR |
sahilmgandhi | 18:6a4db94011d3 | 18 | ; * CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER. |
sahilmgandhi | 18:6a4db94011d3 | 19 | ; * |
sahilmgandhi | 18:6a4db94011d3 | 20 | ; *****************************************************************************/ |
sahilmgandhi | 18:6a4db94011d3 | 21 | Stack_Size EQU 0x00000400 |
sahilmgandhi | 18:6a4db94011d3 | 22 | |
sahilmgandhi | 18:6a4db94011d3 | 23 | AREA STACK, NOINIT, READWRITE, ALIGN=3 |
sahilmgandhi | 18:6a4db94011d3 | 24 | EXPORT __initial_sp |
sahilmgandhi | 18:6a4db94011d3 | 25 | |
sahilmgandhi | 18:6a4db94011d3 | 26 | Stack_Mem SPACE Stack_Size |
sahilmgandhi | 18:6a4db94011d3 | 27 | __initial_sp EQU 0x10002000 ; Top of RAM from LPC1347 |
sahilmgandhi | 18:6a4db94011d3 | 28 | |
sahilmgandhi | 18:6a4db94011d3 | 29 | |
sahilmgandhi | 18:6a4db94011d3 | 30 | Heap_Size EQU 0x00000000 |
sahilmgandhi | 18:6a4db94011d3 | 31 | |
sahilmgandhi | 18:6a4db94011d3 | 32 | AREA HEAP, NOINIT, READWRITE, ALIGN=3 |
sahilmgandhi | 18:6a4db94011d3 | 33 | EXPORT __heap_base |
sahilmgandhi | 18:6a4db94011d3 | 34 | EXPORT __heap_limit |
sahilmgandhi | 18:6a4db94011d3 | 35 | |
sahilmgandhi | 18:6a4db94011d3 | 36 | __heap_base |
sahilmgandhi | 18:6a4db94011d3 | 37 | Heap_Mem SPACE Heap_Size |
sahilmgandhi | 18:6a4db94011d3 | 38 | __heap_limit |
sahilmgandhi | 18:6a4db94011d3 | 39 | |
sahilmgandhi | 18:6a4db94011d3 | 40 | PRESERVE8 |
sahilmgandhi | 18:6a4db94011d3 | 41 | THUMB |
sahilmgandhi | 18:6a4db94011d3 | 42 | |
sahilmgandhi | 18:6a4db94011d3 | 43 | ; Vector Table Mapped to Address 0 at Reset |
sahilmgandhi | 18:6a4db94011d3 | 44 | |
sahilmgandhi | 18:6a4db94011d3 | 45 | AREA RESET, DATA, READONLY |
sahilmgandhi | 18:6a4db94011d3 | 46 | EXPORT __Vectors |
sahilmgandhi | 18:6a4db94011d3 | 47 | |
sahilmgandhi | 18:6a4db94011d3 | 48 | __Vectors DCD __initial_sp ; Top of Stack |
sahilmgandhi | 18:6a4db94011d3 | 49 | DCD Reset_Handler ; Reset Handler |
sahilmgandhi | 18:6a4db94011d3 | 50 | DCD NMI_Handler ; NMI Handler |
sahilmgandhi | 18:6a4db94011d3 | 51 | DCD HardFault_Handler ; Hard Fault Handler |
sahilmgandhi | 18:6a4db94011d3 | 52 | DCD MemManage_Handler ; MPU Fault Handler |
sahilmgandhi | 18:6a4db94011d3 | 53 | DCD BusFault_Handler ; Bus Fault Handler |
sahilmgandhi | 18:6a4db94011d3 | 54 | DCD UsageFault_Handler ; Usage Fault Handler |
sahilmgandhi | 18:6a4db94011d3 | 55 | DCD 0 ; Reserved |
sahilmgandhi | 18:6a4db94011d3 | 56 | DCD 0 ; Reserved |
sahilmgandhi | 18:6a4db94011d3 | 57 | DCD 0 ; Reserved |
sahilmgandhi | 18:6a4db94011d3 | 58 | DCD 0 ; Reserved |
sahilmgandhi | 18:6a4db94011d3 | 59 | DCD SVC_Handler ; SVCall Handler |
sahilmgandhi | 18:6a4db94011d3 | 60 | DCD DebugMon_Handler ; Debug Monitor Handler |
sahilmgandhi | 18:6a4db94011d3 | 61 | DCD 0 ; Reserved |
sahilmgandhi | 18:6a4db94011d3 | 62 | DCD PendSV_Handler ; PendSV Handler |
sahilmgandhi | 18:6a4db94011d3 | 63 | DCD SysTick_Handler ; SysTick Handler |
sahilmgandhi | 18:6a4db94011d3 | 64 | |
sahilmgandhi | 18:6a4db94011d3 | 65 | ; External Interrupts |
sahilmgandhi | 18:6a4db94011d3 | 66 | |
sahilmgandhi | 18:6a4db94011d3 | 67 | DCD PIN_INT0_Handler ; All GPIO pin can be routed to PIN_INTx |
sahilmgandhi | 18:6a4db94011d3 | 68 | DCD PIN_INT1_Handler |
sahilmgandhi | 18:6a4db94011d3 | 69 | DCD PIN_INT2_Handler |
sahilmgandhi | 18:6a4db94011d3 | 70 | DCD PIN_INT3_Handler |
sahilmgandhi | 18:6a4db94011d3 | 71 | DCD PIN_INT4_Handler |
sahilmgandhi | 18:6a4db94011d3 | 72 | DCD PIN_INT5_Handler |
sahilmgandhi | 18:6a4db94011d3 | 73 | DCD PIN_INT6_Handler |
sahilmgandhi | 18:6a4db94011d3 | 74 | DCD PIN_INT7_Handler |
sahilmgandhi | 18:6a4db94011d3 | 75 | DCD GINT0_Handler |
sahilmgandhi | 18:6a4db94011d3 | 76 | DCD GINT1_Handler ; PIO0 (0:7) |
sahilmgandhi | 18:6a4db94011d3 | 77 | DCD 0 |
sahilmgandhi | 18:6a4db94011d3 | 78 | DCD 0 |
sahilmgandhi | 18:6a4db94011d3 | 79 | DCD OSTIMER_Handler |
sahilmgandhi | 18:6a4db94011d3 | 80 | DCD 0 |
sahilmgandhi | 18:6a4db94011d3 | 81 | DCD SSP1_Handler ; SSP1 |
sahilmgandhi | 18:6a4db94011d3 | 82 | DCD I2C_Handler ; I2C |
sahilmgandhi | 18:6a4db94011d3 | 83 | DCD CT16B0_Handler ; 16-bit Timer0 |
sahilmgandhi | 18:6a4db94011d3 | 84 | DCD CT16B1_Handler ; 16-bit Timer1 |
sahilmgandhi | 18:6a4db94011d3 | 85 | DCD CT32B0_Handler ; 32-bit Timer0 |
sahilmgandhi | 18:6a4db94011d3 | 86 | DCD CT32B1_Handler ; 32-bit Timer1 |
sahilmgandhi | 18:6a4db94011d3 | 87 | DCD SSP0_Handler ; SSP0 |
sahilmgandhi | 18:6a4db94011d3 | 88 | DCD USART_Handler ; USART |
sahilmgandhi | 18:6a4db94011d3 | 89 | DCD USB_Handler ; USB IRQ |
sahilmgandhi | 18:6a4db94011d3 | 90 | DCD USB_FIQHandler ; USB FIQ |
sahilmgandhi | 18:6a4db94011d3 | 91 | DCD ADC_Handler ; A/D Converter |
sahilmgandhi | 18:6a4db94011d3 | 92 | DCD WDT_Handler ; Watchdog timer |
sahilmgandhi | 18:6a4db94011d3 | 93 | DCD BOD_Handler ; Brown Out Detect |
sahilmgandhi | 18:6a4db94011d3 | 94 | DCD FMC_Handler ; IP2111 Flash Memory Controller |
sahilmgandhi | 18:6a4db94011d3 | 95 | DCD OSCFAIL_Handler ; OSC FAIL |
sahilmgandhi | 18:6a4db94011d3 | 96 | DCD PVTCIRCUIT_Handler ; PVT CIRCUIT |
sahilmgandhi | 18:6a4db94011d3 | 97 | DCD USBWakeup_Handler ; USB wake up |
sahilmgandhi | 18:6a4db94011d3 | 98 | DCD 0 |
sahilmgandhi | 18:6a4db94011d3 | 99 | |
sahilmgandhi | 18:6a4db94011d3 | 100 | IF :LNOT::DEF:NO_CRP |
sahilmgandhi | 18:6a4db94011d3 | 101 | AREA |.ARM.__at_0x02FC|, CODE, READONLY |
sahilmgandhi | 18:6a4db94011d3 | 102 | CRP_Key DCD 0xFFFFFFFF |
sahilmgandhi | 18:6a4db94011d3 | 103 | ENDIF |
sahilmgandhi | 18:6a4db94011d3 | 104 | |
sahilmgandhi | 18:6a4db94011d3 | 105 | |
sahilmgandhi | 18:6a4db94011d3 | 106 | AREA |.text|, CODE, READONLY |
sahilmgandhi | 18:6a4db94011d3 | 107 | |
sahilmgandhi | 18:6a4db94011d3 | 108 | |
sahilmgandhi | 18:6a4db94011d3 | 109 | ; Reset Handler |
sahilmgandhi | 18:6a4db94011d3 | 110 | |
sahilmgandhi | 18:6a4db94011d3 | 111 | Reset_Handler PROC |
sahilmgandhi | 18:6a4db94011d3 | 112 | EXPORT Reset_Handler [WEAK] |
sahilmgandhi | 18:6a4db94011d3 | 113 | IMPORT SystemInit |
sahilmgandhi | 18:6a4db94011d3 | 114 | IMPORT __main |
sahilmgandhi | 18:6a4db94011d3 | 115 | LDR R0, =SystemInit |
sahilmgandhi | 18:6a4db94011d3 | 116 | BLX R0 |
sahilmgandhi | 18:6a4db94011d3 | 117 | LDR R0, =__main |
sahilmgandhi | 18:6a4db94011d3 | 118 | BX R0 |
sahilmgandhi | 18:6a4db94011d3 | 119 | ENDP |
sahilmgandhi | 18:6a4db94011d3 | 120 | |
sahilmgandhi | 18:6a4db94011d3 | 121 | |
sahilmgandhi | 18:6a4db94011d3 | 122 | ; Dummy Exception Handlers (infinite loops which can be modified) |
sahilmgandhi | 18:6a4db94011d3 | 123 | |
sahilmgandhi | 18:6a4db94011d3 | 124 | NMI_Handler PROC |
sahilmgandhi | 18:6a4db94011d3 | 125 | EXPORT NMI_Handler [WEAK] |
sahilmgandhi | 18:6a4db94011d3 | 126 | B . |
sahilmgandhi | 18:6a4db94011d3 | 127 | ENDP |
sahilmgandhi | 18:6a4db94011d3 | 128 | HardFault_Handler\ |
sahilmgandhi | 18:6a4db94011d3 | 129 | PROC |
sahilmgandhi | 18:6a4db94011d3 | 130 | EXPORT HardFault_Handler [WEAK] |
sahilmgandhi | 18:6a4db94011d3 | 131 | B . |
sahilmgandhi | 18:6a4db94011d3 | 132 | ENDP |
sahilmgandhi | 18:6a4db94011d3 | 133 | MemManage_Handler\ |
sahilmgandhi | 18:6a4db94011d3 | 134 | PROC |
sahilmgandhi | 18:6a4db94011d3 | 135 | EXPORT MemManage_Handler [WEAK] |
sahilmgandhi | 18:6a4db94011d3 | 136 | B . |
sahilmgandhi | 18:6a4db94011d3 | 137 | ENDP |
sahilmgandhi | 18:6a4db94011d3 | 138 | BusFault_Handler\ |
sahilmgandhi | 18:6a4db94011d3 | 139 | PROC |
sahilmgandhi | 18:6a4db94011d3 | 140 | EXPORT BusFault_Handler [WEAK] |
sahilmgandhi | 18:6a4db94011d3 | 141 | B . |
sahilmgandhi | 18:6a4db94011d3 | 142 | ENDP |
sahilmgandhi | 18:6a4db94011d3 | 143 | UsageFault_Handler\ |
sahilmgandhi | 18:6a4db94011d3 | 144 | PROC |
sahilmgandhi | 18:6a4db94011d3 | 145 | EXPORT UsageFault_Handler [WEAK] |
sahilmgandhi | 18:6a4db94011d3 | 146 | B . |
sahilmgandhi | 18:6a4db94011d3 | 147 | ENDP |
sahilmgandhi | 18:6a4db94011d3 | 148 | SVC_Handler PROC |
sahilmgandhi | 18:6a4db94011d3 | 149 | EXPORT SVC_Handler [WEAK] |
sahilmgandhi | 18:6a4db94011d3 | 150 | B . |
sahilmgandhi | 18:6a4db94011d3 | 151 | ENDP |
sahilmgandhi | 18:6a4db94011d3 | 152 | DebugMon_Handler\ |
sahilmgandhi | 18:6a4db94011d3 | 153 | PROC |
sahilmgandhi | 18:6a4db94011d3 | 154 | EXPORT DebugMon_Handler [WEAK] |
sahilmgandhi | 18:6a4db94011d3 | 155 | B . |
sahilmgandhi | 18:6a4db94011d3 | 156 | ENDP |
sahilmgandhi | 18:6a4db94011d3 | 157 | PendSV_Handler PROC |
sahilmgandhi | 18:6a4db94011d3 | 158 | EXPORT PendSV_Handler [WEAK] |
sahilmgandhi | 18:6a4db94011d3 | 159 | B . |
sahilmgandhi | 18:6a4db94011d3 | 160 | ENDP |
sahilmgandhi | 18:6a4db94011d3 | 161 | SysTick_Handler PROC |
sahilmgandhi | 18:6a4db94011d3 | 162 | EXPORT SysTick_Handler [WEAK] |
sahilmgandhi | 18:6a4db94011d3 | 163 | B . |
sahilmgandhi | 18:6a4db94011d3 | 164 | ENDP |
sahilmgandhi | 18:6a4db94011d3 | 165 | |
sahilmgandhi | 18:6a4db94011d3 | 166 | Default_Handler PROC |
sahilmgandhi | 18:6a4db94011d3 | 167 | |
sahilmgandhi | 18:6a4db94011d3 | 168 | EXPORT PIN_INT0_Handler [WEAK] |
sahilmgandhi | 18:6a4db94011d3 | 169 | EXPORT PIN_INT1_Handler [WEAK] |
sahilmgandhi | 18:6a4db94011d3 | 170 | EXPORT PIN_INT2_Handler [WEAK] |
sahilmgandhi | 18:6a4db94011d3 | 171 | EXPORT PIN_INT3_Handler [WEAK] |
sahilmgandhi | 18:6a4db94011d3 | 172 | EXPORT PIN_INT4_Handler [WEAK] |
sahilmgandhi | 18:6a4db94011d3 | 173 | EXPORT PIN_INT5_Handler [WEAK] |
sahilmgandhi | 18:6a4db94011d3 | 174 | EXPORT PIN_INT6_Handler [WEAK] |
sahilmgandhi | 18:6a4db94011d3 | 175 | EXPORT PIN_INT7_Handler [WEAK] |
sahilmgandhi | 18:6a4db94011d3 | 176 | EXPORT GINT0_Handler [WEAK] |
sahilmgandhi | 18:6a4db94011d3 | 177 | EXPORT GINT1_Handler [WEAK] |
sahilmgandhi | 18:6a4db94011d3 | 178 | EXPORT OSTIMER_Handler [WEAK] |
sahilmgandhi | 18:6a4db94011d3 | 179 | EXPORT SSP1_Handler [WEAK] |
sahilmgandhi | 18:6a4db94011d3 | 180 | EXPORT I2C_Handler [WEAK] |
sahilmgandhi | 18:6a4db94011d3 | 181 | EXPORT CT16B0_Handler [WEAK] |
sahilmgandhi | 18:6a4db94011d3 | 182 | EXPORT CT16B1_Handler [WEAK] |
sahilmgandhi | 18:6a4db94011d3 | 183 | EXPORT CT32B0_Handler [WEAK] |
sahilmgandhi | 18:6a4db94011d3 | 184 | EXPORT CT32B1_Handler [WEAK] |
sahilmgandhi | 18:6a4db94011d3 | 185 | EXPORT SSP0_Handler [WEAK] |
sahilmgandhi | 18:6a4db94011d3 | 186 | EXPORT USART_Handler [WEAK] |
sahilmgandhi | 18:6a4db94011d3 | 187 | EXPORT USB_Handler [WEAK] |
sahilmgandhi | 18:6a4db94011d3 | 188 | EXPORT USB_FIQHandler [WEAK] |
sahilmgandhi | 18:6a4db94011d3 | 189 | EXPORT ADC_Handler [WEAK] |
sahilmgandhi | 18:6a4db94011d3 | 190 | EXPORT WDT_Handler [WEAK] |
sahilmgandhi | 18:6a4db94011d3 | 191 | EXPORT BOD_Handler [WEAK] |
sahilmgandhi | 18:6a4db94011d3 | 192 | EXPORT FMC_Handler [WEAK] |
sahilmgandhi | 18:6a4db94011d3 | 193 | EXPORT OSCFAIL_Handler [WEAK] |
sahilmgandhi | 18:6a4db94011d3 | 194 | EXPORT PVTCIRCUIT_Handler [WEAK] |
sahilmgandhi | 18:6a4db94011d3 | 195 | EXPORT USBWakeup_Handler [WEAK] |
sahilmgandhi | 18:6a4db94011d3 | 196 | |
sahilmgandhi | 18:6a4db94011d3 | 197 | PIN_INT0_Handler |
sahilmgandhi | 18:6a4db94011d3 | 198 | PIN_INT1_Handler |
sahilmgandhi | 18:6a4db94011d3 | 199 | PIN_INT2_Handler |
sahilmgandhi | 18:6a4db94011d3 | 200 | PIN_INT3_Handler |
sahilmgandhi | 18:6a4db94011d3 | 201 | PIN_INT4_Handler |
sahilmgandhi | 18:6a4db94011d3 | 202 | PIN_INT5_Handler |
sahilmgandhi | 18:6a4db94011d3 | 203 | PIN_INT6_Handler |
sahilmgandhi | 18:6a4db94011d3 | 204 | PIN_INT7_Handler |
sahilmgandhi | 18:6a4db94011d3 | 205 | GINT0_Handler |
sahilmgandhi | 18:6a4db94011d3 | 206 | GINT1_Handler |
sahilmgandhi | 18:6a4db94011d3 | 207 | OSTIMER_Handler |
sahilmgandhi | 18:6a4db94011d3 | 208 | SSP1_Handler |
sahilmgandhi | 18:6a4db94011d3 | 209 | I2C_Handler |
sahilmgandhi | 18:6a4db94011d3 | 210 | CT16B0_Handler |
sahilmgandhi | 18:6a4db94011d3 | 211 | CT16B1_Handler |
sahilmgandhi | 18:6a4db94011d3 | 212 | CT32B0_Handler |
sahilmgandhi | 18:6a4db94011d3 | 213 | CT32B1_Handler |
sahilmgandhi | 18:6a4db94011d3 | 214 | SSP0_Handler |
sahilmgandhi | 18:6a4db94011d3 | 215 | USART_Handler |
sahilmgandhi | 18:6a4db94011d3 | 216 | USB_Handler |
sahilmgandhi | 18:6a4db94011d3 | 217 | USB_FIQHandler |
sahilmgandhi | 18:6a4db94011d3 | 218 | ADC_Handler |
sahilmgandhi | 18:6a4db94011d3 | 219 | WDT_Handler |
sahilmgandhi | 18:6a4db94011d3 | 220 | BOD_Handler |
sahilmgandhi | 18:6a4db94011d3 | 221 | FMC_Handler |
sahilmgandhi | 18:6a4db94011d3 | 222 | OSCFAIL_Handler |
sahilmgandhi | 18:6a4db94011d3 | 223 | PVTCIRCUIT_Handler |
sahilmgandhi | 18:6a4db94011d3 | 224 | USBWakeup_Handler |
sahilmgandhi | 18:6a4db94011d3 | 225 | |
sahilmgandhi | 18:6a4db94011d3 | 226 | B . |
sahilmgandhi | 18:6a4db94011d3 | 227 | |
sahilmgandhi | 18:6a4db94011d3 | 228 | ENDP |
sahilmgandhi | 18:6a4db94011d3 | 229 | |
sahilmgandhi | 18:6a4db94011d3 | 230 | ALIGN |
sahilmgandhi | 18:6a4db94011d3 | 231 | END |