@GNU AS
@.CharSet=CP1251

.syntax unified      @ синтаксис исходного кода
.thumb               @ тип используемых инструкций Thumb
.cpu cortex-m4       @ процессор
.fpu fpv4-sp-d16     @ сопроцессор

.section .vectors

@ таблица векторов прерываний
     .word     _STACK_END             @ 0x0000 Вершина стека
     .word     Start+1                @ 0x0004 RESET


@ Таблица прерываний для ядра микроконтроллеров STM32F40x - F41x

     .word     IRQ_NMI+1               @ 0x0008 NMI
     .word     IRQ_HardFault+1         @ 0x000C Hard Fault
     .word     IRQ_MemFault+1          @ 0x0010 Memory management fault
     .word     IRQ_BusFault+1          @ 0x0014 Bus Fault
     .word     IRQ_UsageFault+1        @ 0x0018 Usage Fault
     .word     0               @ 0x001C Reserved
     .word     0               @ 0x0020 Reserved
     .word     0               @ 0x0024 Reserved
     .word     0               @ 0x0028 Reserved
     .word     IRQ_SVCall+1            @ 0x002C SVCall
     .word     IRQ_DebugMonitor+1      @ 0x0030 Debug Monitor
     .word     0                       @ 0x0034
     .word     IRQ_PendSV+1            @ 0x0038 PendSV
     .word     IRQ_SysTick+1           @ 0x003C SysTick

@ Прерывания периферии микроконтроллера
     .word     IRQ_WWDG+1              @ 0x0040 Window Watchdog interrupt
     .word     IRQ_PVD+1               @ 0x0044 PVD through EXTI line 16 detection interrupt
     .word     IRQ_TAMP_STAMP+1        @ 0x0048 Tamper and TimeStamp interrupts through the EXTI line 21
     .word     IRQ_RTC_WKUP+1          @ 0x004C RTC Wakeup interrupt through the EXTI line 22
     .word     IRQ_FLASH+1             @ 0x0050 Flash global interrupt
     .word     IRQ_RCC+1               @ 0x0054 RCC global interrupt
     .word     IRQ_EXTI0+1             @ 0x0058 EXTI Line0 interrupt
     .word     IRQ_EXTI1+1             @ 0x005C EXTI Line1 interrupt
     .word     IRQ_EXTI2+1             @ 0x0060 EXTI Line2 interrupt
     .word     IRQ_EXTI3+1             @ 0x0064 EXTI Line3 interrupt
     .word     IRQ_EXTI4+1             @ 0x0068 EXTI Line4 interrupt
     .word     DMA1_Stream0+1          @ 0x006C DMA1 Stream0 global interrupt
     .word     DMA1_Stream1+1          @ 0x0070 DMA1 Stream1 global interrupt
     .word     DMA1_Stream2+1          @ 0x0074 DMA1 Stream2 global interrupt
     .word     DMA1_Stream3+1          @ 0x0078 DMA1 Stream3 global interrupt
     .word     DMA1_Stream4+1          @ 0x007C DMA1 Stream4 global interrupt
     .word     DMA1_Stream5+1          @ 0x0080 DMA1 Stream5 global interrupt
     .word     DMA1_Stream6+1          @ 0x0084 DMA1 Stream6 global interrupt
     .word     IRQ_ADC+1               @ 0x0088 ADC1, ADC2 and ADC3 global interrupts
     .word     0                 @ 0x008C
     .word     0                 @ 0x0090
     .word     0                 @ 0x0094
     .word     0                 @ 0x0098
     .word     IRQ_EXTI9_5+1           @ 0x009C EXTI Line[9:5] interrupts
     .word     IRQ_TIM1_BRK_TIM9+1     @ 0x00A0 TIM1 Break interrupt and TIM9 global interrupt
     .word     IRQ_TIM1_UP_TIM10+1      @ 0x00A4 TIM1 Update interrupt and TIM10 global interrupt
     .word     IRQ_TIM1_TRG_COM_TIM11+1 @ 0x00A8 TIM1 Trigger and Commutation interrupts and TIM11 global interrupt
     .word     IRQ_TIM1_CC+1            @ 0x00AC TIM1 Capture Compare interrupt
     .word     IRQ_TIM2+1              @ 0x00B0 TIM2 global interrupt
     .word     IRQ_TIM3+1              @ 0x00B4 TIM3 global interrupt
     .word     IRQ_TIM4+1              @ 0x00B8 TIM4 global interrupt
     .word     IRQ_I2C1_EV+1           @ 0x00BC I2C1 event interrupt
     .word     IRQ_I2C1_ER+1           @ 0x00C0 I2C1 error interrupt
     .word     IRQ_I2C2_EV+1           @ 0x00C4 I2C2 event interrupt
     .word     IRQ_I2C2_ER+1           @ 0x00C8 I2C2 error interrupt
     .word     IRQ_SPI1+1              @ 0x00CC SPI1 global interrupt
     .word     IRQ_SPI2+1              @ 0x00D0 SPI2 global interrupt
     .word     IRQ_USART1+1            @ 0x00D4 USART1 global interrupt
     .word     IRQ_USART2+1            @ 0x00D8 USART2 global interrupt
     .word     0            @ 0x00DC
     .word     IRQ_EXTI15_10+1         @ 0x00E0 EXTI Line[15:10] interrupts
     .word     IRQ_RTC_Alarm+1         @ 0x00E4 RTC Alarms (A and B) through EXTI line 17 interrupt
     .word     IRQ_OTG_FS_WKUP+1       @ 0x00E8 USB On-The-Go FS Wakeup through EXTI line interrupt
     .word     0            @ 0x00EC
     .word     0            @ 0x00F0
     .word     0            @ 0x00F4
     .word     0            @ 0x00F8
     .word     IRQ_DMA1_Stream7+1      @ 0x00FC DMA1 Stream7 global interrupt
     .word     0            @ 0x0100
     .word     IRQ_SDIO+1              @ 0x0104 SDIO global interrupt
     .word     IRQ_TIM5+1              @ 0x0108 TIM5 global interrupt
     .word     IRQ_SPI3+1              @ 0x010C SPI3 global interrupt
     .word     0            @ 0x0110
     .word     0            @ 0x0114
     .word     0            @ 0x0118
     .word     0            @ 0x011C
     .word     IRQ_DMA2_Stream0+1     @ 0x0120 DMA2 Stream0 global interrupt
     .word     IRQ_DMA2_Stream1+1     @ 0x0124 DMA2 Stream1 global interrupt
     .word     IRQ_DMA2_Stream2+1     @ 0x0128 DMA2 Stream2 global interrupt
     .word     IRQ_DMA2_Stream3+1     @ 0x012C DMA2 Stream3 global interrupt
     .word     IRQ_DMA2_Stream4+1     @ 0x0130 DMA2 Stream4 global interrupt
     .word     0            @ 0x0134
     .word     0            @ 0x0138
     .word     0            @ 0x013C
     .word     0            @ 0x0140
     .word     0            @ 0x0144
     .word     0            @ 0x0148
     .word     IRQ_OTG_FS+1           @ 0x014C USB On The Go FS global interrupt
     .word     IRQ_DMA2_Stream5+1     @ 0x0150 DMA2 Stream5 global interrupt
     .word     IRQ_DMA2_Stream6+1     @ 0x0154 DMA2 Stream6 global interrupt
     .word     IRQ_DMA2_Stream7+1     @ 0x0158 DMA2 Stream7 global interrupt
     .word     IRQ_USART6+1           @ 0x015C USART6 global interrupt
     .word     IRQ_I2C3_EV+1          @ 0x0160 I2C3 event interrupt
     .word     IRQ_I2C3_ER+1          @ 0x0164 I2C3 error interrupt
     .word     0            @ 0x0168
     .word     0            @ 0x016C
     .word     0            @ 0x0170
     .word     0            @ 0x0174
     .word     0            @ 0x0178
     .word     0            @ 0x017C
     .word     0            @ 0x0180
     .word     IRQ_FPU+1              @ 0x0184 FPU global interrupt
     .word     0            @ 0x0188
     .word     0            @ 0x018C
     .word     IRQ_SPI4+1             @ 0x0190 SPI 4 Global interrupt

@ Заглушки для любых необрабатываемых прерываний

@ Прерывания ядра микроконтроллера

.weak IRQ_NMI
IRQ_NMI:

.weak IRQ_HardFault
IRQ_HardFault:

.weak IRQ_MemFault
IRQ_MemFault:

.weak IRQ_BusFault
IRQ_BusFault:

.weak IRQ_UsageFault
IRQ_UsageFault:

.weak IRQ_SVCall
IRQ_SVCall:

.weak IRQ_DebugMonitor
IRQ_DebugMonitor:

.weak IRQ_PendSV
IRQ_PendSV:

.weak IRQ_SysTick
IRQ_SysTick:

@ прерывания периферии микроконтроллера

.weak IRQ_WWDG
IRQ_WWDG:

.weak IRQ_PVD
IRQ_PVD:

.weak IRQ_TAMP_STAMP
IRQ_TAMP_STAMP:

.weak IRQ_RTC_WKUP
IRQ_RTC_WKUP:

.weak IRQ_FLASH
IRQ_FLASH:

.weak IRQ_RCC
IRQ_RCC:

.weak IRQ_EXTI0
IRQ_EXTI0:

.weak IRQ_EXTI1
IRQ_EXTI1:

.weak IRQ_EXTI2
IRQ_EXTI2:

.weak IRQ_EXTI3
IRQ_EXTI3:

.weak IRQ_EXTI4
IRQ_EXTI4:

.weak DMA1_Stream0
DMA1_Stream0:

.weak DMA1_Stream1
DMA1_Stream1:

.weak DMA1_Stream2
DMA1_Stream2:

.weak DMA1_Stream3
DMA1_Stream3:

.weak DMA1_Stream4
DMA1_Stream4:

.weak DMA1_Stream5
DMA1_Stream5:

.weak DMA1_Stream6
DMA1_Stream6:

.weak IRQ_ADC
IRQ_ADC:

.weak IRQ_EXTI9_5
IRQ_EXTI9_5:

.weak IRQ_TIM1_BRK_TIM9
IRQ_TIM1_BRK_TIM9:

.weak IRQ_TIM1_UP_TIM10
IRQ_TIM1_UP_TIM10:

.weak IRQ_TIM1_TRG_COM_TIM11
IRQ_TIM1_TRG_COM_TIM11:

.weak IRQ_TIM1_CC
IRQ_TIM1_CC:

.weak IRQ_TIM2
IRQ_TIM2:

.weak IRQ_TIM3
IRQ_TIM3:

.weak IRQ_TIM4
IRQ_TIM4:

.weak IRQ_I2C1_EV
IRQ_I2C1_EV:

.weak IRQ_I2C1_ER
IRQ_I2C1_ER:

.weak IRQ_I2C2_EV
IRQ_I2C2_EV:

.weak IRQ_I2C2_ER
IRQ_I2C2_ER:

.weak IRQ_SPI1
IRQ_SPI1:

.weak IRQ_SPI2
IRQ_SPI2:

.weak IRQ_USART1
IRQ_USART1:

.weak IRQ_USART2
IRQ_USART2:

.weak IRQ_EXTI15_10
IRQ_EXTI15_10:

.weak IRQ_RTC_Alarm
IRQ_RTC_Alarm:

.weak IRQ_OTG_FS_WKUP
IRQ_OTG_FS_WKUP:

.weak IRQ_DMA1_Stream7
IRQ_DMA1_Stream7:

.weak IRQ_SDIO
IRQ_SDIO:

.weak IRQ_TIM5
IRQ_TIM5:

.weak IRQ_SPI3
IRQ_SPI3:

.weak IRQ_DMA2_Stream0
IRQ_DMA2_Stream0:

.weak IRQ_DMA2_Stream1
IRQ_DMA2_Stream1:

.weak IRQ_DMA2_Stream2
IRQ_DMA2_Stream2:

.weak IRQ_DMA2_Stream3
IRQ_DMA2_Stream3:

.weak IRQ_DMA2_Stream4
IRQ_DMA2_Stream4:

.weak IRQ_OTG_FS
IRQ_OTG_FS:

.weak IRQ_DMA2_Stream5
IRQ_DMA2_Stream5:

.weak IRQ_DMA2_Stream6
IRQ_DMA2_Stream6:

.weak IRQ_DMA2_Stream7
IRQ_DMA2_Stream7:

.weak IRQ_USART6
IRQ_USART6:

.weak IRQ_I2C3_EV
IRQ_I2C3_EV:

.weak IRQ_I2C3_ER
IRQ_I2C3_ER:

.weak IRQ_FPU
IRQ_FPU:

.weak IRQ_SPI4
IRQ_SPI4:

int_vect_terminator:
          B     int_vect_terminator
