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

Committer:
spinal
Date:
Sun Nov 18 15:47:54 2018 +0000
Revision:
64:6e6c6c2b664e
Parent:
5:ea7377f3d1af
added fix for directrectangle()

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 ; * @purpose: CMSIS Cortex-M0PLUS Core Device Startup File
Pokitto 5:ea7377f3d1af 4 ; * for the NXP LPC11u6x Device Series (manually edited)
Pokitto 5:ea7377f3d1af 5 ; * @version: V1.00
Pokitto 5:ea7377f3d1af 6 ; * @date: 19. October 2009
Pokitto 5:ea7377f3d1af 7 ; *----------------------------------------------------------------------------
Pokitto 5:ea7377f3d1af 8 ; *
Pokitto 5:ea7377f3d1af 9 ; * Copyright (C) 2009 ARM Limited. All rights reserved.
Pokitto 5:ea7377f3d1af 10 ; *
Pokitto 5:ea7377f3d1af 11 ; * ARM Limited (ARM) is supplying this software for use with Cortex-Mx
Pokitto 5:ea7377f3d1af 12 ; * processor based microcontrollers. This file can be freely distributed
Pokitto 5:ea7377f3d1af 13 ; * within development tools that are supporting such ARM based processors.
Pokitto 5:ea7377f3d1af 14 ; *
Pokitto 5:ea7377f3d1af 15 ; * THIS SOFTWARE IS PROVIDED "AS IS". NO WARRANTIES, WHETHER EXPRESS, IMPLIED
Pokitto 5:ea7377f3d1af 16 ; * OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF
Pokitto 5:ea7377f3d1af 17 ; * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE.
Pokitto 5:ea7377f3d1af 18 ; * ARM SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR
Pokitto 5:ea7377f3d1af 19 ; * CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER.
Pokitto 5:ea7377f3d1af 20 ; *
Pokitto 5:ea7377f3d1af 21 ; ******************************************************************************/
Pokitto 5:ea7377f3d1af 22
Pokitto 5:ea7377f3d1af 23 ;
Pokitto 5:ea7377f3d1af 24 ; The modules in this file are included in the libraries, and may be replaced
Pokitto 5:ea7377f3d1af 25 ; by any user-defined modules that define the PUBLIC symbol _program_start or
Pokitto 5:ea7377f3d1af 26 ; a user defined start symbol.
Pokitto 5:ea7377f3d1af 27 ; To override the cstartup defined in the library, simply add your modified
Pokitto 5:ea7377f3d1af 28 ; version to the workbench project.
Pokitto 5:ea7377f3d1af 29 ;
Pokitto 5:ea7377f3d1af 30 ; The vector table is normally located at address 0.
Pokitto 5:ea7377f3d1af 31 ; When debugging in RAM, it can be located in RAM, aligned to at least 2^6.
Pokitto 5:ea7377f3d1af 32 ; The name "__vector_table" has special meaning for C-SPY:
Pokitto 5:ea7377f3d1af 33 ; it is where the SP start value is found, and the NVIC vector
Pokitto 5:ea7377f3d1af 34 ; table register (VTOR) is initialized to this address if != 0.
Pokitto 5:ea7377f3d1af 35 ;
Pokitto 5:ea7377f3d1af 36 ; Cortex-M version
Pokitto 5:ea7377f3d1af 37 ;
Pokitto 5:ea7377f3d1af 38
Pokitto 5:ea7377f3d1af 39 MODULE ?cstartup
Pokitto 5:ea7377f3d1af 40
Pokitto 5:ea7377f3d1af 41 ;; Forward declaration of sections.
Pokitto 5:ea7377f3d1af 42 SECTION CSTACK:DATA:NOROOT(3)
Pokitto 5:ea7377f3d1af 43
Pokitto 5:ea7377f3d1af 44 SECTION .intvec:CODE:NOROOT(2)
Pokitto 5:ea7377f3d1af 45
Pokitto 5:ea7377f3d1af 46 EXTERN __iar_program_start
Pokitto 5:ea7377f3d1af 47 EXTERN SystemInit
Pokitto 5:ea7377f3d1af 48 PUBLIC __vector_table
Pokitto 5:ea7377f3d1af 49 PUBLIC __vector_table_0x1c
Pokitto 5:ea7377f3d1af 50 PUBLIC __Vectors
Pokitto 5:ea7377f3d1af 51 PUBLIC __Vectors_End
Pokitto 5:ea7377f3d1af 52 PUBLIC __Vectors_Size
Pokitto 5:ea7377f3d1af 53
Pokitto 5:ea7377f3d1af 54 DATA
Pokitto 5:ea7377f3d1af 55
Pokitto 5:ea7377f3d1af 56 __vector_table
Pokitto 5:ea7377f3d1af 57 DCD sfe(CSTACK)
Pokitto 5:ea7377f3d1af 58 DCD Reset_Handler
Pokitto 5:ea7377f3d1af 59
Pokitto 5:ea7377f3d1af 60 DCD NMI_Handler
Pokitto 5:ea7377f3d1af 61 DCD HardFault_Handler
Pokitto 5:ea7377f3d1af 62 DCD 0
Pokitto 5:ea7377f3d1af 63 DCD 0
Pokitto 5:ea7377f3d1af 64 DCD 0
Pokitto 5:ea7377f3d1af 65 __vector_table_0x1c
Pokitto 5:ea7377f3d1af 66 DCD 0
Pokitto 5:ea7377f3d1af 67 DCD 0
Pokitto 5:ea7377f3d1af 68 DCD 0
Pokitto 5:ea7377f3d1af 69 DCD 0
Pokitto 5:ea7377f3d1af 70 DCD SVC_Handler
Pokitto 5:ea7377f3d1af 71 DCD 0
Pokitto 5:ea7377f3d1af 72 DCD 0
Pokitto 5:ea7377f3d1af 73 DCD PendSV_Handler
Pokitto 5:ea7377f3d1af 74 DCD SysTick_Handler
Pokitto 5:ea7377f3d1af 75
Pokitto 5:ea7377f3d1af 76 DCD PIN_INT0_IRQHandler ; Pin interrupt 0
Pokitto 5:ea7377f3d1af 77 DCD PIN_INT1_IRQHandler ; Pin interrupt 1
Pokitto 5:ea7377f3d1af 78 DCD PIN_INT2_IRQHandler ; Pin interrupt 2
Pokitto 5:ea7377f3d1af 79 DCD PIN_INT3_IRQHandler ; Pin interrupt 3
Pokitto 5:ea7377f3d1af 80 DCD PIN_INT4_IRQHandler ; Pin interrupt 4
Pokitto 5:ea7377f3d1af 81 DCD PIN_INT5_IRQHandler ; Pin interrupt 5
Pokitto 5:ea7377f3d1af 82 DCD PIN_INT6_IRQHandler ; Pin interrupt 6
Pokitto 5:ea7377f3d1af 83 DCD PIN_INT7_IRQHandler ; Pin interrupt 7
Pokitto 5:ea7377f3d1af 84 DCD GINT0_IRQHandler ; Port interrupt group 0
Pokitto 5:ea7377f3d1af 85 DCD GINT1_IRQHandler ; Port interrupt group 1
Pokitto 5:ea7377f3d1af 86 DCD I2C1_IRQHandler ; I2C1 interrupt
Pokitto 5:ea7377f3d1af 87 DCD USART1_4_IRQHandler ; USARTS 1 and 4 shared interrupt
Pokitto 5:ea7377f3d1af 88 DCD USART2_3_IRQHandler ; USARTS 2 and 3 shared interrupt
Pokitto 5:ea7377f3d1af 89 DCD SCT0_1_IRQHandler ; SCT 0 and 1 shared interrupt
Pokitto 5:ea7377f3d1af 90 DCD SSP1_IRQHandler ; SSP1 interrupt
Pokitto 5:ea7377f3d1af 91 DCD I2C0_IRQHandler ; I2C0 interrupt
Pokitto 5:ea7377f3d1af 92 DCD CT16B0_IRQHandler ; CT16B0 (16-bit Timer 0)
Pokitto 5:ea7377f3d1af 93 DCD CT16B1_IRQHandler ; CT16B1 (16-bit Timer 1)
Pokitto 5:ea7377f3d1af 94 DCD CT32B0_IRQHandler ; CT32B0 (32-bit Timer 0)
Pokitto 5:ea7377f3d1af 95 DCD CT32B1_IRQHandler ; CT32B0 (32-bit Timer 1)
Pokitto 5:ea7377f3d1af 96 DCD SSP0_IRQHandler ; SSP0 interrupt interrupt
Pokitto 5:ea7377f3d1af 97 DCD USART0_IRQHandler ; USART 0 interrupt interrupt
Pokitto 5:ea7377f3d1af 98 DCD USB_IRQHandler ; USB IRQ interrupt
Pokitto 5:ea7377f3d1af 99 DCD USB_FIQ_IRQHandler ; USB FIQ interrupt
Pokitto 5:ea7377f3d1af 100 DCD ADC_A_IRQHandler ; ADC A sequence (A/D Converter) interrupt
Pokitto 5:ea7377f3d1af 101 DCD RTC_IRQHandler ; RTC interrupt
Pokitto 5:ea7377f3d1af 102 DCD BOD_WDT_IRQHandler ; Shared BOD (Brownout Detect) and WDT interrupts
Pokitto 5:ea7377f3d1af 103 DCD FLASH_IRQHandler ; Flash Memory Controller interrupt
Pokitto 5:ea7377f3d1af 104 DCD DMA_IRQHandler ; DMA Controller interrupt
Pokitto 5:ea7377f3d1af 105 DCD ADC_B_IRQHandler ; ADC B sequence interrupt
Pokitto 5:ea7377f3d1af 106 DCD USBWakeup_IRQHandler ; USB wake-up interrupt
Pokitto 5:ea7377f3d1af 107 DCD Reserved_IRQHandler
Pokitto 5:ea7377f3d1af 108
Pokitto 5:ea7377f3d1af 109 __Vectors_End
Pokitto 5:ea7377f3d1af 110
Pokitto 5:ea7377f3d1af 111 __Vectors EQU __vector_table
Pokitto 5:ea7377f3d1af 112 __Vectors_Size EQU __Vectors_End - __Vectors
Pokitto 5:ea7377f3d1af 113
Pokitto 5:ea7377f3d1af 114
Pokitto 5:ea7377f3d1af 115 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Pokitto 5:ea7377f3d1af 116 ;;
Pokitto 5:ea7377f3d1af 117 ;; Default interrupt handlers.
Pokitto 5:ea7377f3d1af 118 ;;
Pokitto 5:ea7377f3d1af 119 THUMB
Pokitto 5:ea7377f3d1af 120 PUBWEAK Reset_Handler
Pokitto 5:ea7377f3d1af 121 SECTION .text:CODE:NOROOT:REORDER(2)
Pokitto 5:ea7377f3d1af 122 Reset_Handler
Pokitto 5:ea7377f3d1af 123 LDR R0, =SystemInit
Pokitto 5:ea7377f3d1af 124 BLX R0
Pokitto 5:ea7377f3d1af 125 LDR R0, =__iar_program_start
Pokitto 5:ea7377f3d1af 126 BX R0
Pokitto 5:ea7377f3d1af 127
Pokitto 5:ea7377f3d1af 128 PUBWEAK NMI_Handler
Pokitto 5:ea7377f3d1af 129 SECTION .text:CODE:REORDER:NOROOT(1)
Pokitto 5:ea7377f3d1af 130 NMI_Handler
Pokitto 5:ea7377f3d1af 131 B .
Pokitto 5:ea7377f3d1af 132
Pokitto 5:ea7377f3d1af 133 PUBWEAK HardFault_Handler
Pokitto 5:ea7377f3d1af 134 SECTION .text:CODE:REORDER:NOROOT(1)
Pokitto 5:ea7377f3d1af 135 HardFault_Handler
Pokitto 5:ea7377f3d1af 136 B .
Pokitto 5:ea7377f3d1af 137
Pokitto 5:ea7377f3d1af 138 PUBWEAK SVC_Handler
Pokitto 5:ea7377f3d1af 139 SECTION .text:CODE:REORDER:NOROOT(1)
Pokitto 5:ea7377f3d1af 140 SVC_Handler
Pokitto 5:ea7377f3d1af 141 B .
Pokitto 5:ea7377f3d1af 142
Pokitto 5:ea7377f3d1af 143 PUBWEAK PendSV_Handler
Pokitto 5:ea7377f3d1af 144 SECTION .text:CODE:REORDER:NOROOT(1)
Pokitto 5:ea7377f3d1af 145 PendSV_Handler
Pokitto 5:ea7377f3d1af 146 B .
Pokitto 5:ea7377f3d1af 147
Pokitto 5:ea7377f3d1af 148 PUBWEAK SysTick_Handler
Pokitto 5:ea7377f3d1af 149 SECTION .text:CODE:REORDER:NOROOT(1)
Pokitto 5:ea7377f3d1af 150 SysTick_Handler
Pokitto 5:ea7377f3d1af 151 B .
Pokitto 5:ea7377f3d1af 152
Pokitto 5:ea7377f3d1af 153 PUBWEAK Reserved_IRQHandler
Pokitto 5:ea7377f3d1af 154 SECTION .text:CODE:REORDER:NOROOT(1)
Pokitto 5:ea7377f3d1af 155 Reserved_IRQHandler
Pokitto 5:ea7377f3d1af 156 B .
Pokitto 5:ea7377f3d1af 157
Pokitto 5:ea7377f3d1af 158
Pokitto 5:ea7377f3d1af 159 PUBWEAK PIN_INT0_IRQHandler
Pokitto 5:ea7377f3d1af 160 PUBWEAK PIN_INT1_IRQHandler
Pokitto 5:ea7377f3d1af 161 PUBWEAK PIN_INT2_IRQHandler
Pokitto 5:ea7377f3d1af 162 PUBWEAK PIN_INT3_IRQHandler
Pokitto 5:ea7377f3d1af 163 PUBWEAK PIN_INT4_IRQHandler
Pokitto 5:ea7377f3d1af 164 PUBWEAK PIN_INT5_IRQHandler
Pokitto 5:ea7377f3d1af 165 PUBWEAK PIN_INT6_IRQHandler
Pokitto 5:ea7377f3d1af 166 PUBWEAK PIN_INT7_IRQHandler
Pokitto 5:ea7377f3d1af 167 PUBWEAK GINT0_IRQHandler
Pokitto 5:ea7377f3d1af 168 PUBWEAK GINT1_IRQHandler
Pokitto 5:ea7377f3d1af 169 PUBWEAK I2C1_IRQHandler
Pokitto 5:ea7377f3d1af 170 PUBWEAK USART1_4_IRQHandler
Pokitto 5:ea7377f3d1af 171 PUBWEAK USART2_3_IRQHandler
Pokitto 5:ea7377f3d1af 172 PUBWEAK SCT0_1_IRQHandler
Pokitto 5:ea7377f3d1af 173 PUBWEAK SSP1_IRQHandler
Pokitto 5:ea7377f3d1af 174 PUBWEAK I2C0_IRQHandler
Pokitto 5:ea7377f3d1af 175 PUBWEAK CT16B0_IRQHandler
Pokitto 5:ea7377f3d1af 176 PUBWEAK CT16B1_IRQHandler
Pokitto 5:ea7377f3d1af 177 PUBWEAK CT32B0_IRQHandler
Pokitto 5:ea7377f3d1af 178 PUBWEAK CT32B1_IRQHandler
Pokitto 5:ea7377f3d1af 179 PUBWEAK SSP0_IRQHandler
Pokitto 5:ea7377f3d1af 180 PUBWEAK USART0_IRQHandler
Pokitto 5:ea7377f3d1af 181 PUBWEAK USB_IRQHandler
Pokitto 5:ea7377f3d1af 182 PUBWEAK USB_FIQ_IRQHandler
Pokitto 5:ea7377f3d1af 183 PUBWEAK ADC_A_IRQHandler
Pokitto 5:ea7377f3d1af 184 PUBWEAK RTC_IRQHandler
Pokitto 5:ea7377f3d1af 185 PUBWEAK BOD_WDT_IRQHandler
Pokitto 5:ea7377f3d1af 186 PUBWEAK FLASH_IRQHandler
Pokitto 5:ea7377f3d1af 187 PUBWEAK DMA_IRQHandler
Pokitto 5:ea7377f3d1af 188 PUBWEAK ADC_B_IRQHandler
Pokitto 5:ea7377f3d1af 189 PUBWEAK USBWakeup_IRQHandler
Pokitto 5:ea7377f3d1af 190
Pokitto 5:ea7377f3d1af 191 SECTION .text:CODE:REORDER:NOROOT(1)
Pokitto 5:ea7377f3d1af 192 THUMB
Pokitto 5:ea7377f3d1af 193
Pokitto 5:ea7377f3d1af 194 PIN_INT0_IRQHandler
Pokitto 5:ea7377f3d1af 195 PIN_INT1_IRQHandler
Pokitto 5:ea7377f3d1af 196 PIN_INT2_IRQHandler
Pokitto 5:ea7377f3d1af 197 PIN_INT3_IRQHandler
Pokitto 5:ea7377f3d1af 198 PIN_INT4_IRQHandler
Pokitto 5:ea7377f3d1af 199 PIN_INT5_IRQHandler
Pokitto 5:ea7377f3d1af 200 PIN_INT6_IRQHandler
Pokitto 5:ea7377f3d1af 201 PIN_INT7_IRQHandler
Pokitto 5:ea7377f3d1af 202 GINT0_IRQHandler
Pokitto 5:ea7377f3d1af 203 GINT1_IRQHandler
Pokitto 5:ea7377f3d1af 204 I2C1_IRQHandler
Pokitto 5:ea7377f3d1af 205 USART1_4_IRQHandler
Pokitto 5:ea7377f3d1af 206 USART2_3_IRQHandler
Pokitto 5:ea7377f3d1af 207 SCT0_1_IRQHandler
Pokitto 5:ea7377f3d1af 208 SSP1_IRQHandler
Pokitto 5:ea7377f3d1af 209 I2C0_IRQHandler
Pokitto 5:ea7377f3d1af 210 CT16B0_IRQHandler
Pokitto 5:ea7377f3d1af 211 CT16B1_IRQHandler
Pokitto 5:ea7377f3d1af 212 CT32B0_IRQHandler
Pokitto 5:ea7377f3d1af 213 CT32B1_IRQHandler
Pokitto 5:ea7377f3d1af 214 SSP0_IRQHandler
Pokitto 5:ea7377f3d1af 215 USART0_IRQHandler
Pokitto 5:ea7377f3d1af 216 USB_IRQHandler
Pokitto 5:ea7377f3d1af 217 USB_FIQ_IRQHandler
Pokitto 5:ea7377f3d1af 218 ADC_A_IRQHandler
Pokitto 5:ea7377f3d1af 219 RTC_IRQHandler
Pokitto 5:ea7377f3d1af 220 BOD_WDT_IRQHandler
Pokitto 5:ea7377f3d1af 221 FLASH_IRQHandler
Pokitto 5:ea7377f3d1af 222 DMA_IRQHandler
Pokitto 5:ea7377f3d1af 223 ADC_B_IRQHandler
Pokitto 5:ea7377f3d1af 224 USBWakeup_IRQHandler
Pokitto 5:ea7377f3d1af 225 Default_Handler
Pokitto 5:ea7377f3d1af 226 B Default_Handler
Pokitto 5:ea7377f3d1af 227
Pokitto 5:ea7377f3d1af 228 SECTION .crp:CODE:ROOT(2)
Pokitto 5:ea7377f3d1af 229 DATA
Pokitto 5:ea7377f3d1af 230 /* Code Read Protection
Pokitto 5:ea7377f3d1af 231 NO_ISP 0x4E697370 - Prevents sampling of pin PIO0_1 for entering ISP mode
Pokitto 5:ea7377f3d1af 232 CRP1 0x12345678 - Write to RAM command cannot access RAM below 0x10000300.
Pokitto 5:ea7377f3d1af 233 - Copy RAM to flash command can not write to Sector 0.
Pokitto 5:ea7377f3d1af 234 - Erase command can erase Sector 0 only when all sectors
Pokitto 5:ea7377f3d1af 235 are selected for erase.
Pokitto 5:ea7377f3d1af 236 - Compare command is disabled.
Pokitto 5:ea7377f3d1af 237 - Read Memory command is disabled.
Pokitto 5:ea7377f3d1af 238 CRP2 0x87654321 - Read Memory is disabled.
Pokitto 5:ea7377f3d1af 239 - Write to RAM is disabled.
Pokitto 5:ea7377f3d1af 240 - "Go" command is disabled.
Pokitto 5:ea7377f3d1af 241 - Copy RAM to flash is disabled.
Pokitto 5:ea7377f3d1af 242 - Compare is disabled.
Pokitto 5:ea7377f3d1af 243 CRP3 0x43218765 - Access to chip via the SWD pins is disabled. ISP entry
Pokitto 5:ea7377f3d1af 244 by pulling PIO0_1 LOW is disabled if a valid user code is
Pokitto 5:ea7377f3d1af 245 present in flash sector 0.
Pokitto 5:ea7377f3d1af 246 Caution: If CRP3 is selected, no future factory testing can be
Pokitto 5:ea7377f3d1af 247 performed on the device.
Pokitto 5:ea7377f3d1af 248 */
Pokitto 5:ea7377f3d1af 249 DCD 0xFFFFFFFF
Pokitto 5:ea7377f3d1af 250
Pokitto 5:ea7377f3d1af 251 END