Mouse code for the MacroRat
mbed-dev/targets/TARGET_NORDIC/TARGET_MCU_NRF51822/device/TOOLCHAIN_IAR/TARGET_MCU_NORDIC_16K/startup_NRF51822_IAR.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 | ;; Copyright (c) 2009 Nordic Semiconductor. All Rights Reserved. |
sahilmgandhi | 18:6a4db94011d3 | 2 | ;; The information contained herein is confidential property of Nordic |
sahilmgandhi | 18:6a4db94011d3 | 3 | ;; Semiconductor ASA.Terms and conditions of usage are described in detail |
sahilmgandhi | 18:6a4db94011d3 | 4 | ;; in NORDIC SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. |
sahilmgandhi | 18:6a4db94011d3 | 5 | ;; Licensees are granted free, non-transferable use of the information. NO |
sahilmgandhi | 18:6a4db94011d3 | 6 | ;; WARRANTY of ANY KIND is provided. This heading must NOT be removed from |
sahilmgandhi | 18:6a4db94011d3 | 7 | ;; the file. |
sahilmgandhi | 18:6a4db94011d3 | 8 | |
sahilmgandhi | 18:6a4db94011d3 | 9 | ;; Description message |
sahilmgandhi | 18:6a4db94011d3 | 10 | |
sahilmgandhi | 18:6a4db94011d3 | 11 | MODULE ?cstartup |
sahilmgandhi | 18:6a4db94011d3 | 12 | |
sahilmgandhi | 18:6a4db94011d3 | 13 | ;; Stack size default : 1024 |
sahilmgandhi | 18:6a4db94011d3 | 14 | ;; Heap size default : 2048 |
sahilmgandhi | 18:6a4db94011d3 | 15 | |
sahilmgandhi | 18:6a4db94011d3 | 16 | ;; Forward declaration of sections. |
sahilmgandhi | 18:6a4db94011d3 | 17 | SECTION CSTACK:DATA:NOROOT(3) |
sahilmgandhi | 18:6a4db94011d3 | 18 | |
sahilmgandhi | 18:6a4db94011d3 | 19 | SECTION .intvec:CODE:NOROOT(2) |
sahilmgandhi | 18:6a4db94011d3 | 20 | |
sahilmgandhi | 18:6a4db94011d3 | 21 | EXTERN __iar_program_start |
sahilmgandhi | 18:6a4db94011d3 | 22 | EXTERN SystemInit |
sahilmgandhi | 18:6a4db94011d3 | 23 | PUBLIC __vector_table |
sahilmgandhi | 18:6a4db94011d3 | 24 | PUBLIC __Vectors |
sahilmgandhi | 18:6a4db94011d3 | 25 | PUBLIC __Vectors_End |
sahilmgandhi | 18:6a4db94011d3 | 26 | PUBLIC __Vectors_Size |
sahilmgandhi | 18:6a4db94011d3 | 27 | |
sahilmgandhi | 18:6a4db94011d3 | 28 | DATA |
sahilmgandhi | 18:6a4db94011d3 | 29 | |
sahilmgandhi | 18:6a4db94011d3 | 30 | __vector_table |
sahilmgandhi | 18:6a4db94011d3 | 31 | DCD sfe(CSTACK) |
sahilmgandhi | 18:6a4db94011d3 | 32 | DCD Reset_Handler |
sahilmgandhi | 18:6a4db94011d3 | 33 | DCD NMI_Handler |
sahilmgandhi | 18:6a4db94011d3 | 34 | DCD HardFault_Handler |
sahilmgandhi | 18:6a4db94011d3 | 35 | DCD 0 |
sahilmgandhi | 18:6a4db94011d3 | 36 | DCD 0 |
sahilmgandhi | 18:6a4db94011d3 | 37 | DCD 0 |
sahilmgandhi | 18:6a4db94011d3 | 38 | ;__vector_table_0x1c |
sahilmgandhi | 18:6a4db94011d3 | 39 | DCD 0 |
sahilmgandhi | 18:6a4db94011d3 | 40 | DCD 0 |
sahilmgandhi | 18:6a4db94011d3 | 41 | DCD 0 |
sahilmgandhi | 18:6a4db94011d3 | 42 | DCD 0 |
sahilmgandhi | 18:6a4db94011d3 | 43 | DCD SVC_Handler |
sahilmgandhi | 18:6a4db94011d3 | 44 | DCD 0 |
sahilmgandhi | 18:6a4db94011d3 | 45 | DCD 0 |
sahilmgandhi | 18:6a4db94011d3 | 46 | DCD PendSV_Handler |
sahilmgandhi | 18:6a4db94011d3 | 47 | DCD SysTick_Handler |
sahilmgandhi | 18:6a4db94011d3 | 48 | |
sahilmgandhi | 18:6a4db94011d3 | 49 | ; External Interrupts |
sahilmgandhi | 18:6a4db94011d3 | 50 | DCD POWER_CLOCK_IRQHandler ;POWER_CLOCK |
sahilmgandhi | 18:6a4db94011d3 | 51 | DCD RADIO_IRQHandler ;RADIO |
sahilmgandhi | 18:6a4db94011d3 | 52 | DCD UART0_IRQHandler ;UART0 |
sahilmgandhi | 18:6a4db94011d3 | 53 | DCD SPI0_TWI0_IRQHandler ;SPI0_TWI0 |
sahilmgandhi | 18:6a4db94011d3 | 54 | DCD SPI1_TWI1_IRQHandler ;SPI1_TWI1 |
sahilmgandhi | 18:6a4db94011d3 | 55 | DCD 0 ;Reserved |
sahilmgandhi | 18:6a4db94011d3 | 56 | DCD GPIOTE_IRQHandler ;GPIOTE |
sahilmgandhi | 18:6a4db94011d3 | 57 | DCD ADC_IRQHandler ;ADC |
sahilmgandhi | 18:6a4db94011d3 | 58 | DCD TIMER0_IRQHandler ;TIMER0 |
sahilmgandhi | 18:6a4db94011d3 | 59 | DCD TIMER1_IRQHandler ;TIMER1 |
sahilmgandhi | 18:6a4db94011d3 | 60 | DCD TIMER2_IRQHandler ;TIMER2 |
sahilmgandhi | 18:6a4db94011d3 | 61 | DCD RTC0_IRQHandler ;RTC0 |
sahilmgandhi | 18:6a4db94011d3 | 62 | DCD TEMP_IRQHandler ;TEMP |
sahilmgandhi | 18:6a4db94011d3 | 63 | DCD RNG_IRQHandler ;RNG |
sahilmgandhi | 18:6a4db94011d3 | 64 | DCD ECB_IRQHandler ;ECB |
sahilmgandhi | 18:6a4db94011d3 | 65 | DCD CCM_AAR_IRQHandler ;CCM_AAR |
sahilmgandhi | 18:6a4db94011d3 | 66 | DCD WDT_IRQHandler ;WDT |
sahilmgandhi | 18:6a4db94011d3 | 67 | DCD RTC1_IRQHandler ;RTC1 |
sahilmgandhi | 18:6a4db94011d3 | 68 | DCD QDEC_IRQHandler ;QDEC |
sahilmgandhi | 18:6a4db94011d3 | 69 | DCD LPCOMP_COMP_IRQHandler ;LPCOMP_COMP |
sahilmgandhi | 18:6a4db94011d3 | 70 | DCD SWI0_IRQHandler ;SWI0 |
sahilmgandhi | 18:6a4db94011d3 | 71 | DCD SWI1_IRQHandler ;SWI1 |
sahilmgandhi | 18:6a4db94011d3 | 72 | DCD SWI2_IRQHandler ;SWI2 |
sahilmgandhi | 18:6a4db94011d3 | 73 | DCD SWI3_IRQHandler ;SWI3 |
sahilmgandhi | 18:6a4db94011d3 | 74 | DCD SWI4_IRQHandler ;SWI4 |
sahilmgandhi | 18:6a4db94011d3 | 75 | DCD SWI5_IRQHandler ;SWI5 |
sahilmgandhi | 18:6a4db94011d3 | 76 | DCD 0 ;Reserved |
sahilmgandhi | 18:6a4db94011d3 | 77 | DCD 0 ;Reserved |
sahilmgandhi | 18:6a4db94011d3 | 78 | DCD 0 ;Reserved |
sahilmgandhi | 18:6a4db94011d3 | 79 | DCD 0 ;Reserved |
sahilmgandhi | 18:6a4db94011d3 | 80 | DCD 0 ;Reserved |
sahilmgandhi | 18:6a4db94011d3 | 81 | DCD 0 ;Reserved |
sahilmgandhi | 18:6a4db94011d3 | 82 | |
sahilmgandhi | 18:6a4db94011d3 | 83 | |
sahilmgandhi | 18:6a4db94011d3 | 84 | __Vectors_End |
sahilmgandhi | 18:6a4db94011d3 | 85 | __Vectors EQU __vector_table |
sahilmgandhi | 18:6a4db94011d3 | 86 | __Vectors_Size EQU __Vectors_End - __Vectors |
sahilmgandhi | 18:6a4db94011d3 | 87 | NRF_POWER_RAMON_ADDRESS EQU 0x40000524 ; NRF_POWER->RAMON address |
sahilmgandhi | 18:6a4db94011d3 | 88 | NRF_POWER_RAMON_RAMxON_ONMODE_Msk EQU 0xF ; All RAM blocks on in onmode bit mask |
sahilmgandhi | 18:6a4db94011d3 | 89 | |
sahilmgandhi | 18:6a4db94011d3 | 90 | ; Default handlers. |
sahilmgandhi | 18:6a4db94011d3 | 91 | THUMB |
sahilmgandhi | 18:6a4db94011d3 | 92 | |
sahilmgandhi | 18:6a4db94011d3 | 93 | PUBWEAK Reset_Handler |
sahilmgandhi | 18:6a4db94011d3 | 94 | SECTION .text:CODE:REORDER:NOROOT(2) |
sahilmgandhi | 18:6a4db94011d3 | 95 | Reset_Handler |
sahilmgandhi | 18:6a4db94011d3 | 96 | LDR R0, =NRF_POWER_RAMON_ADDRESS |
sahilmgandhi | 18:6a4db94011d3 | 97 | LDR R2, [R0] |
sahilmgandhi | 18:6a4db94011d3 | 98 | MOVS R1, #NRF_POWER_RAMON_RAMxON_ONMODE_Msk |
sahilmgandhi | 18:6a4db94011d3 | 99 | ORRS R2, R2, R1 |
sahilmgandhi | 18:6a4db94011d3 | 100 | STR R2, [R0] |
sahilmgandhi | 18:6a4db94011d3 | 101 | LDR R0, =SystemInit |
sahilmgandhi | 18:6a4db94011d3 | 102 | BLX R0 |
sahilmgandhi | 18:6a4db94011d3 | 103 | LDR R0, =__iar_program_start |
sahilmgandhi | 18:6a4db94011d3 | 104 | BX R0 |
sahilmgandhi | 18:6a4db94011d3 | 105 | |
sahilmgandhi | 18:6a4db94011d3 | 106 | ; Dummy exception handlers |
sahilmgandhi | 18:6a4db94011d3 | 107 | |
sahilmgandhi | 18:6a4db94011d3 | 108 | PUBWEAK NMI_Handler |
sahilmgandhi | 18:6a4db94011d3 | 109 | SECTION .text:CODE:REORDER:NOROOT(1) |
sahilmgandhi | 18:6a4db94011d3 | 110 | NMI_Handler |
sahilmgandhi | 18:6a4db94011d3 | 111 | B . |
sahilmgandhi | 18:6a4db94011d3 | 112 | |
sahilmgandhi | 18:6a4db94011d3 | 113 | PUBWEAK HardFault_Handler |
sahilmgandhi | 18:6a4db94011d3 | 114 | SECTION .text:CODE:REORDER:NOROOT(1) |
sahilmgandhi | 18:6a4db94011d3 | 115 | HardFault_Handler |
sahilmgandhi | 18:6a4db94011d3 | 116 | B . |
sahilmgandhi | 18:6a4db94011d3 | 117 | |
sahilmgandhi | 18:6a4db94011d3 | 118 | PUBWEAK SVC_Handler |
sahilmgandhi | 18:6a4db94011d3 | 119 | SECTION .text:CODE:REORDER:NOROOT(1) |
sahilmgandhi | 18:6a4db94011d3 | 120 | SVC_Handler |
sahilmgandhi | 18:6a4db94011d3 | 121 | B . |
sahilmgandhi | 18:6a4db94011d3 | 122 | |
sahilmgandhi | 18:6a4db94011d3 | 123 | PUBWEAK PendSV_Handler |
sahilmgandhi | 18:6a4db94011d3 | 124 | SECTION .text:CODE:REORDER:NOROOT(1) |
sahilmgandhi | 18:6a4db94011d3 | 125 | PendSV_Handler |
sahilmgandhi | 18:6a4db94011d3 | 126 | B . |
sahilmgandhi | 18:6a4db94011d3 | 127 | |
sahilmgandhi | 18:6a4db94011d3 | 128 | PUBWEAK SysTick_Handler |
sahilmgandhi | 18:6a4db94011d3 | 129 | SECTION .text:CODE:REORDER:NOROOT(1) |
sahilmgandhi | 18:6a4db94011d3 | 130 | SysTick_Handler |
sahilmgandhi | 18:6a4db94011d3 | 131 | B . |
sahilmgandhi | 18:6a4db94011d3 | 132 | |
sahilmgandhi | 18:6a4db94011d3 | 133 | ; Dummy interrupt handlers |
sahilmgandhi | 18:6a4db94011d3 | 134 | |
sahilmgandhi | 18:6a4db94011d3 | 135 | PUBWEAK POWER_CLOCK_IRQHandler |
sahilmgandhi | 18:6a4db94011d3 | 136 | SECTION .text:CODE:REORDER:NOROOT(1) |
sahilmgandhi | 18:6a4db94011d3 | 137 | POWER_CLOCK_IRQHandler |
sahilmgandhi | 18:6a4db94011d3 | 138 | B . |
sahilmgandhi | 18:6a4db94011d3 | 139 | PUBWEAK RADIO_IRQHandler |
sahilmgandhi | 18:6a4db94011d3 | 140 | SECTION .text:CODE:REORDER:NOROOT(1) |
sahilmgandhi | 18:6a4db94011d3 | 141 | RADIO_IRQHandler |
sahilmgandhi | 18:6a4db94011d3 | 142 | B . |
sahilmgandhi | 18:6a4db94011d3 | 143 | PUBWEAK UART0_IRQHandler |
sahilmgandhi | 18:6a4db94011d3 | 144 | SECTION .text:CODE:REORDER:NOROOT(1) |
sahilmgandhi | 18:6a4db94011d3 | 145 | UART0_IRQHandler |
sahilmgandhi | 18:6a4db94011d3 | 146 | B . |
sahilmgandhi | 18:6a4db94011d3 | 147 | PUBWEAK SPI0_TWI0_IRQHandler |
sahilmgandhi | 18:6a4db94011d3 | 148 | SECTION .text:CODE:REORDER:NOROOT(1) |
sahilmgandhi | 18:6a4db94011d3 | 149 | SPI0_TWI0_IRQHandler |
sahilmgandhi | 18:6a4db94011d3 | 150 | B . |
sahilmgandhi | 18:6a4db94011d3 | 151 | PUBWEAK SPI1_TWI1_IRQHandler |
sahilmgandhi | 18:6a4db94011d3 | 152 | SECTION .text:CODE:REORDER:NOROOT(1) |
sahilmgandhi | 18:6a4db94011d3 | 153 | SPI1_TWI1_IRQHandler |
sahilmgandhi | 18:6a4db94011d3 | 154 | B . |
sahilmgandhi | 18:6a4db94011d3 | 155 | PUBWEAK GPIOTE_IRQHandler |
sahilmgandhi | 18:6a4db94011d3 | 156 | SECTION .text:CODE:REORDER:NOROOT(1) |
sahilmgandhi | 18:6a4db94011d3 | 157 | GPIOTE_IRQHandler |
sahilmgandhi | 18:6a4db94011d3 | 158 | B . |
sahilmgandhi | 18:6a4db94011d3 | 159 | PUBWEAK ADC_IRQHandler |
sahilmgandhi | 18:6a4db94011d3 | 160 | SECTION .text:CODE:REORDER:NOROOT(1) |
sahilmgandhi | 18:6a4db94011d3 | 161 | ADC_IRQHandler |
sahilmgandhi | 18:6a4db94011d3 | 162 | B . |
sahilmgandhi | 18:6a4db94011d3 | 163 | PUBWEAK TIMER0_IRQHandler |
sahilmgandhi | 18:6a4db94011d3 | 164 | SECTION .text:CODE:REORDER:NOROOT(1) |
sahilmgandhi | 18:6a4db94011d3 | 165 | TIMER0_IRQHandler |
sahilmgandhi | 18:6a4db94011d3 | 166 | B . |
sahilmgandhi | 18:6a4db94011d3 | 167 | PUBWEAK TIMER1_IRQHandler |
sahilmgandhi | 18:6a4db94011d3 | 168 | SECTION .text:CODE:REORDER:NOROOT(1) |
sahilmgandhi | 18:6a4db94011d3 | 169 | TIMER1_IRQHandler |
sahilmgandhi | 18:6a4db94011d3 | 170 | B . |
sahilmgandhi | 18:6a4db94011d3 | 171 | PUBWEAK TIMER2_IRQHandler |
sahilmgandhi | 18:6a4db94011d3 | 172 | SECTION .text:CODE:REORDER:NOROOT(1) |
sahilmgandhi | 18:6a4db94011d3 | 173 | TIMER2_IRQHandler |
sahilmgandhi | 18:6a4db94011d3 | 174 | B . |
sahilmgandhi | 18:6a4db94011d3 | 175 | PUBWEAK RTC0_IRQHandler |
sahilmgandhi | 18:6a4db94011d3 | 176 | SECTION .text:CODE:REORDER:NOROOT(1) |
sahilmgandhi | 18:6a4db94011d3 | 177 | RTC0_IRQHandler |
sahilmgandhi | 18:6a4db94011d3 | 178 | B . |
sahilmgandhi | 18:6a4db94011d3 | 179 | PUBWEAK TEMP_IRQHandler |
sahilmgandhi | 18:6a4db94011d3 | 180 | SECTION .text:CODE:REORDER:NOROOT(1) |
sahilmgandhi | 18:6a4db94011d3 | 181 | TEMP_IRQHandler |
sahilmgandhi | 18:6a4db94011d3 | 182 | B . |
sahilmgandhi | 18:6a4db94011d3 | 183 | PUBWEAK RNG_IRQHandler |
sahilmgandhi | 18:6a4db94011d3 | 184 | SECTION .text:CODE:REORDER:NOROOT(1) |
sahilmgandhi | 18:6a4db94011d3 | 185 | RNG_IRQHandler |
sahilmgandhi | 18:6a4db94011d3 | 186 | B . |
sahilmgandhi | 18:6a4db94011d3 | 187 | PUBWEAK ECB_IRQHandler |
sahilmgandhi | 18:6a4db94011d3 | 188 | SECTION .text:CODE:REORDER:NOROOT(1) |
sahilmgandhi | 18:6a4db94011d3 | 189 | ECB_IRQHandler |
sahilmgandhi | 18:6a4db94011d3 | 190 | B . |
sahilmgandhi | 18:6a4db94011d3 | 191 | PUBWEAK CCM_AAR_IRQHandler |
sahilmgandhi | 18:6a4db94011d3 | 192 | SECTION .text:CODE:REORDER:NOROOT(1) |
sahilmgandhi | 18:6a4db94011d3 | 193 | CCM_AAR_IRQHandler |
sahilmgandhi | 18:6a4db94011d3 | 194 | B . |
sahilmgandhi | 18:6a4db94011d3 | 195 | PUBWEAK WDT_IRQHandler |
sahilmgandhi | 18:6a4db94011d3 | 196 | SECTION .text:CODE:REORDER:NOROOT(1) |
sahilmgandhi | 18:6a4db94011d3 | 197 | WDT_IRQHandler |
sahilmgandhi | 18:6a4db94011d3 | 198 | B . |
sahilmgandhi | 18:6a4db94011d3 | 199 | PUBWEAK RTC1_IRQHandler |
sahilmgandhi | 18:6a4db94011d3 | 200 | SECTION .text:CODE:REORDER:NOROOT(1) |
sahilmgandhi | 18:6a4db94011d3 | 201 | RTC1_IRQHandler |
sahilmgandhi | 18:6a4db94011d3 | 202 | B . |
sahilmgandhi | 18:6a4db94011d3 | 203 | PUBWEAK QDEC_IRQHandler |
sahilmgandhi | 18:6a4db94011d3 | 204 | SECTION .text:CODE:REORDER:NOROOT(1) |
sahilmgandhi | 18:6a4db94011d3 | 205 | QDEC_IRQHandler |
sahilmgandhi | 18:6a4db94011d3 | 206 | B . |
sahilmgandhi | 18:6a4db94011d3 | 207 | PUBWEAK LPCOMP_COMP_IRQHandler |
sahilmgandhi | 18:6a4db94011d3 | 208 | SECTION .text:CODE:REORDER:NOROOT(1) |
sahilmgandhi | 18:6a4db94011d3 | 209 | LPCOMP_COMP_IRQHandler |
sahilmgandhi | 18:6a4db94011d3 | 210 | B . |
sahilmgandhi | 18:6a4db94011d3 | 211 | PUBWEAK SWI0_IRQHandler |
sahilmgandhi | 18:6a4db94011d3 | 212 | SECTION .text:CODE:REORDER:NOROOT(1) |
sahilmgandhi | 18:6a4db94011d3 | 213 | SWI0_IRQHandler |
sahilmgandhi | 18:6a4db94011d3 | 214 | B . |
sahilmgandhi | 18:6a4db94011d3 | 215 | PUBWEAK SWI1_IRQHandler |
sahilmgandhi | 18:6a4db94011d3 | 216 | SECTION .text:CODE:REORDER:NOROOT(1) |
sahilmgandhi | 18:6a4db94011d3 | 217 | SWI1_IRQHandler |
sahilmgandhi | 18:6a4db94011d3 | 218 | B . |
sahilmgandhi | 18:6a4db94011d3 | 219 | PUBWEAK SWI2_IRQHandler |
sahilmgandhi | 18:6a4db94011d3 | 220 | SECTION .text:CODE:REORDER:NOROOT(1) |
sahilmgandhi | 18:6a4db94011d3 | 221 | SWI2_IRQHandler |
sahilmgandhi | 18:6a4db94011d3 | 222 | B . |
sahilmgandhi | 18:6a4db94011d3 | 223 | PUBWEAK SWI3_IRQHandler |
sahilmgandhi | 18:6a4db94011d3 | 224 | SECTION .text:CODE:REORDER:NOROOT(1) |
sahilmgandhi | 18:6a4db94011d3 | 225 | SWI3_IRQHandler |
sahilmgandhi | 18:6a4db94011d3 | 226 | B . |
sahilmgandhi | 18:6a4db94011d3 | 227 | PUBWEAK SWI4_IRQHandler |
sahilmgandhi | 18:6a4db94011d3 | 228 | SECTION .text:CODE:REORDER:NOROOT(1) |
sahilmgandhi | 18:6a4db94011d3 | 229 | SWI4_IRQHandler |
sahilmgandhi | 18:6a4db94011d3 | 230 | B . |
sahilmgandhi | 18:6a4db94011d3 | 231 | PUBWEAK SWI5_IRQHandler |
sahilmgandhi | 18:6a4db94011d3 | 232 | SECTION .text:CODE:REORDER:NOROOT(1) |
sahilmgandhi | 18:6a4db94011d3 | 233 | SWI5_IRQHandler |
sahilmgandhi | 18:6a4db94011d3 | 234 | B . |
sahilmgandhi | 18:6a4db94011d3 | 235 | |
sahilmgandhi | 18:6a4db94011d3 | 236 | |
sahilmgandhi | 18:6a4db94011d3 | 237 | END |