Mouse code for the MacroRat
mbed-dev/targets/TARGET_NXP/TARGET_LPC82X/TARGET_SSCI824/device/TOOLCHAIN_ARM_MICRO/startup_LPC8xx.S@46:b156ef445742, 2017-06-03 (annotated)
- Committer:
- sahilmgandhi
- Date:
- Sat Jun 03 00:22:44 2017 +0000
- Revision:
- 46:b156ef445742
- Parent:
- 18:6a4db94011d3
Final code for internal battlebot competition.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
sahilmgandhi | 18:6a4db94011d3 | 1 | ;/***************************************************************************** |
sahilmgandhi | 18:6a4db94011d3 | 2 | ; * @file: startup_LPC8xx.s |
sahilmgandhi | 18:6a4db94011d3 | 3 | ; * @purpose: CMSIS Cortex-M0+ Core Device Startup File |
sahilmgandhi | 18:6a4db94011d3 | 4 | ; * for the NXP LPC8xx Device Series |
sahilmgandhi | 18:6a4db94011d3 | 5 | ; * @version: V1.0 |
sahilmgandhi | 18:6a4db94011d3 | 6 | ; * @date: 16. Aug. 2012 |
sahilmgandhi | 18:6a4db94011d3 | 7 | ; *------- <<< Use Configuration Wizard in Context Menu >>> ------------------ |
sahilmgandhi | 18:6a4db94011d3 | 8 | ; * |
sahilmgandhi | 18:6a4db94011d3 | 9 | ; * Copyright (C) 2012 ARM Limited. All rights reserved. |
sahilmgandhi | 18:6a4db94011d3 | 10 | ; * ARM Limited (ARM) is supplying this software for use with Cortex-M0+ |
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 | |
sahilmgandhi | 18:6a4db94011d3 | 22 | |
sahilmgandhi | 18:6a4db94011d3 | 23 | ; <h> Stack Configuration |
sahilmgandhi | 18:6a4db94011d3 | 24 | ; <o> Stack Size (in Bytes) <0x0-0xFFFFFFFF:8> |
sahilmgandhi | 18:6a4db94011d3 | 25 | ; </h> |
sahilmgandhi | 18:6a4db94011d3 | 26 | |
sahilmgandhi | 18:6a4db94011d3 | 27 | AREA STACK, NOINIT, READWRITE, ALIGN=3 |
sahilmgandhi | 18:6a4db94011d3 | 28 | EXPORT __initial_sp |
sahilmgandhi | 18:6a4db94011d3 | 29 | |
sahilmgandhi | 18:6a4db94011d3 | 30 | __initial_sp EQU 0x10002000 |
sahilmgandhi | 18:6a4db94011d3 | 31 | |
sahilmgandhi | 18:6a4db94011d3 | 32 | |
sahilmgandhi | 18:6a4db94011d3 | 33 | ; <h> Heap Configuration |
sahilmgandhi | 18:6a4db94011d3 | 34 | ; <o> Heap Size (in Bytes) <0x0-0xFFFFFFFF:8> |
sahilmgandhi | 18:6a4db94011d3 | 35 | ; </h> |
sahilmgandhi | 18:6a4db94011d3 | 36 | |
sahilmgandhi | 18:6a4db94011d3 | 37 | Heap_Size EQU 0x00000000 |
sahilmgandhi | 18:6a4db94011d3 | 38 | |
sahilmgandhi | 18:6a4db94011d3 | 39 | AREA HEAP, NOINIT, READWRITE, ALIGN=3 |
sahilmgandhi | 18:6a4db94011d3 | 40 | EXPORT __heap_base |
sahilmgandhi | 18:6a4db94011d3 | 41 | EXPORT __heap_limit |
sahilmgandhi | 18:6a4db94011d3 | 42 | |
sahilmgandhi | 18:6a4db94011d3 | 43 | __heap_base |
sahilmgandhi | 18:6a4db94011d3 | 44 | Heap_Mem SPACE Heap_Size |
sahilmgandhi | 18:6a4db94011d3 | 45 | __heap_limit |
sahilmgandhi | 18:6a4db94011d3 | 46 | |
sahilmgandhi | 18:6a4db94011d3 | 47 | PRESERVE8 |
sahilmgandhi | 18:6a4db94011d3 | 48 | THUMB |
sahilmgandhi | 18:6a4db94011d3 | 49 | |
sahilmgandhi | 18:6a4db94011d3 | 50 | |
sahilmgandhi | 18:6a4db94011d3 | 51 | ; Vector Table Mapped to Address 0 at Reset |
sahilmgandhi | 18:6a4db94011d3 | 52 | |
sahilmgandhi | 18:6a4db94011d3 | 53 | AREA RESET, DATA, READONLY |
sahilmgandhi | 18:6a4db94011d3 | 54 | EXPORT __Vectors |
sahilmgandhi | 18:6a4db94011d3 | 55 | |
sahilmgandhi | 18:6a4db94011d3 | 56 | __Vectors DCD __initial_sp ; Top of Stack |
sahilmgandhi | 18:6a4db94011d3 | 57 | DCD Reset_Handler ; Reset Handler |
sahilmgandhi | 18:6a4db94011d3 | 58 | DCD NMI_Handler ; NMI Handler |
sahilmgandhi | 18:6a4db94011d3 | 59 | DCD HardFault_Handler ; Hard Fault Handler |
sahilmgandhi | 18:6a4db94011d3 | 60 | DCD 0 ; Reserved |
sahilmgandhi | 18:6a4db94011d3 | 61 | DCD 0 ; Reserved |
sahilmgandhi | 18:6a4db94011d3 | 62 | DCD 0 ; Reserved |
sahilmgandhi | 18:6a4db94011d3 | 63 | DCD 0 ; Reserved |
sahilmgandhi | 18:6a4db94011d3 | 64 | DCD 0 ; Reserved |
sahilmgandhi | 18:6a4db94011d3 | 65 | DCD 0 ; Reserved |
sahilmgandhi | 18:6a4db94011d3 | 66 | DCD 0 ; Reserved |
sahilmgandhi | 18:6a4db94011d3 | 67 | DCD SVC_Handler ; SVCall Handler |
sahilmgandhi | 18:6a4db94011d3 | 68 | DCD 0 ; Reserved |
sahilmgandhi | 18:6a4db94011d3 | 69 | DCD 0 ; Reserved |
sahilmgandhi | 18:6a4db94011d3 | 70 | DCD PendSV_Handler ; PendSV Handler |
sahilmgandhi | 18:6a4db94011d3 | 71 | DCD SysTick_Handler ; SysTick Handler |
sahilmgandhi | 18:6a4db94011d3 | 72 | |
sahilmgandhi | 18:6a4db94011d3 | 73 | ; External Interrupts |
sahilmgandhi | 18:6a4db94011d3 | 74 | DCD SPI0_IRQHandler ; SPI0 controller |
sahilmgandhi | 18:6a4db94011d3 | 75 | DCD SPI1_IRQHandler ; SPI1 controller |
sahilmgandhi | 18:6a4db94011d3 | 76 | DCD 0 ; Reserved |
sahilmgandhi | 18:6a4db94011d3 | 77 | DCD UART0_IRQHandler ; UART0 |
sahilmgandhi | 18:6a4db94011d3 | 78 | DCD UART1_IRQHandler ; UART1 |
sahilmgandhi | 18:6a4db94011d3 | 79 | DCD UART2_IRQHandler ; UART2 |
sahilmgandhi | 18:6a4db94011d3 | 80 | DCD 0 ; Reserved |
sahilmgandhi | 18:6a4db94011d3 | 81 | DCD I2C1_IRQHandler ; I2C1 controller |
sahilmgandhi | 18:6a4db94011d3 | 82 | DCD I2C0_IRQHandler ; I2C0 controller |
sahilmgandhi | 18:6a4db94011d3 | 83 | DCD SCT_IRQHandler ; Smart Counter Timer |
sahilmgandhi | 18:6a4db94011d3 | 84 | DCD MRT_IRQHandler ; Multi-Rate Timer |
sahilmgandhi | 18:6a4db94011d3 | 85 | DCD CMP_IRQHandler ; Comparator |
sahilmgandhi | 18:6a4db94011d3 | 86 | DCD WDT_IRQHandler ; PIO1 (0:11) |
sahilmgandhi | 18:6a4db94011d3 | 87 | DCD BOD_IRQHandler ; Brown Out Detect |
sahilmgandhi | 18:6a4db94011d3 | 88 | DCD Flash_IRQHandler ; Flash interrupt |
sahilmgandhi | 18:6a4db94011d3 | 89 | DCD WKT_IRQHandler ; Wakeup timer |
sahilmgandhi | 18:6a4db94011d3 | 90 | DCD ADC_SEQA_IRQHandler ; ADC sequence A completion |
sahilmgandhi | 18:6a4db94011d3 | 91 | DCD ADC_SEQB_IRQHandler ; ADC sequence B completion |
sahilmgandhi | 18:6a4db94011d3 | 92 | DCD ADC_THCMP_IRQHandler ; ADC threshold compare |
sahilmgandhi | 18:6a4db94011d3 | 93 | DCD ADC_OVR_IRQHandler ; ADC overrun |
sahilmgandhi | 18:6a4db94011d3 | 94 | DCD DMA__RQHandler ; DMA interrupt |
sahilmgandhi | 18:6a4db94011d3 | 95 | DCD I2C2_IRQHandler ; I2C2 controller |
sahilmgandhi | 18:6a4db94011d3 | 96 | DCD I2C3_IRQHandler ; I2C3 controller |
sahilmgandhi | 18:6a4db94011d3 | 97 | DCD 0 ; Reserved |
sahilmgandhi | 18:6a4db94011d3 | 98 | DCD PININT0_IRQHandler ; PIO INT0 |
sahilmgandhi | 18:6a4db94011d3 | 99 | DCD PININT1_IRQHandler ; PIO INT1 |
sahilmgandhi | 18:6a4db94011d3 | 100 | DCD PININT2_IRQHandler ; PIO INT2 |
sahilmgandhi | 18:6a4db94011d3 | 101 | DCD PININT3_IRQHandler ; PIO INT3 |
sahilmgandhi | 18:6a4db94011d3 | 102 | DCD PININT4_IRQHandler ; PIO INT4 |
sahilmgandhi | 18:6a4db94011d3 | 103 | DCD PININT5_IRQHandler ; PIO INT5 |
sahilmgandhi | 18:6a4db94011d3 | 104 | DCD PININT6_IRQHandler ; PIO INT6 |
sahilmgandhi | 18:6a4db94011d3 | 105 | DCD PININT7_IRQHandler ; PIO INT7 |
sahilmgandhi | 18:6a4db94011d3 | 106 | |
sahilmgandhi | 18:6a4db94011d3 | 107 | |
sahilmgandhi | 18:6a4db94011d3 | 108 | IF :LNOT::DEF:NO_CRP |
sahilmgandhi | 18:6a4db94011d3 | 109 | AREA |.ARM.__at_0x02FC|, CODE, READONLY |
sahilmgandhi | 18:6a4db94011d3 | 110 | CRP_Key DCD 0xFFFFFFFF |
sahilmgandhi | 18:6a4db94011d3 | 111 | ENDIF |
sahilmgandhi | 18:6a4db94011d3 | 112 | |
sahilmgandhi | 18:6a4db94011d3 | 113 | |
sahilmgandhi | 18:6a4db94011d3 | 114 | AREA |.text|, CODE, READONLY |
sahilmgandhi | 18:6a4db94011d3 | 115 | |
sahilmgandhi | 18:6a4db94011d3 | 116 | ; Reset Handler |
sahilmgandhi | 18:6a4db94011d3 | 117 | |
sahilmgandhi | 18:6a4db94011d3 | 118 | Reset_Handler PROC |
sahilmgandhi | 18:6a4db94011d3 | 119 | EXPORT Reset_Handler [WEAK] |
sahilmgandhi | 18:6a4db94011d3 | 120 | IMPORT SystemInit |
sahilmgandhi | 18:6a4db94011d3 | 121 | IMPORT __main |
sahilmgandhi | 18:6a4db94011d3 | 122 | LDR R0, =SystemInit |
sahilmgandhi | 18:6a4db94011d3 | 123 | BLX R0 |
sahilmgandhi | 18:6a4db94011d3 | 124 | LDR R0, =__main |
sahilmgandhi | 18:6a4db94011d3 | 125 | BX R0 |
sahilmgandhi | 18:6a4db94011d3 | 126 | ENDP |
sahilmgandhi | 18:6a4db94011d3 | 127 | |
sahilmgandhi | 18:6a4db94011d3 | 128 | |
sahilmgandhi | 18:6a4db94011d3 | 129 | ; Dummy Exception Handlers (infinite loops which can be modified) |
sahilmgandhi | 18:6a4db94011d3 | 130 | |
sahilmgandhi | 18:6a4db94011d3 | 131 | HardFault_Handler\ |
sahilmgandhi | 18:6a4db94011d3 | 132 | PROC |
sahilmgandhi | 18:6a4db94011d3 | 133 | EXPORT HardFault_Handler [WEAK] |
sahilmgandhi | 18:6a4db94011d3 | 134 | B . |
sahilmgandhi | 18:6a4db94011d3 | 135 | ENDP |
sahilmgandhi | 18:6a4db94011d3 | 136 | SVC_Handler PROC |
sahilmgandhi | 18:6a4db94011d3 | 137 | EXPORT SVC_Handler [WEAK] |
sahilmgandhi | 18:6a4db94011d3 | 138 | B . |
sahilmgandhi | 18:6a4db94011d3 | 139 | ENDP |
sahilmgandhi | 18:6a4db94011d3 | 140 | PendSV_Handler PROC |
sahilmgandhi | 18:6a4db94011d3 | 141 | EXPORT PendSV_Handler [WEAK] |
sahilmgandhi | 18:6a4db94011d3 | 142 | B . |
sahilmgandhi | 18:6a4db94011d3 | 143 | ENDP |
sahilmgandhi | 18:6a4db94011d3 | 144 | SysTick_Handler PROC |
sahilmgandhi | 18:6a4db94011d3 | 145 | EXPORT SysTick_Handler [WEAK] |
sahilmgandhi | 18:6a4db94011d3 | 146 | B . |
sahilmgandhi | 18:6a4db94011d3 | 147 | ENDP |
sahilmgandhi | 18:6a4db94011d3 | 148 | |
sahilmgandhi | 18:6a4db94011d3 | 149 | Default_Handler PROC |
sahilmgandhi | 18:6a4db94011d3 | 150 | |
sahilmgandhi | 18:6a4db94011d3 | 151 | EXPORT NMI_Handler [WEAK] |
sahilmgandhi | 18:6a4db94011d3 | 152 | EXPORT SPI0_IRQHandler [WEAK] |
sahilmgandhi | 18:6a4db94011d3 | 153 | EXPORT SPI1_IRQHandler [WEAK] |
sahilmgandhi | 18:6a4db94011d3 | 154 | EXPORT UART0_IRQHandler [WEAK] |
sahilmgandhi | 18:6a4db94011d3 | 155 | EXPORT UART1_IRQHandler [WEAK] |
sahilmgandhi | 18:6a4db94011d3 | 156 | EXPORT UART2_IRQHandler [WEAK] |
sahilmgandhi | 18:6a4db94011d3 | 157 | EXPORT I2C1_IRQHandler [WEAK] |
sahilmgandhi | 18:6a4db94011d3 | 158 | EXPORT I2C0_IRQHandler [WEAK] |
sahilmgandhi | 18:6a4db94011d3 | 159 | EXPORT SCT_IRQHandler [WEAK] |
sahilmgandhi | 18:6a4db94011d3 | 160 | EXPORT MRT_IRQHandler [WEAK] |
sahilmgandhi | 18:6a4db94011d3 | 161 | EXPORT CMP_IRQHandler [WEAK] |
sahilmgandhi | 18:6a4db94011d3 | 162 | EXPORT WDT_IRQHandler [WEAK] |
sahilmgandhi | 18:6a4db94011d3 | 163 | EXPORT BOD_IRQHandler [WEAK] |
sahilmgandhi | 18:6a4db94011d3 | 164 | EXPORT Flash_IRQHandler [WEAK] |
sahilmgandhi | 18:6a4db94011d3 | 165 | EXPORT WKT_IRQHandler [WEAK] |
sahilmgandhi | 18:6a4db94011d3 | 166 | EXPORT ADC_SEQA_IRQHandler [WEAK] |
sahilmgandhi | 18:6a4db94011d3 | 167 | EXPORT ADC_SEQB_IRQHandler [WEAK] |
sahilmgandhi | 18:6a4db94011d3 | 168 | EXPORT ADC_THCMP_IRQHandler [WEAK] |
sahilmgandhi | 18:6a4db94011d3 | 169 | EXPORT ADC_OVR_IRQHandler [WEAK] |
sahilmgandhi | 18:6a4db94011d3 | 170 | EXPORT DMA__RQHandler [WEAK] |
sahilmgandhi | 18:6a4db94011d3 | 171 | EXPORT I2C2_IRQHandler [WEAK] |
sahilmgandhi | 18:6a4db94011d3 | 172 | EXPORT I2C3_IRQHandler [WEAK] |
sahilmgandhi | 18:6a4db94011d3 | 173 | EXPORT PININT0_IRQHandler [WEAK] |
sahilmgandhi | 18:6a4db94011d3 | 174 | EXPORT PININT1_IRQHandler [WEAK] |
sahilmgandhi | 18:6a4db94011d3 | 175 | EXPORT PININT2_IRQHandler [WEAK] |
sahilmgandhi | 18:6a4db94011d3 | 176 | EXPORT PININT3_IRQHandler [WEAK] |
sahilmgandhi | 18:6a4db94011d3 | 177 | EXPORT PININT4_IRQHandler [WEAK] |
sahilmgandhi | 18:6a4db94011d3 | 178 | EXPORT PININT5_IRQHandler [WEAK] |
sahilmgandhi | 18:6a4db94011d3 | 179 | EXPORT PININT6_IRQHandler [WEAK] |
sahilmgandhi | 18:6a4db94011d3 | 180 | EXPORT PININT7_IRQHandler [WEAK] |
sahilmgandhi | 18:6a4db94011d3 | 181 | |
sahilmgandhi | 18:6a4db94011d3 | 182 | NMI_Handler |
sahilmgandhi | 18:6a4db94011d3 | 183 | SPI0_IRQHandler |
sahilmgandhi | 18:6a4db94011d3 | 184 | SPI1_IRQHandler |
sahilmgandhi | 18:6a4db94011d3 | 185 | UART0_IRQHandler |
sahilmgandhi | 18:6a4db94011d3 | 186 | UART1_IRQHandler |
sahilmgandhi | 18:6a4db94011d3 | 187 | UART2_IRQHandler |
sahilmgandhi | 18:6a4db94011d3 | 188 | I2C1_IRQHandler |
sahilmgandhi | 18:6a4db94011d3 | 189 | I2C0_IRQHandler |
sahilmgandhi | 18:6a4db94011d3 | 190 | SCT_IRQHandler |
sahilmgandhi | 18:6a4db94011d3 | 191 | MRT_IRQHandler |
sahilmgandhi | 18:6a4db94011d3 | 192 | CMP_IRQHandler |
sahilmgandhi | 18:6a4db94011d3 | 193 | WDT_IRQHandler |
sahilmgandhi | 18:6a4db94011d3 | 194 | BOD_IRQHandler |
sahilmgandhi | 18:6a4db94011d3 | 195 | Flash_IRQHandler |
sahilmgandhi | 18:6a4db94011d3 | 196 | WKT_IRQHandler |
sahilmgandhi | 18:6a4db94011d3 | 197 | ADC_SEQA_IRQHandler |
sahilmgandhi | 18:6a4db94011d3 | 198 | ADC_SEQB_IRQHandler |
sahilmgandhi | 18:6a4db94011d3 | 199 | ADC_THCMP_IRQHandler |
sahilmgandhi | 18:6a4db94011d3 | 200 | ADC_OVR_IRQHandler |
sahilmgandhi | 18:6a4db94011d3 | 201 | DMA__RQHandler |
sahilmgandhi | 18:6a4db94011d3 | 202 | I2C2_IRQHandler |
sahilmgandhi | 18:6a4db94011d3 | 203 | I2C3_IRQHandler |
sahilmgandhi | 18:6a4db94011d3 | 204 | PININT0_IRQHandler |
sahilmgandhi | 18:6a4db94011d3 | 205 | PININT1_IRQHandler |
sahilmgandhi | 18:6a4db94011d3 | 206 | PININT2_IRQHandler |
sahilmgandhi | 18:6a4db94011d3 | 207 | PININT3_IRQHandler |
sahilmgandhi | 18:6a4db94011d3 | 208 | PININT4_IRQHandler |
sahilmgandhi | 18:6a4db94011d3 | 209 | PININT5_IRQHandler |
sahilmgandhi | 18:6a4db94011d3 | 210 | PININT6_IRQHandler |
sahilmgandhi | 18:6a4db94011d3 | 211 | PININT7_IRQHandler |
sahilmgandhi | 18:6a4db94011d3 | 212 | |
sahilmgandhi | 18:6a4db94011d3 | 213 | B . |
sahilmgandhi | 18:6a4db94011d3 | 214 | |
sahilmgandhi | 18:6a4db94011d3 | 215 | ENDP |
sahilmgandhi | 18:6a4db94011d3 | 216 | |
sahilmgandhi | 18:6a4db94011d3 | 217 | ALIGN |
sahilmgandhi | 18:6a4db94011d3 | 218 | END |