Modified version of the mbed library for use with the Nucleo boards.

Dependents:   EEPROMWrite Full-Project

Fork of mbed-src by mbed official

Committer:
mbed_official
Date:
Mon Sep 28 10:45:10 2015 +0100
Revision:
630:825f75ca301e
Synchronized with git revision 54fbe4144faf309c37205a5d39fa665daa919f10

Full URL: https://github.com/mbedmicro/mbed/commit/54fbe4144faf309c37205a5d39fa665daa919f10/

NUCLEO_F031K6 : Add new target

Who changed what in which revision?

UserRevisionLine numberNew contents of line
mbed_official 630:825f75ca301e 1 ;******************** (C) COPYRIGHT 2015 STMicroelectronics ********************
mbed_official 630:825f75ca301e 2 ;* File Name : startup_stm32f031x6.s
mbed_official 630:825f75ca301e 3 ;* Author : MCD Application Team
mbed_official 630:825f75ca301e 4 ;* Version : V2.2.2
mbed_official 630:825f75ca301e 5 ;* Date : 26-June-2015
mbed_official 630:825f75ca301e 6 ;* Description : STM32F031x4/STM32F031x6 devices vector table for EWARM toolchain.
mbed_official 630:825f75ca301e 7 ;* This module performs:
mbed_official 630:825f75ca301e 8 ;* - Set the initial SP
mbed_official 630:825f75ca301e 9 ;* - Set the initial PC == __iar_program_start,
mbed_official 630:825f75ca301e 10 ;* - Set the vector table entries with the exceptions ISR
mbed_official 630:825f75ca301e 11 ;* address,
mbed_official 630:825f75ca301e 12 ;* - Branches to main in the C library (which eventually
mbed_official 630:825f75ca301e 13 ;* calls main()).
mbed_official 630:825f75ca301e 14 ;* After Reset the Cortex-M0 processor is in Thread mode,
mbed_official 630:825f75ca301e 15 ;* priority is Privileged, and the Stack is set to Main.
mbed_official 630:825f75ca301e 16 ;*******************************************************************************
mbed_official 630:825f75ca301e 17 ;*
mbed_official 630:825f75ca301e 18 ;* <h2><center>&copy; COPYRIGHT(c) 2015 STMicroelectronics</center></h2>
mbed_official 630:825f75ca301e 19 ;*
mbed_official 630:825f75ca301e 20 ;* Redistribution and use in source and binary forms, with or without modification,
mbed_official 630:825f75ca301e 21 ;* are permitted provided that the following conditions are met:
mbed_official 630:825f75ca301e 22 ;* 1. Redistributions of source code must retain the above copyright notice,
mbed_official 630:825f75ca301e 23 ;* this list of conditions and the following disclaimer.
mbed_official 630:825f75ca301e 24 ;* 2. Redistributions in binary form must reproduce the above copyright notice,
mbed_official 630:825f75ca301e 25 ;* this list of conditions and the following disclaimer in the documentation
mbed_official 630:825f75ca301e 26 ;* and/or other materials provided with the distribution.
mbed_official 630:825f75ca301e 27 ;* 3. Neither the name of STMicroelectronics nor the names of its contributors
mbed_official 630:825f75ca301e 28 ;* may be used to endorse or promote products derived from this software
mbed_official 630:825f75ca301e 29 ;* without specific prior written permission.
mbed_official 630:825f75ca301e 30 ;*
mbed_official 630:825f75ca301e 31 ;* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
mbed_official 630:825f75ca301e 32 ;* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
mbed_official 630:825f75ca301e 33 ;* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
mbed_official 630:825f75ca301e 34 ;* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
mbed_official 630:825f75ca301e 35 ;* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
mbed_official 630:825f75ca301e 36 ;* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
mbed_official 630:825f75ca301e 37 ;* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
mbed_official 630:825f75ca301e 38 ;* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
mbed_official 630:825f75ca301e 39 ;* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
mbed_official 630:825f75ca301e 40 ;* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
mbed_official 630:825f75ca301e 41 ;*
mbed_official 630:825f75ca301e 42 ;*******************************************************************************
mbed_official 630:825f75ca301e 43 ;
mbed_official 630:825f75ca301e 44 ;
mbed_official 630:825f75ca301e 45 ; The modules in this file are included in the libraries, and may be replaced
mbed_official 630:825f75ca301e 46 ; by any user-defined modules that define the PUBLIC symbol _program_start or
mbed_official 630:825f75ca301e 47 ; a user defined start symbol.
mbed_official 630:825f75ca301e 48 ; To override the cstartup defined in the library, simply add your modified
mbed_official 630:825f75ca301e 49 ; version to the workbench project.
mbed_official 630:825f75ca301e 50 ;
mbed_official 630:825f75ca301e 51 ; The vector table is normally located at address 0.
mbed_official 630:825f75ca301e 52 ; When debugging in RAM, it can be located in RAM, aligned to at least 2^6.
mbed_official 630:825f75ca301e 53 ; The name "__vector_table" has special meaning for C-SPY:
mbed_official 630:825f75ca301e 54 ; it is where the SP start value is found, and the NVIC vector
mbed_official 630:825f75ca301e 55 ; table register (VTOR) is initialized to this address if != 0.
mbed_official 630:825f75ca301e 56 ;
mbed_official 630:825f75ca301e 57 ; Cortex-M version
mbed_official 630:825f75ca301e 58 ;
mbed_official 630:825f75ca301e 59
mbed_official 630:825f75ca301e 60 MODULE ?cstartup
mbed_official 630:825f75ca301e 61
mbed_official 630:825f75ca301e 62 ;; Forward declaration of sections.
mbed_official 630:825f75ca301e 63 SECTION CSTACK:DATA:NOROOT(3)
mbed_official 630:825f75ca301e 64
mbed_official 630:825f75ca301e 65 SECTION .intvec:CODE:NOROOT(2)
mbed_official 630:825f75ca301e 66
mbed_official 630:825f75ca301e 67 EXTERN __iar_program_start
mbed_official 630:825f75ca301e 68 EXTERN SystemInit
mbed_official 630:825f75ca301e 69 PUBLIC __vector_table
mbed_official 630:825f75ca301e 70
mbed_official 630:825f75ca301e 71 DATA
mbed_official 630:825f75ca301e 72 __vector_table
mbed_official 630:825f75ca301e 73 DCD sfe(CSTACK)
mbed_official 630:825f75ca301e 74 DCD Reset_Handler ; Reset Handler
mbed_official 630:825f75ca301e 75
mbed_official 630:825f75ca301e 76 DCD NMI_Handler ; NMI Handler
mbed_official 630:825f75ca301e 77 DCD HardFault_Handler ; Hard Fault Handler
mbed_official 630:825f75ca301e 78 DCD 0 ; Reserved
mbed_official 630:825f75ca301e 79 DCD 0 ; Reserved
mbed_official 630:825f75ca301e 80 DCD 0 ; Reserved
mbed_official 630:825f75ca301e 81 DCD 0 ; Reserved
mbed_official 630:825f75ca301e 82 DCD 0 ; Reserved
mbed_official 630:825f75ca301e 83 DCD 0 ; Reserved
mbed_official 630:825f75ca301e 84 DCD 0 ; Reserved
mbed_official 630:825f75ca301e 85 DCD SVC_Handler ; SVCall Handler
mbed_official 630:825f75ca301e 86 DCD 0 ; Reserved
mbed_official 630:825f75ca301e 87 DCD 0 ; Reserved
mbed_official 630:825f75ca301e 88 DCD PendSV_Handler ; PendSV Handler
mbed_official 630:825f75ca301e 89 DCD SysTick_Handler ; SysTick Handler
mbed_official 630:825f75ca301e 90
mbed_official 630:825f75ca301e 91 ; External Interrupts
mbed_official 630:825f75ca301e 92 DCD WWDG_IRQHandler ; Window Watchdog
mbed_official 630:825f75ca301e 93 DCD PVD_IRQHandler ; PVD through EXTI Line detect
mbed_official 630:825f75ca301e 94 DCD RTC_IRQHandler ; RTC through EXTI Line
mbed_official 630:825f75ca301e 95 DCD FLASH_IRQHandler ; FLASH
mbed_official 630:825f75ca301e 96 DCD RCC_IRQHandler ; RCC
mbed_official 630:825f75ca301e 97 DCD EXTI0_1_IRQHandler ; EXTI Line 0 and 1
mbed_official 630:825f75ca301e 98 DCD EXTI2_3_IRQHandler ; EXTI Line 2 and 3
mbed_official 630:825f75ca301e 99 DCD EXTI4_15_IRQHandler ; EXTI Line 4 to 15
mbed_official 630:825f75ca301e 100 DCD 0 ; Reserved
mbed_official 630:825f75ca301e 101 DCD DMA1_Channel1_IRQHandler ; DMA1 Channel 1
mbed_official 630:825f75ca301e 102 DCD DMA1_Channel2_3_IRQHandler ; DMA1 Channel 2 and Channel 3
mbed_official 630:825f75ca301e 103 DCD DMA1_Channel4_5_IRQHandler ; DMA1 Channel 4 and Channel 5
mbed_official 630:825f75ca301e 104 DCD ADC1_IRQHandler ; ADC1
mbed_official 630:825f75ca301e 105 DCD TIM1_BRK_UP_TRG_COM_IRQHandler ; TIM1 Break, Update, Trigger and Commutation
mbed_official 630:825f75ca301e 106 DCD TIM1_CC_IRQHandler ; TIM1 Capture Compare
mbed_official 630:825f75ca301e 107 DCD TIM2_IRQHandler ; TIM2
mbed_official 630:825f75ca301e 108 DCD TIM3_IRQHandler ; TIM3
mbed_official 630:825f75ca301e 109 DCD 0 ; Reserved
mbed_official 630:825f75ca301e 110 DCD 0 ; Reserved
mbed_official 630:825f75ca301e 111 DCD TIM14_IRQHandler ; TIM14
mbed_official 630:825f75ca301e 112 DCD 0 ; Reserved
mbed_official 630:825f75ca301e 113 DCD TIM16_IRQHandler ; TIM16
mbed_official 630:825f75ca301e 114 DCD TIM17_IRQHandler ; TIM17
mbed_official 630:825f75ca301e 115 DCD I2C1_IRQHandler ; I2C1
mbed_official 630:825f75ca301e 116 DCD 0 ; Reserved
mbed_official 630:825f75ca301e 117 DCD SPI1_IRQHandler ; SPI1
mbed_official 630:825f75ca301e 118 DCD 0 ; Reserved
mbed_official 630:825f75ca301e 119 DCD USART1_IRQHandler ; USART1
mbed_official 630:825f75ca301e 120
mbed_official 630:825f75ca301e 121 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
mbed_official 630:825f75ca301e 122 ;;
mbed_official 630:825f75ca301e 123 ;; Default interrupt handlers.
mbed_official 630:825f75ca301e 124 ;;
mbed_official 630:825f75ca301e 125 THUMB
mbed_official 630:825f75ca301e 126
mbed_official 630:825f75ca301e 127 PUBWEAK Reset_Handler
mbed_official 630:825f75ca301e 128 SECTION .text:CODE:NOROOT:REORDER(2)
mbed_official 630:825f75ca301e 129 Reset_Handler
mbed_official 630:825f75ca301e 130 LDR R0, =SystemInit
mbed_official 630:825f75ca301e 131 BLX R0
mbed_official 630:825f75ca301e 132 LDR R0, =__iar_program_start
mbed_official 630:825f75ca301e 133 BX R0
mbed_official 630:825f75ca301e 134
mbed_official 630:825f75ca301e 135 PUBWEAK NMI_Handler
mbed_official 630:825f75ca301e 136 SECTION .text:CODE:NOROOT:REORDER(1)
mbed_official 630:825f75ca301e 137 NMI_Handler
mbed_official 630:825f75ca301e 138 B NMI_Handler
mbed_official 630:825f75ca301e 139
mbed_official 630:825f75ca301e 140 PUBWEAK HardFault_Handler
mbed_official 630:825f75ca301e 141 SECTION .text:CODE:NOROOT:REORDER(1)
mbed_official 630:825f75ca301e 142 HardFault_Handler
mbed_official 630:825f75ca301e 143 B HardFault_Handler
mbed_official 630:825f75ca301e 144
mbed_official 630:825f75ca301e 145 PUBWEAK SVC_Handler
mbed_official 630:825f75ca301e 146 SECTION .text:CODE:NOROOT:REORDER(1)
mbed_official 630:825f75ca301e 147 SVC_Handler
mbed_official 630:825f75ca301e 148 B SVC_Handler
mbed_official 630:825f75ca301e 149
mbed_official 630:825f75ca301e 150 PUBWEAK PendSV_Handler
mbed_official 630:825f75ca301e 151 SECTION .text:CODE:NOROOT:REORDER(1)
mbed_official 630:825f75ca301e 152 PendSV_Handler
mbed_official 630:825f75ca301e 153 B PendSV_Handler
mbed_official 630:825f75ca301e 154
mbed_official 630:825f75ca301e 155 PUBWEAK SysTick_Handler
mbed_official 630:825f75ca301e 156 SECTION .text:CODE:NOROOT:REORDER(1)
mbed_official 630:825f75ca301e 157 SysTick_Handler
mbed_official 630:825f75ca301e 158 B SysTick_Handler
mbed_official 630:825f75ca301e 159
mbed_official 630:825f75ca301e 160 PUBWEAK WWDG_IRQHandler
mbed_official 630:825f75ca301e 161 SECTION .text:CODE:NOROOT:REORDER(1)
mbed_official 630:825f75ca301e 162 WWDG_IRQHandler
mbed_official 630:825f75ca301e 163 B WWDG_IRQHandler
mbed_official 630:825f75ca301e 164
mbed_official 630:825f75ca301e 165 PUBWEAK PVD_IRQHandler
mbed_official 630:825f75ca301e 166 SECTION .text:CODE:NOROOT:REORDER(1)
mbed_official 630:825f75ca301e 167 PVD_IRQHandler
mbed_official 630:825f75ca301e 168 B PVD_IRQHandler
mbed_official 630:825f75ca301e 169
mbed_official 630:825f75ca301e 170 PUBWEAK RTC_IRQHandler
mbed_official 630:825f75ca301e 171 SECTION .text:CODE:NOROOT:REORDER(1)
mbed_official 630:825f75ca301e 172 RTC_IRQHandler
mbed_official 630:825f75ca301e 173 B RTC_IRQHandler
mbed_official 630:825f75ca301e 174
mbed_official 630:825f75ca301e 175 PUBWEAK FLASH_IRQHandler
mbed_official 630:825f75ca301e 176 SECTION .text:CODE:NOROOT:REORDER(1)
mbed_official 630:825f75ca301e 177 FLASH_IRQHandler
mbed_official 630:825f75ca301e 178 B FLASH_IRQHandler
mbed_official 630:825f75ca301e 179
mbed_official 630:825f75ca301e 180 PUBWEAK RCC_IRQHandler
mbed_official 630:825f75ca301e 181 SECTION .text:CODE:NOROOT:REORDER(1)
mbed_official 630:825f75ca301e 182 RCC_IRQHandler
mbed_official 630:825f75ca301e 183 B RCC_IRQHandler
mbed_official 630:825f75ca301e 184
mbed_official 630:825f75ca301e 185 PUBWEAK EXTI0_1_IRQHandler
mbed_official 630:825f75ca301e 186 SECTION .text:CODE:NOROOT:REORDER(1)
mbed_official 630:825f75ca301e 187 EXTI0_1_IRQHandler
mbed_official 630:825f75ca301e 188 B EXTI0_1_IRQHandler
mbed_official 630:825f75ca301e 189
mbed_official 630:825f75ca301e 190 PUBWEAK EXTI2_3_IRQHandler
mbed_official 630:825f75ca301e 191 SECTION .text:CODE:NOROOT:REORDER(1)
mbed_official 630:825f75ca301e 192 EXTI2_3_IRQHandler
mbed_official 630:825f75ca301e 193 B EXTI2_3_IRQHandler
mbed_official 630:825f75ca301e 194
mbed_official 630:825f75ca301e 195 PUBWEAK EXTI4_15_IRQHandler
mbed_official 630:825f75ca301e 196 SECTION .text:CODE:NOROOT:REORDER(1)
mbed_official 630:825f75ca301e 197 EXTI4_15_IRQHandler
mbed_official 630:825f75ca301e 198 B EXTI4_15_IRQHandler
mbed_official 630:825f75ca301e 199
mbed_official 630:825f75ca301e 200 PUBWEAK DMA1_Channel1_IRQHandler
mbed_official 630:825f75ca301e 201 SECTION .text:CODE:NOROOT:REORDER(1)
mbed_official 630:825f75ca301e 202 DMA1_Channel1_IRQHandler
mbed_official 630:825f75ca301e 203 B DMA1_Channel1_IRQHandler
mbed_official 630:825f75ca301e 204
mbed_official 630:825f75ca301e 205 PUBWEAK DMA1_Channel2_3_IRQHandler
mbed_official 630:825f75ca301e 206 SECTION .text:CODE:NOROOT:REORDER(1)
mbed_official 630:825f75ca301e 207 DMA1_Channel2_3_IRQHandler
mbed_official 630:825f75ca301e 208 B DMA1_Channel2_3_IRQHandler
mbed_official 630:825f75ca301e 209
mbed_official 630:825f75ca301e 210 PUBWEAK DMA1_Channel4_5_IRQHandler
mbed_official 630:825f75ca301e 211 SECTION .text:CODE:NOROOT:REORDER(1)
mbed_official 630:825f75ca301e 212 DMA1_Channel4_5_IRQHandler
mbed_official 630:825f75ca301e 213 B DMA1_Channel4_5_IRQHandler
mbed_official 630:825f75ca301e 214
mbed_official 630:825f75ca301e 215 PUBWEAK ADC1_IRQHandler
mbed_official 630:825f75ca301e 216 SECTION .text:CODE:NOROOT:REORDER(1)
mbed_official 630:825f75ca301e 217 ADC1_IRQHandler
mbed_official 630:825f75ca301e 218 B ADC1_IRQHandler
mbed_official 630:825f75ca301e 219
mbed_official 630:825f75ca301e 220 PUBWEAK TIM1_BRK_UP_TRG_COM_IRQHandler
mbed_official 630:825f75ca301e 221 SECTION .text:CODE:NOROOT:REORDER(1)
mbed_official 630:825f75ca301e 222 TIM1_BRK_UP_TRG_COM_IRQHandler
mbed_official 630:825f75ca301e 223 B TIM1_BRK_UP_TRG_COM_IRQHandler
mbed_official 630:825f75ca301e 224
mbed_official 630:825f75ca301e 225 PUBWEAK TIM1_CC_IRQHandler
mbed_official 630:825f75ca301e 226 SECTION .text:CODE:NOROOT:REORDER(1)
mbed_official 630:825f75ca301e 227 TIM1_CC_IRQHandler
mbed_official 630:825f75ca301e 228 B TIM1_CC_IRQHandler
mbed_official 630:825f75ca301e 229
mbed_official 630:825f75ca301e 230 PUBWEAK TIM2_IRQHandler
mbed_official 630:825f75ca301e 231 SECTION .text:CODE:NOROOT:REORDER(1)
mbed_official 630:825f75ca301e 232 TIM2_IRQHandler
mbed_official 630:825f75ca301e 233 B TIM2_IRQHandler
mbed_official 630:825f75ca301e 234
mbed_official 630:825f75ca301e 235 PUBWEAK TIM3_IRQHandler
mbed_official 630:825f75ca301e 236 SECTION .text:CODE:NOROOT:REORDER(1)
mbed_official 630:825f75ca301e 237 TIM3_IRQHandler
mbed_official 630:825f75ca301e 238 B TIM3_IRQHandler
mbed_official 630:825f75ca301e 239
mbed_official 630:825f75ca301e 240 PUBWEAK TIM14_IRQHandler
mbed_official 630:825f75ca301e 241 SECTION .text:CODE:NOROOT:REORDER(1)
mbed_official 630:825f75ca301e 242 TIM14_IRQHandler
mbed_official 630:825f75ca301e 243 B TIM14_IRQHandler
mbed_official 630:825f75ca301e 244
mbed_official 630:825f75ca301e 245 PUBWEAK TIM16_IRQHandler
mbed_official 630:825f75ca301e 246 SECTION .text:CODE:NOROOT:REORDER(1)
mbed_official 630:825f75ca301e 247 TIM16_IRQHandler
mbed_official 630:825f75ca301e 248 B TIM16_IRQHandler
mbed_official 630:825f75ca301e 249
mbed_official 630:825f75ca301e 250 PUBWEAK TIM17_IRQHandler
mbed_official 630:825f75ca301e 251 SECTION .text:CODE:NOROOT:REORDER(1)
mbed_official 630:825f75ca301e 252 TIM17_IRQHandler
mbed_official 630:825f75ca301e 253 B TIM17_IRQHandler
mbed_official 630:825f75ca301e 254
mbed_official 630:825f75ca301e 255 PUBWEAK I2C1_IRQHandler
mbed_official 630:825f75ca301e 256 SECTION .text:CODE:NOROOT:REORDER(1)
mbed_official 630:825f75ca301e 257 I2C1_IRQHandler
mbed_official 630:825f75ca301e 258 B I2C1_IRQHandler
mbed_official 630:825f75ca301e 259
mbed_official 630:825f75ca301e 260 PUBWEAK SPI1_IRQHandler
mbed_official 630:825f75ca301e 261 SECTION .text:CODE:NOROOT:REORDER(1)
mbed_official 630:825f75ca301e 262 SPI1_IRQHandler
mbed_official 630:825f75ca301e 263 B SPI1_IRQHandler
mbed_official 630:825f75ca301e 264
mbed_official 630:825f75ca301e 265 PUBWEAK USART1_IRQHandler
mbed_official 630:825f75ca301e 266 SECTION .text:CODE:NOROOT:REORDER(1)
mbed_official 630:825f75ca301e 267 USART1_IRQHandler
mbed_official 630:825f75ca301e 268 B USART1_IRQHandler
mbed_official 630:825f75ca301e 269
mbed_official 630:825f75ca301e 270
mbed_official 630:825f75ca301e 271 END
mbed_official 630:825f75ca301e 272 ;************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE*****