Mouse code for the MacroRat
mbed-dev/targets/TARGET_NXP/TARGET_LPC23XX/device/TOOLCHAIN_ARM_STD/vector_functions.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 | ;/* mbed Microcontroller Library - InterruptIn |
sahilmgandhi | 18:6a4db94011d3 | 2 | ; * Copyright (c) 2006-2009 ARM Limited. All rights reserved. |
sahilmgandhi | 18:6a4db94011d3 | 3 | ; */ |
sahilmgandhi | 18:6a4db94011d3 | 4 | |
sahilmgandhi | 18:6a4db94011d3 | 5 | #line 1 "vector_functions.s" |
sahilmgandhi | 18:6a4db94011d3 | 6 | ; |
sahilmgandhi | 18:6a4db94011d3 | 7 | ; |
sahilmgandhi | 18:6a4db94011d3 | 8 | ; |
sahilmgandhi | 18:6a4db94011d3 | 9 | |
sahilmgandhi | 18:6a4db94011d3 | 10 | #line 1 "vector_defns.h" |
sahilmgandhi | 18:6a4db94011d3 | 11 | |
sahilmgandhi | 18:6a4db94011d3 | 12 | |
sahilmgandhi | 18:6a4db94011d3 | 13 | |
sahilmgandhi | 18:6a4db94011d3 | 14 | |
sahilmgandhi | 18:6a4db94011d3 | 15 | |
sahilmgandhi | 18:6a4db94011d3 | 16 | |
sahilmgandhi | 18:6a4db94011d3 | 17 | |
sahilmgandhi | 18:6a4db94011d3 | 18 | |
sahilmgandhi | 18:6a4db94011d3 | 19 | |
sahilmgandhi | 18:6a4db94011d3 | 20 | #line 21 "vector_defns.h" |
sahilmgandhi | 18:6a4db94011d3 | 21 | |
sahilmgandhi | 18:6a4db94011d3 | 22 | |
sahilmgandhi | 18:6a4db94011d3 | 23 | |
sahilmgandhi | 18:6a4db94011d3 | 24 | |
sahilmgandhi | 18:6a4db94011d3 | 25 | |
sahilmgandhi | 18:6a4db94011d3 | 26 | |
sahilmgandhi | 18:6a4db94011d3 | 27 | |
sahilmgandhi | 18:6a4db94011d3 | 28 | |
sahilmgandhi | 18:6a4db94011d3 | 29 | |
sahilmgandhi | 18:6a4db94011d3 | 30 | |
sahilmgandhi | 18:6a4db94011d3 | 31 | |
sahilmgandhi | 18:6a4db94011d3 | 32 | |
sahilmgandhi | 18:6a4db94011d3 | 33 | |
sahilmgandhi | 18:6a4db94011d3 | 34 | |
sahilmgandhi | 18:6a4db94011d3 | 35 | |
sahilmgandhi | 18:6a4db94011d3 | 36 | |
sahilmgandhi | 18:6a4db94011d3 | 37 | |
sahilmgandhi | 18:6a4db94011d3 | 38 | |
sahilmgandhi | 18:6a4db94011d3 | 39 | #line 47 "vector_defns.h" |
sahilmgandhi | 18:6a4db94011d3 | 40 | |
sahilmgandhi | 18:6a4db94011d3 | 41 | |
sahilmgandhi | 18:6a4db94011d3 | 42 | #line 58 "vector_defns.h" |
sahilmgandhi | 18:6a4db94011d3 | 43 | |
sahilmgandhi | 18:6a4db94011d3 | 44 | |
sahilmgandhi | 18:6a4db94011d3 | 45 | |
sahilmgandhi | 18:6a4db94011d3 | 46 | |
sahilmgandhi | 18:6a4db94011d3 | 47 | |
sahilmgandhi | 18:6a4db94011d3 | 48 | |
sahilmgandhi | 18:6a4db94011d3 | 49 | |
sahilmgandhi | 18:6a4db94011d3 | 50 | |
sahilmgandhi | 18:6a4db94011d3 | 51 | |
sahilmgandhi | 18:6a4db94011d3 | 52 | |
sahilmgandhi | 18:6a4db94011d3 | 53 | |
sahilmgandhi | 18:6a4db94011d3 | 54 | |
sahilmgandhi | 18:6a4db94011d3 | 55 | |
sahilmgandhi | 18:6a4db94011d3 | 56 | |
sahilmgandhi | 18:6a4db94011d3 | 57 | |
sahilmgandhi | 18:6a4db94011d3 | 58 | |
sahilmgandhi | 18:6a4db94011d3 | 59 | |
sahilmgandhi | 18:6a4db94011d3 | 60 | |
sahilmgandhi | 18:6a4db94011d3 | 61 | #line 6 "vector_functions.s" |
sahilmgandhi | 18:6a4db94011d3 | 62 | |
sahilmgandhi | 18:6a4db94011d3 | 63 | |
sahilmgandhi | 18:6a4db94011d3 | 64 | AREA VECFUNCS, CODE, READONLY |
sahilmgandhi | 18:6a4db94011d3 | 65 | ARM |
sahilmgandhi | 18:6a4db94011d3 | 66 | PRESERVE8 |
sahilmgandhi | 18:6a4db94011d3 | 67 | |
sahilmgandhi | 18:6a4db94011d3 | 68 | |
sahilmgandhi | 18:6a4db94011d3 | 69 | |
sahilmgandhi | 18:6a4db94011d3 | 70 | |
sahilmgandhi | 18:6a4db94011d3 | 71 | |
sahilmgandhi | 18:6a4db94011d3 | 72 | EXPORT __mbed_fiq [WEAK] |
sahilmgandhi | 18:6a4db94011d3 | 73 | EXPORT __mbed_undef [WEAK] |
sahilmgandhi | 18:6a4db94011d3 | 74 | EXPORT __mbed_prefetch_abort [WEAK] |
sahilmgandhi | 18:6a4db94011d3 | 75 | EXPORT __mbed_data_abort [WEAK] |
sahilmgandhi | 18:6a4db94011d3 | 76 | EXPORT __mbed_irq [WEAK] |
sahilmgandhi | 18:6a4db94011d3 | 77 | EXPORT __mbed_swi [WEAK] |
sahilmgandhi | 18:6a4db94011d3 | 78 | EXPORT __mbed_dcc_irq [WEAK] |
sahilmgandhi | 18:6a4db94011d3 | 79 | EXPORT __mbed_reset [WEAK] |
sahilmgandhi | 18:6a4db94011d3 | 80 | IMPORT __mbed_init_realmonitor |
sahilmgandhi | 18:6a4db94011d3 | 81 | |
sahilmgandhi | 18:6a4db94011d3 | 82 | ; |
sahilmgandhi | 18:6a4db94011d3 | 83 | ; |
sahilmgandhi | 18:6a4db94011d3 | 84 | __mbed_fiq |
sahilmgandhi | 18:6a4db94011d3 | 85 | B __mbed_fiq |
sahilmgandhi | 18:6a4db94011d3 | 86 | |
sahilmgandhi | 18:6a4db94011d3 | 87 | ; |
sahilmgandhi | 18:6a4db94011d3 | 88 | ; |
sahilmgandhi | 18:6a4db94011d3 | 89 | __mbed_undef |
sahilmgandhi | 18:6a4db94011d3 | 90 | LDR PC, =0x7fffffa0 |
sahilmgandhi | 18:6a4db94011d3 | 91 | |
sahilmgandhi | 18:6a4db94011d3 | 92 | ; |
sahilmgandhi | 18:6a4db94011d3 | 93 | ; |
sahilmgandhi | 18:6a4db94011d3 | 94 | __mbed_prefetch_abort |
sahilmgandhi | 18:6a4db94011d3 | 95 | LDR PC, =0x7fffffb0 |
sahilmgandhi | 18:6a4db94011d3 | 96 | |
sahilmgandhi | 18:6a4db94011d3 | 97 | ; |
sahilmgandhi | 18:6a4db94011d3 | 98 | ; |
sahilmgandhi | 18:6a4db94011d3 | 99 | __mbed_data_abort |
sahilmgandhi | 18:6a4db94011d3 | 100 | LDR PC, =0x7fffffc0 |
sahilmgandhi | 18:6a4db94011d3 | 101 | |
sahilmgandhi | 18:6a4db94011d3 | 102 | ; |
sahilmgandhi | 18:6a4db94011d3 | 103 | ; |
sahilmgandhi | 18:6a4db94011d3 | 104 | ; |
sahilmgandhi | 18:6a4db94011d3 | 105 | ; |
sahilmgandhi | 18:6a4db94011d3 | 106 | ; |
sahilmgandhi | 18:6a4db94011d3 | 107 | ; |
sahilmgandhi | 18:6a4db94011d3 | 108 | ; |
sahilmgandhi | 18:6a4db94011d3 | 109 | ; |
sahilmgandhi | 18:6a4db94011d3 | 110 | ; |
sahilmgandhi | 18:6a4db94011d3 | 111 | __mbed_irq |
sahilmgandhi | 18:6a4db94011d3 | 112 | ; |
sahilmgandhi | 18:6a4db94011d3 | 113 | MSR CPSR_c, #0x1F:OR:0x80:OR:0x40 |
sahilmgandhi | 18:6a4db94011d3 | 114 | |
sahilmgandhi | 18:6a4db94011d3 | 115 | ; |
sahilmgandhi | 18:6a4db94011d3 | 116 | STMDB sp!, {r0-r3,r12,lr} |
sahilmgandhi | 18:6a4db94011d3 | 117 | |
sahilmgandhi | 18:6a4db94011d3 | 118 | ; |
sahilmgandhi | 18:6a4db94011d3 | 119 | MOV r0, #0xFFFFFF00 |
sahilmgandhi | 18:6a4db94011d3 | 120 | LDR r0, [r0] |
sahilmgandhi | 18:6a4db94011d3 | 121 | |
sahilmgandhi | 18:6a4db94011d3 | 122 | ; |
sahilmgandhi | 18:6a4db94011d3 | 123 | MOV lr, pc |
sahilmgandhi | 18:6a4db94011d3 | 124 | BX r0 |
sahilmgandhi | 18:6a4db94011d3 | 125 | |
sahilmgandhi | 18:6a4db94011d3 | 126 | ; |
sahilmgandhi | 18:6a4db94011d3 | 127 | MOV r0, #0xFFFFFF00 |
sahilmgandhi | 18:6a4db94011d3 | 128 | STR r0, [r0] ; |
sahilmgandhi | 18:6a4db94011d3 | 129 | |
sahilmgandhi | 18:6a4db94011d3 | 130 | ; |
sahilmgandhi | 18:6a4db94011d3 | 131 | LDMFD sp!,{r0-r3,r12,lr} |
sahilmgandhi | 18:6a4db94011d3 | 132 | |
sahilmgandhi | 18:6a4db94011d3 | 133 | ; |
sahilmgandhi | 18:6a4db94011d3 | 134 | MSR CPSR_c, #0x12:OR:0x80:OR:0x40 |
sahilmgandhi | 18:6a4db94011d3 | 135 | |
sahilmgandhi | 18:6a4db94011d3 | 136 | ; |
sahilmgandhi | 18:6a4db94011d3 | 137 | SUBS pc, lr, #4 |
sahilmgandhi | 18:6a4db94011d3 | 138 | |
sahilmgandhi | 18:6a4db94011d3 | 139 | ; |
sahilmgandhi | 18:6a4db94011d3 | 140 | ; |
sahilmgandhi | 18:6a4db94011d3 | 141 | ; |
sahilmgandhi | 18:6a4db94011d3 | 142 | ; |
sahilmgandhi | 18:6a4db94011d3 | 143 | __mbed_swi |
sahilmgandhi | 18:6a4db94011d3 | 144 | ; |
sahilmgandhi | 18:6a4db94011d3 | 145 | ; |
sahilmgandhi | 18:6a4db94011d3 | 146 | STMFD sp!, {a4, r4, ip, lr} |
sahilmgandhi | 18:6a4db94011d3 | 147 | |
sahilmgandhi | 18:6a4db94011d3 | 148 | ; |
sahilmgandhi | 18:6a4db94011d3 | 149 | LDR r4, =0x40000040 |
sahilmgandhi | 18:6a4db94011d3 | 150 | |
sahilmgandhi | 18:6a4db94011d3 | 151 | ; |
sahilmgandhi | 18:6a4db94011d3 | 152 | ; |
sahilmgandhi | 18:6a4db94011d3 | 153 | LDR a4, =0x00940000 |
sahilmgandhi | 18:6a4db94011d3 | 154 | LDR PC, =0x7ffff820 |
sahilmgandhi | 18:6a4db94011d3 | 155 | |
sahilmgandhi | 18:6a4db94011d3 | 156 | ; |
sahilmgandhi | 18:6a4db94011d3 | 157 | ; |
sahilmgandhi | 18:6a4db94011d3 | 158 | ; |
sahilmgandhi | 18:6a4db94011d3 | 159 | ; |
sahilmgandhi | 18:6a4db94011d3 | 160 | __mbed_dcc_irq |
sahilmgandhi | 18:6a4db94011d3 | 161 | |
sahilmgandhi | 18:6a4db94011d3 | 162 | ; |
sahilmgandhi | 18:6a4db94011d3 | 163 | |
sahilmgandhi | 18:6a4db94011d3 | 164 | ; |
sahilmgandhi | 18:6a4db94011d3 | 165 | LDMFD sp!,{r0-r3,r12,lr} |
sahilmgandhi | 18:6a4db94011d3 | 166 | |
sahilmgandhi | 18:6a4db94011d3 | 167 | ; |
sahilmgandhi | 18:6a4db94011d3 | 168 | MSR CPSR_c, #0x12:OR:0x80:OR:0x40 |
sahilmgandhi | 18:6a4db94011d3 | 169 | |
sahilmgandhi | 18:6a4db94011d3 | 170 | ; |
sahilmgandhi | 18:6a4db94011d3 | 171 | |
sahilmgandhi | 18:6a4db94011d3 | 172 | ; |
sahilmgandhi | 18:6a4db94011d3 | 173 | SUB lr, lr, #4 ; |
sahilmgandhi | 18:6a4db94011d3 | 174 | STMFD sp!, {ip,lr} ; |
sahilmgandhi | 18:6a4db94011d3 | 175 | |
sahilmgandhi | 18:6a4db94011d3 | 176 | ; |
sahilmgandhi | 18:6a4db94011d3 | 177 | LDR LR, =0xfffff000 |
sahilmgandhi | 18:6a4db94011d3 | 178 | STR LR, [LR, #0xf00] |
sahilmgandhi | 18:6a4db94011d3 | 179 | |
sahilmgandhi | 18:6a4db94011d3 | 180 | ; |
sahilmgandhi | 18:6a4db94011d3 | 181 | ; |
sahilmgandhi | 18:6a4db94011d3 | 182 | ; |
sahilmgandhi | 18:6a4db94011d3 | 183 | ; |
sahilmgandhi | 18:6a4db94011d3 | 184 | LDR PC, =0x7fffffe0 |
sahilmgandhi | 18:6a4db94011d3 | 185 | |
sahilmgandhi | 18:6a4db94011d3 | 186 | ; |
sahilmgandhi | 18:6a4db94011d3 | 187 | ; __mbed_reset is called after reset |
sahilmgandhi | 18:6a4db94011d3 | 188 | ; we setup the stacks and realmonitor, then call Reset_Handler like on M3 |
sahilmgandhi | 18:6a4db94011d3 | 189 | |
sahilmgandhi | 18:6a4db94011d3 | 190 | ; Reset Handler |
sahilmgandhi | 18:6a4db94011d3 | 191 | |
sahilmgandhi | 18:6a4db94011d3 | 192 | Reset_Handler PROC |
sahilmgandhi | 18:6a4db94011d3 | 193 | EXPORT Reset_Handler [WEAK] |
sahilmgandhi | 18:6a4db94011d3 | 194 | IMPORT SystemInit |
sahilmgandhi | 18:6a4db94011d3 | 195 | IMPORT __main |
sahilmgandhi | 18:6a4db94011d3 | 196 | LDR R0, =SystemInit |
sahilmgandhi | 18:6a4db94011d3 | 197 | MOV LR, PC |
sahilmgandhi | 18:6a4db94011d3 | 198 | BX R0 |
sahilmgandhi | 18:6a4db94011d3 | 199 | LDR R0, =__main |
sahilmgandhi | 18:6a4db94011d3 | 200 | BX R0 |
sahilmgandhi | 18:6a4db94011d3 | 201 | ENDP |
sahilmgandhi | 18:6a4db94011d3 | 202 | |
sahilmgandhi | 18:6a4db94011d3 | 203 | __mbed_reset |
sahilmgandhi | 18:6a4db94011d3 | 204 | |
sahilmgandhi | 18:6a4db94011d3 | 205 | ; |
sahilmgandhi | 18:6a4db94011d3 | 206 | |
sahilmgandhi | 18:6a4db94011d3 | 207 | LDR R0, =(0x40000000 + 0x8000) |
sahilmgandhi | 18:6a4db94011d3 | 208 | |
sahilmgandhi | 18:6a4db94011d3 | 209 | ; |
sahilmgandhi | 18:6a4db94011d3 | 210 | MSR CPSR_c, #0x1B:OR:0x80:OR:0x40 |
sahilmgandhi | 18:6a4db94011d3 | 211 | MOV SP, R0 |
sahilmgandhi | 18:6a4db94011d3 | 212 | SUB R0, R0, #0x00000040 |
sahilmgandhi | 18:6a4db94011d3 | 213 | |
sahilmgandhi | 18:6a4db94011d3 | 214 | ; |
sahilmgandhi | 18:6a4db94011d3 | 215 | MSR CPSR_c, #0x17:OR:0x80:OR:0x40 |
sahilmgandhi | 18:6a4db94011d3 | 216 | MOV SP, R0 |
sahilmgandhi | 18:6a4db94011d3 | 217 | SUB R0, R0, #0x00000040 |
sahilmgandhi | 18:6a4db94011d3 | 218 | |
sahilmgandhi | 18:6a4db94011d3 | 219 | ; |
sahilmgandhi | 18:6a4db94011d3 | 220 | MSR CPSR_c, #0x11:OR:0x80:OR:0x40 |
sahilmgandhi | 18:6a4db94011d3 | 221 | MOV SP, R0 |
sahilmgandhi | 18:6a4db94011d3 | 222 | SUB R0, R0, #0x00000000 |
sahilmgandhi | 18:6a4db94011d3 | 223 | |
sahilmgandhi | 18:6a4db94011d3 | 224 | ; |
sahilmgandhi | 18:6a4db94011d3 | 225 | MSR CPSR_c, #0x12:OR:0x80:OR:0x40 |
sahilmgandhi | 18:6a4db94011d3 | 226 | MOV SP, R0 |
sahilmgandhi | 18:6a4db94011d3 | 227 | SUB R0, R0, #0x00000040 |
sahilmgandhi | 18:6a4db94011d3 | 228 | |
sahilmgandhi | 18:6a4db94011d3 | 229 | ; |
sahilmgandhi | 18:6a4db94011d3 | 230 | MSR CPSR_c, #0x13:OR:0x80:OR:0x40 |
sahilmgandhi | 18:6a4db94011d3 | 231 | MOV SP, R0 |
sahilmgandhi | 18:6a4db94011d3 | 232 | SUB R0, R0, #0x00000040 |
sahilmgandhi | 18:6a4db94011d3 | 233 | |
sahilmgandhi | 18:6a4db94011d3 | 234 | ; |
sahilmgandhi | 18:6a4db94011d3 | 235 | MSR CPSR_c, #0x10 |
sahilmgandhi | 18:6a4db94011d3 | 236 | MOV SP, R0 |
sahilmgandhi | 18:6a4db94011d3 | 237 | |
sahilmgandhi | 18:6a4db94011d3 | 238 | ; |
sahilmgandhi | 18:6a4db94011d3 | 239 | LDR R0, =__mbed_init_realmonitor |
sahilmgandhi | 18:6a4db94011d3 | 240 | MOV LR, PC |
sahilmgandhi | 18:6a4db94011d3 | 241 | BX R0 |
sahilmgandhi | 18:6a4db94011d3 | 242 | |
sahilmgandhi | 18:6a4db94011d3 | 243 | ; |
sahilmgandhi | 18:6a4db94011d3 | 244 | LDR R0, =Reset_Handler |
sahilmgandhi | 18:6a4db94011d3 | 245 | BX R0 |
sahilmgandhi | 18:6a4db94011d3 | 246 | |
sahilmgandhi | 18:6a4db94011d3 | 247 | |
sahilmgandhi | 18:6a4db94011d3 | 248 | END |