Mouse code for the MacroRat

Dependencies:   ITG3200 QEI

Committer:
sahilmgandhi
Date:
Sun May 14 23:18:57 2017 +0000
Revision:
18:6a4db94011d3
Publishing again

Who changed what in which revision?

UserRevisionLine numberNew contents of line
sahilmgandhi 18:6a4db94011d3 1 ;/* File: startup_ncs36510.s
sahilmgandhi 18:6a4db94011d3 2 ; * Purpose: startup file for Cortex-M3 devices. Should use with
sahilmgandhi 18:6a4db94011d3 3 ; * ARMGCC for ARM Embedded Processors
sahilmgandhi 18:6a4db94011d3 4 ; * Version: V2.00
sahilmgandhi 18:6a4db94011d3 5 ; * Date: 25 Feb 2016
sahilmgandhi 18:6a4db94011d3 6 ; *
sahilmgandhi 18:6a4db94011d3 7 ; */
sahilmgandhi 18:6a4db94011d3 8 ;/* Copyright (c) 2011 - 2014 ARM LIMITED
sahilmgandhi 18:6a4db94011d3 9 ;
sahilmgandhi 18:6a4db94011d3 10 ; All rights reserved.
sahilmgandhi 18:6a4db94011d3 11 ; Redistribution and use in source and binary forms, with or without
sahilmgandhi 18:6a4db94011d3 12 ; modification, are permitted provided that the following conditions are met:
sahilmgandhi 18:6a4db94011d3 13 ; - Redistributions of source code must retain the above copyright
sahilmgandhi 18:6a4db94011d3 14 ; notice, this list of conditions and the following disclaimer.
sahilmgandhi 18:6a4db94011d3 15 ; - Redistributions in binary form must reproduce the above copyright
sahilmgandhi 18:6a4db94011d3 16 ; notice, this list of conditions and the following disclaimer in the
sahilmgandhi 18:6a4db94011d3 17 ; documentation and/or other materials provided with the distribution.
sahilmgandhi 18:6a4db94011d3 18 ; - Neither the name of ARM nor the names of its contributors may be used
sahilmgandhi 18:6a4db94011d3 19 ; to endorse or promote products derived from this software without
sahilmgandhi 18:6a4db94011d3 20 ; specific prior written permission.
sahilmgandhi 18:6a4db94011d3 21 ; *
sahilmgandhi 18:6a4db94011d3 22 ; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
sahilmgandhi 18:6a4db94011d3 23 ; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
sahilmgandhi 18:6a4db94011d3 24 ; IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
sahilmgandhi 18:6a4db94011d3 25 ; ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS AND CONTRIBUTORS BE
sahilmgandhi 18:6a4db94011d3 26 ; LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
sahilmgandhi 18:6a4db94011d3 27 ; CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
sahilmgandhi 18:6a4db94011d3 28 ; SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
sahilmgandhi 18:6a4db94011d3 29 ; INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
sahilmgandhi 18:6a4db94011d3 30 ; CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
sahilmgandhi 18:6a4db94011d3 31 ; ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
sahilmgandhi 18:6a4db94011d3 32 ; POSSIBILITY OF SUCH DAMAGE.
sahilmgandhi 18:6a4db94011d3 33 ; ---------------------------------------------------------------------------*/
sahilmgandhi 18:6a4db94011d3 34
sahilmgandhi 18:6a4db94011d3 35
sahilmgandhi 18:6a4db94011d3 36 PRESERVE8
sahilmgandhi 18:6a4db94011d3 37 THUMB
sahilmgandhi 18:6a4db94011d3 38
sahilmgandhi 18:6a4db94011d3 39
sahilmgandhi 18:6a4db94011d3 40 ; Vector Table Mapped to Address 0x3000 at Reset
sahilmgandhi 18:6a4db94011d3 41
sahilmgandhi 18:6a4db94011d3 42 AREA RESET, DATA, READONLY
sahilmgandhi 18:6a4db94011d3 43 EXPORT __Vectors
sahilmgandhi 18:6a4db94011d3 44 EXPORT __Vectors_End
sahilmgandhi 18:6a4db94011d3 45 EXPORT __Vectors_Size
sahilmgandhi 18:6a4db94011d3 46 IMPORT |Image$$ARM_LIB_HEAP$$ZI$$Limit|
sahilmgandhi 18:6a4db94011d3 47
sahilmgandhi 18:6a4db94011d3 48 __Vectors DCD |Image$$ARM_LIB_HEAP$$ZI$$Limit| ; Top of RAM
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 DCD fIrqTim0Handler
sahilmgandhi 18:6a4db94011d3 67 DCD fIrqTim1Handler
sahilmgandhi 18:6a4db94011d3 68 DCD fIrqTim2Handler
sahilmgandhi 18:6a4db94011d3 69 DCD fIrqUart1Handler
sahilmgandhi 18:6a4db94011d3 70 DCD fIrqSpiHandler
sahilmgandhi 18:6a4db94011d3 71 DCD fIrqI2CHandler
sahilmgandhi 18:6a4db94011d3 72 DCD fIrqGpioHandler
sahilmgandhi 18:6a4db94011d3 73 DCD fIrqRtcHandler
sahilmgandhi 18:6a4db94011d3 74 DCD fIrqFlashHandler
sahilmgandhi 18:6a4db94011d3 75 DCD fIrqMacHwHandler
sahilmgandhi 18:6a4db94011d3 76 DCD fIrqAesHandler
sahilmgandhi 18:6a4db94011d3 77 DCD fIrqAdcHandler
sahilmgandhi 18:6a4db94011d3 78 DCD fIrqClockCalHandler
sahilmgandhi 18:6a4db94011d3 79 DCD fIrqUart2Handler
sahilmgandhi 18:6a4db94011d3 80 DCD fIrqUviHandler
sahilmgandhi 18:6a4db94011d3 81 DCD fIrqDmaHandler
sahilmgandhi 18:6a4db94011d3 82 DCD fIrqDbgPwrUpHandler
sahilmgandhi 18:6a4db94011d3 83 DCD fIrqSpi2Handler
sahilmgandhi 18:6a4db94011d3 84 DCD fIrqI2C2Handler
sahilmgandhi 18:6a4db94011d3 85 DCD fIrqFVDDHCompHandler
sahilmgandhi 18:6a4db94011d3 86 __Vectors_End
sahilmgandhi 18:6a4db94011d3 87
sahilmgandhi 18:6a4db94011d3 88 __Vectors_Size EQU __Vectors_End - __Vectors
sahilmgandhi 18:6a4db94011d3 89
sahilmgandhi 18:6a4db94011d3 90 AREA |.text|, CODE, READONLY
sahilmgandhi 18:6a4db94011d3 91
sahilmgandhi 18:6a4db94011d3 92 ; Reset Handler
sahilmgandhi 18:6a4db94011d3 93
sahilmgandhi 18:6a4db94011d3 94 Reset_Handler PROC
sahilmgandhi 18:6a4db94011d3 95 EXPORT Reset_Handler [WEAK]
sahilmgandhi 18:6a4db94011d3 96 IMPORT SystemInit
sahilmgandhi 18:6a4db94011d3 97 IMPORT __main
sahilmgandhi 18:6a4db94011d3 98 LDR R0, =SystemInit
sahilmgandhi 18:6a4db94011d3 99 BLX R0
sahilmgandhi 18:6a4db94011d3 100 LDR R0, =__main
sahilmgandhi 18:6a4db94011d3 101 BX R0
sahilmgandhi 18:6a4db94011d3 102 ENDP
sahilmgandhi 18:6a4db94011d3 103
sahilmgandhi 18:6a4db94011d3 104
sahilmgandhi 18:6a4db94011d3 105 ; Dummy Exception Handlers (infinite loops which can be modified)
sahilmgandhi 18:6a4db94011d3 106
sahilmgandhi 18:6a4db94011d3 107 NMI_Handler PROC
sahilmgandhi 18:6a4db94011d3 108 EXPORT NMI_Handler [WEAK]
sahilmgandhi 18:6a4db94011d3 109 B .
sahilmgandhi 18:6a4db94011d3 110 ENDP
sahilmgandhi 18:6a4db94011d3 111 HardFault_Handler\
sahilmgandhi 18:6a4db94011d3 112 PROC
sahilmgandhi 18:6a4db94011d3 113 EXPORT HardFault_Handler [WEAK]
sahilmgandhi 18:6a4db94011d3 114 B .
sahilmgandhi 18:6a4db94011d3 115 ENDP
sahilmgandhi 18:6a4db94011d3 116 MemManage_Handler\
sahilmgandhi 18:6a4db94011d3 117 PROC
sahilmgandhi 18:6a4db94011d3 118 EXPORT MemManage_Handler [WEAK]
sahilmgandhi 18:6a4db94011d3 119 B .
sahilmgandhi 18:6a4db94011d3 120 ENDP
sahilmgandhi 18:6a4db94011d3 121 BusFault_Handler\
sahilmgandhi 18:6a4db94011d3 122 PROC
sahilmgandhi 18:6a4db94011d3 123 EXPORT BusFault_Handler [WEAK]
sahilmgandhi 18:6a4db94011d3 124 B .
sahilmgandhi 18:6a4db94011d3 125 ENDP
sahilmgandhi 18:6a4db94011d3 126 UsageFault_Handler\
sahilmgandhi 18:6a4db94011d3 127 PROC
sahilmgandhi 18:6a4db94011d3 128 EXPORT UsageFault_Handler [WEAK]
sahilmgandhi 18:6a4db94011d3 129 B .
sahilmgandhi 18:6a4db94011d3 130 ENDP
sahilmgandhi 18:6a4db94011d3 131 SVC_Handler PROC
sahilmgandhi 18:6a4db94011d3 132 EXPORT SVC_Handler [WEAK]
sahilmgandhi 18:6a4db94011d3 133 B .
sahilmgandhi 18:6a4db94011d3 134 ENDP
sahilmgandhi 18:6a4db94011d3 135 DebugMon_Handler\
sahilmgandhi 18:6a4db94011d3 136 PROC
sahilmgandhi 18:6a4db94011d3 137 EXPORT DebugMon_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 EXPORT fIrqTim0Handler [WEAK]
sahilmgandhi 18:6a4db94011d3 151 EXPORT fIrqTim1Handler [WEAK]
sahilmgandhi 18:6a4db94011d3 152 EXPORT fIrqTim2Handler [WEAK]
sahilmgandhi 18:6a4db94011d3 153 EXPORT fIrqUart1Handler [WEAK]
sahilmgandhi 18:6a4db94011d3 154 EXPORT fIrqSpiHandler [WEAK]
sahilmgandhi 18:6a4db94011d3 155 EXPORT fIrqI2CHandler [WEAK]
sahilmgandhi 18:6a4db94011d3 156 EXPORT fIrqGpioHandler [WEAK]
sahilmgandhi 18:6a4db94011d3 157 EXPORT fIrqRtcHandler [WEAK]
sahilmgandhi 18:6a4db94011d3 158 EXPORT fIrqFlashHandler [WEAK]
sahilmgandhi 18:6a4db94011d3 159 EXPORT fIrqMacHwHandler [WEAK]
sahilmgandhi 18:6a4db94011d3 160 EXPORT fIrqAesHandler [WEAK]
sahilmgandhi 18:6a4db94011d3 161 EXPORT fIrqAdcHandler [WEAK]
sahilmgandhi 18:6a4db94011d3 162 EXPORT fIrqClockCalHandler [WEAK]
sahilmgandhi 18:6a4db94011d3 163 EXPORT fIrqUart2Handler [WEAK]
sahilmgandhi 18:6a4db94011d3 164 EXPORT fIrqUviHandler [WEAK]
sahilmgandhi 18:6a4db94011d3 165 EXPORT fIrqDmaHandler [WEAK]
sahilmgandhi 18:6a4db94011d3 166 EXPORT fIrqDbgPwrUpHandler [WEAK]
sahilmgandhi 18:6a4db94011d3 167 EXPORT fIrqSpi2Handler [WEAK]
sahilmgandhi 18:6a4db94011d3 168 EXPORT fIrqI2C2Handler [WEAK]
sahilmgandhi 18:6a4db94011d3 169 EXPORT fIrqFVDDHCompHandler [WEAK]
sahilmgandhi 18:6a4db94011d3 170
sahilmgandhi 18:6a4db94011d3 171 fIrqTim0Handler
sahilmgandhi 18:6a4db94011d3 172 fIrqTim1Handler
sahilmgandhi 18:6a4db94011d3 173 fIrqTim2Handler
sahilmgandhi 18:6a4db94011d3 174 fIrqUart1Handler
sahilmgandhi 18:6a4db94011d3 175 fIrqSpiHandler
sahilmgandhi 18:6a4db94011d3 176 fIrqI2CHandler
sahilmgandhi 18:6a4db94011d3 177 fIrqGpioHandler
sahilmgandhi 18:6a4db94011d3 178 fIrqRtcHandler
sahilmgandhi 18:6a4db94011d3 179 fIrqFlashHandler
sahilmgandhi 18:6a4db94011d3 180 fIrqMacHwHandler
sahilmgandhi 18:6a4db94011d3 181 fIrqAesHandler
sahilmgandhi 18:6a4db94011d3 182 fIrqAdcHandler
sahilmgandhi 18:6a4db94011d3 183 fIrqClockCalHandler
sahilmgandhi 18:6a4db94011d3 184 fIrqUart2Handler
sahilmgandhi 18:6a4db94011d3 185 fIrqUviHandler
sahilmgandhi 18:6a4db94011d3 186 fIrqDmaHandler
sahilmgandhi 18:6a4db94011d3 187 fIrqDbgPwrUpHandler
sahilmgandhi 18:6a4db94011d3 188 fIrqSpi2Handler
sahilmgandhi 18:6a4db94011d3 189 fIrqI2C2Handler
sahilmgandhi 18:6a4db94011d3 190 fIrqFVDDHCompHandler
sahilmgandhi 18:6a4db94011d3 191 DefaultISR
sahilmgandhi 18:6a4db94011d3 192
sahilmgandhi 18:6a4db94011d3 193 B .
sahilmgandhi 18:6a4db94011d3 194
sahilmgandhi 18:6a4db94011d3 195 ENDP
sahilmgandhi 18:6a4db94011d3 196
sahilmgandhi 18:6a4db94011d3 197 EXPORT __user_initial_stackheap
sahilmgandhi 18:6a4db94011d3 198 IMPORT |Image$$ARM_LIB_HEAP$$Base|
sahilmgandhi 18:6a4db94011d3 199 IMPORT |Image$$ARM_LIB_HEAP$$ZI$$Limit|
sahilmgandhi 18:6a4db94011d3 200
sahilmgandhi 18:6a4db94011d3 201 __user_initial_stackheap PROC
sahilmgandhi 18:6a4db94011d3 202 LDR R0, = |Image$$ARM_LIB_HEAP$$Base|
sahilmgandhi 18:6a4db94011d3 203 LDR R2, = |Image$$ARM_LIB_HEAP$$ZI$$Limit|
sahilmgandhi 18:6a4db94011d3 204 BX LR
sahilmgandhi 18:6a4db94011d3 205 ENDP
sahilmgandhi 18:6a4db94011d3 206
sahilmgandhi 18:6a4db94011d3 207 ALIGN
sahilmgandhi 18:6a4db94011d3 208 END