PokittoLib is the library needed for programming the Pokitto DIY game console (www.pokitto.com)

Committer:
Pokitto
Date:
Wed Oct 11 20:35:27 2017 +0000
Revision:
5:ea7377f3d1af
Fixed PokittoLib. Includes a working custom mbed-src

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Pokitto 5:ea7377f3d1af 1 ;/**************************************************************************//**
Pokitto 5:ea7377f3d1af 2 ; * @file startup_LPC11U6x.s
Pokitto 5:ea7377f3d1af 3 ; * @brief CMSIS Cortex-M0+ Core Device Startup File for
Pokitto 5:ea7377f3d1af 4 ; * NXP LPC11U6x Device Series
Pokitto 5:ea7377f3d1af 5 ; * @version V1.00
Pokitto 5:ea7377f3d1af 6 ; * @date 22. October 2013
Pokitto 5:ea7377f3d1af 7 ; *
Pokitto 5:ea7377f3d1af 8 ; * @note
Pokitto 5:ea7377f3d1af 9 ; * Copyright (C) 2013 ARM Limited. All rights reserved.
Pokitto 5:ea7377f3d1af 10 ; *
Pokitto 5:ea7377f3d1af 11 ; * @par
Pokitto 5:ea7377f3d1af 12 ; * ARM Limited (ARM) is supplying this software for use with Cortex-M
Pokitto 5:ea7377f3d1af 13 ; * processor based microcontrollers. This file can be freely distributed
Pokitto 5:ea7377f3d1af 14 ; * within development tools that are supporting such ARM based processors.
Pokitto 5:ea7377f3d1af 15 ; *
Pokitto 5:ea7377f3d1af 16 ; * @par
Pokitto 5:ea7377f3d1af 17 ; * THIS SOFTWARE IS PROVIDED "AS IS". NO WARRANTIES, WHETHER EXPRESS, IMPLIED
Pokitto 5:ea7377f3d1af 18 ; * OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF
Pokitto 5:ea7377f3d1af 19 ; * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE.
Pokitto 5:ea7377f3d1af 20 ; * ARM SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR
Pokitto 5:ea7377f3d1af 21 ; * CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER.
Pokitto 5:ea7377f3d1af 22 ; *
Pokitto 5:ea7377f3d1af 23 ; ******************************************************************************/
Pokitto 5:ea7377f3d1af 24
Pokitto 5:ea7377f3d1af 25 ; *------- <<< Use Configuration Wizard in Context Menu >>> ------------------
Pokitto 5:ea7377f3d1af 26
Pokitto 5:ea7377f3d1af 27 ; <h> Stack Configuration
Pokitto 5:ea7377f3d1af 28 ; <o> Stack Size (in Bytes) <0x0-0xFFFFFFFF:8>
Pokitto 5:ea7377f3d1af 29 ; </h>
Pokitto 5:ea7377f3d1af 30
Pokitto 5:ea7377f3d1af 31 AREA STACK, NOINIT, READWRITE, ALIGN=3
Pokitto 5:ea7377f3d1af 32 EXPORT __initial_sp
Pokitto 5:ea7377f3d1af 33
Pokitto 5:ea7377f3d1af 34 __initial_sp EQU 0x10008000 ; Top of RAM from LPC1U68
Pokitto 5:ea7377f3d1af 35
Pokitto 5:ea7377f3d1af 36
Pokitto 5:ea7377f3d1af 37 ; <h> Heap Configuration
Pokitto 5:ea7377f3d1af 38 ; <o> Heap Size (in Bytes) <0x0-0xFFFFFFFF:8>
Pokitto 5:ea7377f3d1af 39 ; </h>
Pokitto 5:ea7377f3d1af 40
Pokitto 5:ea7377f3d1af 41 Heap_Size EQU 0x00000000
Pokitto 5:ea7377f3d1af 42
Pokitto 5:ea7377f3d1af 43 AREA HEAP, NOINIT, READWRITE, ALIGN=3
Pokitto 5:ea7377f3d1af 44 __heap_base
Pokitto 5:ea7377f3d1af 45 Heap_Mem SPACE Heap_Size
Pokitto 5:ea7377f3d1af 46 __heap_limit
Pokitto 5:ea7377f3d1af 47
Pokitto 5:ea7377f3d1af 48
Pokitto 5:ea7377f3d1af 49 PRESERVE8
Pokitto 5:ea7377f3d1af 50 THUMB
Pokitto 5:ea7377f3d1af 51
Pokitto 5:ea7377f3d1af 52
Pokitto 5:ea7377f3d1af 53 ; Vector Table Mapped to Address 0 at Reset
Pokitto 5:ea7377f3d1af 54
Pokitto 5:ea7377f3d1af 55 AREA RESET, DATA, READONLY
Pokitto 5:ea7377f3d1af 56 EXPORT __Vectors
Pokitto 5:ea7377f3d1af 57
Pokitto 5:ea7377f3d1af 58 __Vectors DCD __initial_sp ; Top of Stack
Pokitto 5:ea7377f3d1af 59 DCD Reset_Handler ; Reset Handler
Pokitto 5:ea7377f3d1af 60 DCD NMI_Handler ; NMI Handler
Pokitto 5:ea7377f3d1af 61 DCD HardFault_Handler ; Hard Fault Handler
Pokitto 5:ea7377f3d1af 62 DCD 0 ; Reserved
Pokitto 5:ea7377f3d1af 63 DCD 0 ; Reserved
Pokitto 5:ea7377f3d1af 64 DCD 0 ; Reserved
Pokitto 5:ea7377f3d1af 65 DCD 0 ; Reserved
Pokitto 5:ea7377f3d1af 66 DCD 0 ; Reserved
Pokitto 5:ea7377f3d1af 67 DCD 0 ; Reserved
Pokitto 5:ea7377f3d1af 68 DCD 0 ; Reserved
Pokitto 5:ea7377f3d1af 69 DCD SVC_Handler ; SVCall Handler
Pokitto 5:ea7377f3d1af 70 DCD 0 ; Reserved
Pokitto 5:ea7377f3d1af 71 DCD 0 ; Reserved
Pokitto 5:ea7377f3d1af 72 DCD PendSV_Handler ; PendSV Handler
Pokitto 5:ea7377f3d1af 73 DCD SysTick_Handler ; SysTick Handler
Pokitto 5:ea7377f3d1af 74
Pokitto 5:ea7377f3d1af 75 ; External Interrupts
Pokitto 5:ea7377f3d1af 76 DCD PIN_INT0_IRQHandler ; 16+ 0 GPIO pin interrupt 0
Pokitto 5:ea7377f3d1af 77 DCD PIN_INT1_IRQHandler ; 16+ 1 GPIO pin interrupt 1
Pokitto 5:ea7377f3d1af 78 DCD PIN_INT2_IRQHandler ; 16+ 2 GPIO pin interrupt 2
Pokitto 5:ea7377f3d1af 79 DCD PIN_INT3_IRQHandler ; 16+ 3 GPIO pin interrupt 3
Pokitto 5:ea7377f3d1af 80 DCD PIN_INT4_IRQHandler ; 16+ 4 GPIO pin interrupt 4
Pokitto 5:ea7377f3d1af 81 DCD PIN_INT5_IRQHandler ; 16+ 5 GPIO pin interrupt 5
Pokitto 5:ea7377f3d1af 82 DCD PIN_INT6_IRQHandler ; 16+ 6 GPIO pin interrupt 6
Pokitto 5:ea7377f3d1af 83 DCD PIN_INT7_IRQHandler ; 16+ 7 GPIO pin interrupt 7
Pokitto 5:ea7377f3d1af 84 DCD GINT0_IRQHandler ; 16+ 8 GPIO GROUP0 interrupt
Pokitto 5:ea7377f3d1af 85 DCD GINT1_IRQHandler ; 16+ 9 GPIO GROUP1 interrupt
Pokitto 5:ea7377f3d1af 86 DCD I2C1_IRQHandler ; 16+10 I2C1 interrupt
Pokitto 5:ea7377f3d1af 87 DCD USART1_4_IRQHandler ; 16+11 Combined USART1 and USART4 interrupts
Pokitto 5:ea7377f3d1af 88 DCD USART2_3_IRQHandler ; 16+12 Combined USART2 and USART3 interrupts
Pokitto 5:ea7377f3d1af 89 DCD SCT0_1_IRQHandler ; 16+13 Combined SCT0 and SCT1 interrupts
Pokitto 5:ea7377f3d1af 90 DCD SSP1_IRQHandler ; 16+14 SSP1 interrupt
Pokitto 5:ea7377f3d1af 91 DCD I2C0_IRQHandler ; 16+15 I2C0 interrupt
Pokitto 5:ea7377f3d1af 92 DCD CT16B0_IRQHandler ; 16+16 CT16B0 interrupt
Pokitto 5:ea7377f3d1af 93 DCD CT16B1_IRQHandler ; 16+17 CT16B1 interrupt
Pokitto 5:ea7377f3d1af 94 DCD CT32B0_IRQHandler ; 16+18 CT32B0 interrupt
Pokitto 5:ea7377f3d1af 95 DCD CT32B1_IRQHandler ; 16+19 CT32B1 interrupt
Pokitto 5:ea7377f3d1af 96 DCD SSP0_IRQHandler ; 16+20 SSP0 interrupt
Pokitto 5:ea7377f3d1af 97 DCD USART0_IRQHandler ; 16+21 USART0 interrupt
Pokitto 5:ea7377f3d1af 98 DCD USB_IRQHandler ; 16+22 USB interrupt
Pokitto 5:ea7377f3d1af 99 DCD USB_FIQ_IRQHandler ; 16+23 USB_FIQ interrupt
Pokitto 5:ea7377f3d1af 100 DCD ADC_A_IRQHandler ; 16+24 Combined ADC_A end-of-sequence A and threshold crossing interrupts
Pokitto 5:ea7377f3d1af 101 DCD RTC_IRQHandler ; 16+25 RTC interrupt
Pokitto 5:ea7377f3d1af 102 DCD BOD_WDT_IRQHandler ; 16+26 Combined BOD and WWDT interrupt
Pokitto 5:ea7377f3d1af 103 DCD FLASH_IRQHandler ; 16+27 Combined flash and EEPROM controller interrupts
Pokitto 5:ea7377f3d1af 104 DCD DMA_IRQHandler ; 16+28 DMA interrupt
Pokitto 5:ea7377f3d1af 105 DCD ADC_B_IRQHandler ; 16+29 Combined ADC_A end-of-sequence A and threshold crossing interrupts
Pokitto 5:ea7377f3d1af 106 DCD USBWAKEUP_IRQHandler ; 16+30 USB_WAKEUP interrupt
Pokitto 5:ea7377f3d1af 107 DCD 0 ; 16+31 Reserved
Pokitto 5:ea7377f3d1af 108
Pokitto 5:ea7377f3d1af 109 ; <h> Code Read Protection
Pokitto 5:ea7377f3d1af 110 ; <o> Code Read Protection <0xFFFFFFFF=>CRP Disabled
Pokitto 5:ea7377f3d1af 111 ; <0x12345678=>CRP Level 1
Pokitto 5:ea7377f3d1af 112 ; <0x87654321=>CRP Level 2
Pokitto 5:ea7377f3d1af 113 ; <0x43218765=>CRP Level 3 (ARE YOU SURE?)
Pokitto 5:ea7377f3d1af 114 ; <0x4E697370=>NO ISP (ARE YOU SURE?)
Pokitto 5:ea7377f3d1af 115 ; </h>
Pokitto 5:ea7377f3d1af 116 IF :LNOT::DEF:NO_CRP
Pokitto 5:ea7377f3d1af 117 AREA |.ARM.__at_0x02FC|, CODE, READONLY
Pokitto 5:ea7377f3d1af 118 DCD 0xFFFFFFFF
Pokitto 5:ea7377f3d1af 119 ENDIF
Pokitto 5:ea7377f3d1af 120
Pokitto 5:ea7377f3d1af 121 AREA |.text|, CODE, READONLY
Pokitto 5:ea7377f3d1af 122
Pokitto 5:ea7377f3d1af 123
Pokitto 5:ea7377f3d1af 124 ; Reset Handler
Pokitto 5:ea7377f3d1af 125
Pokitto 5:ea7377f3d1af 126 Reset_Handler PROC
Pokitto 5:ea7377f3d1af 127 EXPORT Reset_Handler [WEAK]
Pokitto 5:ea7377f3d1af 128 IMPORT SystemInit
Pokitto 5:ea7377f3d1af 129 IMPORT __main
Pokitto 5:ea7377f3d1af 130 LDR R0, =SystemInit
Pokitto 5:ea7377f3d1af 131 BLX R0
Pokitto 5:ea7377f3d1af 132 LDR R0, =__main
Pokitto 5:ea7377f3d1af 133 BX R0
Pokitto 5:ea7377f3d1af 134 ENDP
Pokitto 5:ea7377f3d1af 135
Pokitto 5:ea7377f3d1af 136
Pokitto 5:ea7377f3d1af 137 ; Dummy Exception Handlers (infinite loops which can be modified)
Pokitto 5:ea7377f3d1af 138
Pokitto 5:ea7377f3d1af 139 NMI_Handler PROC
Pokitto 5:ea7377f3d1af 140 EXPORT NMI_Handler [WEAK]
Pokitto 5:ea7377f3d1af 141 B .
Pokitto 5:ea7377f3d1af 142 ENDP
Pokitto 5:ea7377f3d1af 143 HardFault_Handler\
Pokitto 5:ea7377f3d1af 144 PROC
Pokitto 5:ea7377f3d1af 145 EXPORT HardFault_Handler [WEAK]
Pokitto 5:ea7377f3d1af 146 B .
Pokitto 5:ea7377f3d1af 147 ENDP
Pokitto 5:ea7377f3d1af 148 SVC_Handler PROC
Pokitto 5:ea7377f3d1af 149 EXPORT SVC_Handler [WEAK]
Pokitto 5:ea7377f3d1af 150 B .
Pokitto 5:ea7377f3d1af 151 ENDP
Pokitto 5:ea7377f3d1af 152 PendSV_Handler PROC
Pokitto 5:ea7377f3d1af 153 EXPORT PendSV_Handler [WEAK]
Pokitto 5:ea7377f3d1af 154 B .
Pokitto 5:ea7377f3d1af 155 ENDP
Pokitto 5:ea7377f3d1af 156 SysTick_Handler PROC
Pokitto 5:ea7377f3d1af 157 EXPORT SysTick_Handler [WEAK]
Pokitto 5:ea7377f3d1af 158 B .
Pokitto 5:ea7377f3d1af 159 ENDP
Pokitto 5:ea7377f3d1af 160 Reserved_IRQHandler PROC
Pokitto 5:ea7377f3d1af 161 EXPORT Reserved_IRQHandler [WEAK]
Pokitto 5:ea7377f3d1af 162 B .
Pokitto 5:ea7377f3d1af 163 ENDP
Pokitto 5:ea7377f3d1af 164
Pokitto 5:ea7377f3d1af 165 Default_Handler PROC
Pokitto 5:ea7377f3d1af 166 EXPORT PIN_INT0_IRQHandler [WEAK]
Pokitto 5:ea7377f3d1af 167 EXPORT PIN_INT1_IRQHandler [WEAK]
Pokitto 5:ea7377f3d1af 168 EXPORT PIN_INT2_IRQHandler [WEAK]
Pokitto 5:ea7377f3d1af 169 EXPORT PIN_INT3_IRQHandler [WEAK]
Pokitto 5:ea7377f3d1af 170 EXPORT PIN_INT4_IRQHandler [WEAK]
Pokitto 5:ea7377f3d1af 171 EXPORT PIN_INT5_IRQHandler [WEAK]
Pokitto 5:ea7377f3d1af 172 EXPORT PIN_INT6_IRQHandler [WEAK]
Pokitto 5:ea7377f3d1af 173 EXPORT PIN_INT7_IRQHandler [WEAK]
Pokitto 5:ea7377f3d1af 174 EXPORT GINT0_IRQHandler [WEAK]
Pokitto 5:ea7377f3d1af 175 EXPORT GINT1_IRQHandler [WEAK]
Pokitto 5:ea7377f3d1af 176 EXPORT I2C1_IRQHandler [WEAK]
Pokitto 5:ea7377f3d1af 177 EXPORT USART1_4_IRQHandler [WEAK]
Pokitto 5:ea7377f3d1af 178 EXPORT USART2_3_IRQHandler [WEAK]
Pokitto 5:ea7377f3d1af 179 EXPORT SCT0_1_IRQHandler [WEAK]
Pokitto 5:ea7377f3d1af 180 EXPORT SSP1_IRQHandler [WEAK]
Pokitto 5:ea7377f3d1af 181 EXPORT I2C0_IRQHandler [WEAK]
Pokitto 5:ea7377f3d1af 182 EXPORT CT16B0_IRQHandler [WEAK]
Pokitto 5:ea7377f3d1af 183 EXPORT CT16B1_IRQHandler [WEAK]
Pokitto 5:ea7377f3d1af 184 EXPORT CT32B0_IRQHandler [WEAK]
Pokitto 5:ea7377f3d1af 185 EXPORT CT32B1_IRQHandler [WEAK]
Pokitto 5:ea7377f3d1af 186 EXPORT SSP0_IRQHandler [WEAK]
Pokitto 5:ea7377f3d1af 187 EXPORT USART0_IRQHandler [WEAK]
Pokitto 5:ea7377f3d1af 188 EXPORT USB_IRQHandler [WEAK]
Pokitto 5:ea7377f3d1af 189 EXPORT USB_FIQ_IRQHandler [WEAK]
Pokitto 5:ea7377f3d1af 190 EXPORT ADC_A_IRQHandler [WEAK]
Pokitto 5:ea7377f3d1af 191 EXPORT RTC_IRQHandler [WEAK]
Pokitto 5:ea7377f3d1af 192 EXPORT BOD_WDT_IRQHandler [WEAK]
Pokitto 5:ea7377f3d1af 193 EXPORT FLASH_IRQHandler [WEAK]
Pokitto 5:ea7377f3d1af 194 EXPORT DMA_IRQHandler [WEAK]
Pokitto 5:ea7377f3d1af 195 EXPORT ADC_B_IRQHandler [WEAK]
Pokitto 5:ea7377f3d1af 196 EXPORT USBWAKEUP_IRQHandler [WEAK]
Pokitto 5:ea7377f3d1af 197
Pokitto 5:ea7377f3d1af 198 PIN_INT0_IRQHandler
Pokitto 5:ea7377f3d1af 199 PIN_INT1_IRQHandler
Pokitto 5:ea7377f3d1af 200 PIN_INT2_IRQHandler
Pokitto 5:ea7377f3d1af 201 PIN_INT3_IRQHandler
Pokitto 5:ea7377f3d1af 202 PIN_INT4_IRQHandler
Pokitto 5:ea7377f3d1af 203 PIN_INT5_IRQHandler
Pokitto 5:ea7377f3d1af 204 PIN_INT6_IRQHandler
Pokitto 5:ea7377f3d1af 205 PIN_INT7_IRQHandler
Pokitto 5:ea7377f3d1af 206 GINT0_IRQHandler
Pokitto 5:ea7377f3d1af 207 GINT1_IRQHandler
Pokitto 5:ea7377f3d1af 208 I2C1_IRQHandler
Pokitto 5:ea7377f3d1af 209 USART1_4_IRQHandler
Pokitto 5:ea7377f3d1af 210 USART2_3_IRQHandler
Pokitto 5:ea7377f3d1af 211 SCT0_1_IRQHandler
Pokitto 5:ea7377f3d1af 212 SSP1_IRQHandler
Pokitto 5:ea7377f3d1af 213 I2C0_IRQHandler
Pokitto 5:ea7377f3d1af 214 CT16B0_IRQHandler
Pokitto 5:ea7377f3d1af 215 CT16B1_IRQHandler
Pokitto 5:ea7377f3d1af 216 CT32B0_IRQHandler
Pokitto 5:ea7377f3d1af 217 CT32B1_IRQHandler
Pokitto 5:ea7377f3d1af 218 SSP0_IRQHandler
Pokitto 5:ea7377f3d1af 219 USART0_IRQHandler
Pokitto 5:ea7377f3d1af 220 USB_IRQHandler
Pokitto 5:ea7377f3d1af 221 USB_FIQ_IRQHandler
Pokitto 5:ea7377f3d1af 222 ADC_A_IRQHandler
Pokitto 5:ea7377f3d1af 223 RTC_IRQHandler
Pokitto 5:ea7377f3d1af 224 BOD_WDT_IRQHandler
Pokitto 5:ea7377f3d1af 225 FLASH_IRQHandler
Pokitto 5:ea7377f3d1af 226 DMA_IRQHandler
Pokitto 5:ea7377f3d1af 227 ADC_B_IRQHandler
Pokitto 5:ea7377f3d1af 228 USBWAKEUP_IRQHandler
Pokitto 5:ea7377f3d1af 229
Pokitto 5:ea7377f3d1af 230 B .
Pokitto 5:ea7377f3d1af 231
Pokitto 5:ea7377f3d1af 232 ENDP
Pokitto 5:ea7377f3d1af 233
Pokitto 5:ea7377f3d1af 234
Pokitto 5:ea7377f3d1af 235 ALIGN
Pokitto 5:ea7377f3d1af 236
Pokitto 5:ea7377f3d1af 237
Pokitto 5:ea7377f3d1af 238 ; User Initial Stack & Heap
Pokitto 5:ea7377f3d1af 239
Pokitto 5:ea7377f3d1af 240 EXPORT __initial_sp
Pokitto 5:ea7377f3d1af 241 EXPORT __heap_base
Pokitto 5:ea7377f3d1af 242 EXPORT __heap_limit
Pokitto 5:ea7377f3d1af 243
Pokitto 5:ea7377f3d1af 244 END