<commit_before>/**
 * \file
 * \brief STM32F1 chip vector table and default weak handlers
 *
 * \author Copyright (C) 2016-2017 <NAME> http://www.distortec.com http://www.freddiechopin.info
 *
 * \par License
 * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not
 * distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
 */

#include "distortos/distortosConfiguration.h"

#include <cstddef>

/*---------------------------------------------------------------------------------------------------------------------+
| vectors' configuration
+---------------------------------------------------------------------------------------------------------------------*/

#if defined(CONFIG_CHIP_STM32F100)
	#define STM32F100_VECTORS
#elif defined(CONFIG_CHIP_STM32F105) || defined(CONFIG_CHIP_STM32F107)
	#define STM32F1_CONNECTIVITY_LINE_VECTORS
#elif defined(CONFIG_CHIP_STM32F101RF) || defined(CONFIG_CHIP_STM32F101VF) || defined(CONFIG_CHIP_STM32F101ZF) || \
		defined(CONFIG_CHIP_STM32F103RF) || defined(CONFIG_CHIP_STM32F103VF) || defined(CONFIG_CHIP_STM32F103ZF) || \
		defined(CONFIG_CHIP_STM32F101RG) || defined(CONFIG_CHIP_STM32F101VG) || defined(CONFIG_CHIP_STM32F101ZG) || \
		defined(CONFIG_CHIP_STM32F103RG) || defined(CONFIG_CHIP_STM32F103VG) || defined(CONFIG_CHIP_STM32F103ZG)
	#define STM32F1_XL_DENSITY_VECTORS
#else
	#define STM32F1_STANDARD_VECTORS
#endif

extern "C"
{

/*---------------------------------------------------------------------------------------------------------------------+
| default weak handlers
+---------------------------------------------------------------------------------------------------------------------*/

// 0x040, 0: Window watchdog
__attribute__ ((weak)) void WWDG_IRQHandler()
{
	while (1);
}

// 0x044, 1: PVD through EXTI Line detection
__attribute__ ((weak)) void PVD_IRQHandler()
{
	while (1);
}

// 0x048, 2: Tamper and TimeStamp through the EXTI line
__attribute__ ((weak)) void TAMP_STAMP_IRQHandler()
{
	while (1);
}

// 0x04c, 3: RTC Wakeup through the EXTI line
__attribute__ ((weak)) void RTC_WKUP_IRQHandler()
{
	while (1);
}

// 0x050, 4: Flash
__attribute__ ((weak)) void FLASH_IRQHandler()
{
	while (1);
}

// 0x054, 5: RCC
__attribute__ ((weak)) void RCC_IRQHandler()
{
	while (1);
}

// 0x058, 6: EXTI Line0
__attribute__ ((weak)) void EXTI0_IRQHandler()
{
	while (1);
}

// 0x05c, 7: EXTI Line1
__attribute__ ((weak)) void EXTI1_IRQHandler()
{
	while (1);
}

// 0x060, 8: EXTI Line2
__attribute__ ((weak)) void EXTI2_IRQHandler()
{
	while (1);
}

// 0x064, 9: EXTI Line3
__attribute__ ((weak)) void EXTI3_IRQHandler()
{
	while (1);
}

// 0x068, 10: EXTI Line4
__attribute__ ((weak)) void EXTI4_IRQHandler()
{
	while (1);
}

// 0x06c, 11: DMA1 Channel1
__attribute__ ((weak)) void DMA1_Channel1_IRQHandler()
{
	while (1);
}

// 0x070, 12: DMA1 Channel2
__attribute__ ((weak)) void DMA1_Channel2_IRQHandler()
{
	while (1);
}

// 0x074, 13: DMA1 Channel3
__attribute__ ((weak)) void DMA1_Channel3_IRQHandler()
{
	while (1);
}

// 0x078, 14: DMA1 Channel4
__attribute__ ((weak)) void DMA1_Channel4_IRQHandler()
{
	while (1);
}

// 0x07c, 15: DMA1 Channel5
__attribute__ ((weak)) void DMA1_Channel5_IRQHandler()
{
	while (1);
}

// 0x080, 16: DMA1 Channel6
__attribute__ ((weak)) void DMA1_Channel6_IRQHandler()
{
	while (1);
}

// 0x084, 17: DMA1 Channel7
__attribute__ ((weak)) void DMA1_Channel7_IRQHandler()
{
	while (1);
}

#if defined(STM32F100_VECTORS)

// 0x088, 18: ADC1
__attribute__ ((weak)) void ADC1_IRQHandler()
{
	while (1);
}

#else	// !defined(STM32F100_VECTORS)

// 0x088, 18: ADC1 and ADC2
__attribute__ ((weak)) void ADC1_2_IRQHandler()
{
	while (1);
}

#endif	// !defined(STM32F100_VECTORS)

#if defined(STM32F100_VECTORS)

// 0x08c, 19: Reserved
__attribute__ ((weak)) void Reserved_0x8c_Handler()
{
	while (1);
}

// 0x090, 20: Reserved
__attribute__ ((weak)) void Reserved_0x90_Handler()
{
	while (1);
}

// 0x094, 21: Reserved
__attribute__ ((weak)) void Reserved_0x94_Handler()
{
	while (1);
}

// 0x098, 22: Reserved
__attribute__ ((weak)) void Reserved_0x98_Handler()
{
	while (1);
}

#elif defined(STM32F1_CONNECTIVITY_LINE_VECTORS)

// 0x08c, 19: CAN1 TX
__attribute__ ((weak)) void CAN1_TX_IRQHandler()
{
	while (1);
}

// 0x090, 20: CAN1 RX0
__attribute__ ((weak)) void CAN1_RX0_IRQHandler()
{
	while (1);
}

// 0x094, 21: CAN1 RX1
__attribute__ ((weak)) void CAN1_RX1_IRQHandler()
{
	while (1);
}

// 0x098, 22: CAN1 SCE
__attribute__ ((weak)) void CAN1_SCE_IRQHandler()
{
	while (1);
}

#else	// !defined(STM32F100_VECTORS) && !defined(STM32F1_CONNECTIVITY_LINE_VECTORS)

// 0x08c, 19: USB High Priority or CAN1 TX
__attribute__ ((weak)) void USB_HP_CAN1_TX_IRQHandler()
{
	while (1);
}

// 0x090, 20: USB Low Priority or CAN1 RX0
__attribute__ ((weak)) void USB_LP_CAN1_RX0_IRQHandler()
{
	while (1);
}

// 0x094, 21: CAN1 RX1
__attribute__ ((weak)) void CAN1_RX1_IRQHandler()
{
	while (1);
}

// 0x098, 22: CAN1 SCE
__attribute__ ((weak)) void CAN1_SCE_IRQHandler()
{
	while (1);
}

#endif	// !defined(STM32F100_VECTORS) && !defined(STM32F1_CONNECTIVITY_LINE_VECTORS)

// 0x09c, 23: EXTI Line[9:5]
__attribute__ ((weak)) void EXTI9_5_IRQHandler()
{
	while (1);
}

#if defined(STM32F100_VECTORS)

// 0x0a0, 24: TIM1 Break and TIM15
__attribute__ ((weak)) void TIM1_BRK_TIM15_IRQHandler()
{
	while (1);
}

// 0x0a4, 25: TIM1 Update and TIM16
__attribute__ ((weak)) void TIM1_UP_TIM16_IRQHandler()
{
	while (1);
}

// 0x0a8, 26: TIM1 Trigger and Commutation and TIM17
__attribute__ ((weak)) void TIM1_TRG_COM_TIM17_IRQHandler()
{
	while (1);
}

#elif defined(STM32F1_XL_DENSITY_VECTORS)

// 0x0a0, 24: TIM1 Break and TIM9
__attribute__ ((weak)) void TIM1_BRK_TIM9_IRQHandler()
{
	while (1);
}

// 0x0a4, 25: TIM1 Update and TIM10
__attribute__ ((weak)) void TIM1_UP_TIM10_IRQHandler()
{
	while (1);
}

// 0x0a8, 26: TIM1 Trigger and Commutation and TIM11
__attribute__ ((weak)) void TIM1_TRG_COM_TIM11_IRQHandler()
{
	while (1);
}

#else	// !defined(STM32F100_VECTORS) && !defined(STM32F1_XL_DENSITY_VECTORS)

// 0x0a0, 24: TIM1 Break
__attribute__ ((weak)) void TIM1_BRK_IRQHandler()
{
	while (1);
}

// 0x0a4, 25: TIM1 Update
__attribute__ ((weak)) void TIM1_UP_IRQHandler()
{
	while (1);
}

// 0x0a8, 26: TIM1 Trigger and Commutation
__attribute__ ((weak)) void TIM1_TRG_COM_IRQHandler()
{
	while (1);
}

#endif	// !defined(STM32F100_VECTORS) && !defined(STM32F1_XL_DENSITY_VECTORS)

// 0x0ac, 27: TIM1 Capture Compare
__attribute__ ((weak)) void TIM1_CC_IRQHandler()
{
	while (1);
}

// 0x0b0, 28: TIM2
__attribute__ ((weak)) void TIM2_IRQHandler()
{
	while (1);
}

// 0x0b4, 29: TIM3
__attribute__ ((weak)) void TIM3_IRQHandler()
{
	while (1);
}

// 0x0b8, 30: TIM4
__attribute__ ((weak)) void TIM4_IRQHandler()
{
	while (1);
}

// 0x0bc, 31: I2C1 event
__attribute__ ((weak)) void I2C1_EV_IRQHandler()
{
	while (1);
}

// 0x0c0, 32: I2C1 error
__attribute__ ((weak)) void I2C1_ER_IRQHandler()
{
	while (1);
}

// 0x0c4, 33: I2C2 event
__attribute__ ((weak)) void I2C2_EV_IRQHandler()
{
	while (1);
}

// 0x0c8, 34: I2C2 error
__attribute__ ((weak)) void I2C2_ER_IRQHandler()
{
	while (1);
}

// 0x0cc, 35: SPI1
__attribute__ ((weak)) void SPI1_IRQHandler()
{
	while (1);
}

// 0x0d0, 36: SPI2
__attribute__ ((weak)) void SPI2_IRQHandler()
{
	while (1);
}

// 0x0d4, 37: USART1
__attribute__ ((weak)) void USART1_IRQHandler()
{
	while (1);
}

// 0x0d8, 38: USART2
__attribute__ ((weak)) void USART2_IRQHandler()
{
	while (1);
}

// 0x0dc, 39: USART3
__attribute__ ((weak)) void USART3_IRQHandler()
{
	while (1);
}

// 0x0e0, 40: EXTI Line[15:10]
__attribute__ ((weak)) void EXTI15_10_IRQHandler()
{
	while (1);
}

// 0x0e4, 41: RTC Alarm (A and B) through EXTI line
__attribute__ ((weak)) void RTC_Alarm_IRQHandler()
{
	while (1);
}

#if defined(STM32F100_VECTORS)

// 0x0e8, 42: CEC
__attribute__ ((weak)) void CEC_IRQHandler()
{
	while (1);
}

#elif defined(STM32F1_CONNECTIVITY_LINE_VECTORS)

// 0x0e8, 42: USB On-The-Go FS Wakeup through EXTI line
__attribute__ ((weak)) void OTG_FS_WKUP_IRQHandler()
{
	while (1);
}

#else	// !defined(STM32F100_VECTORS) && !defined(STM32F1_CONNECTIVITY_LINE_VECTORS)

// 0x0e8, 42: USB wakeup from suspend through EXTI line
__attribute__ ((weak)) void USB_WKUP_IRQHandler()
{
	while (1);
}

#endif	// !defined(STM32F100_VECTORS) && !defined(STM32F1_CONNECTIVITY_LINE_VECTORS)

#if defined(STM32F100_VECTORS)

// 0x0ec, 43: TIM12
__attribute__ ((weak)) void TIM12_IRQHandler()
{
	while (1);
}

// 0x0f0, 44: TIM13
__attribute__ ((weak)) void TIM13_IRQHandler()
{
	while (1);
}

// 0x0f4, 45: TIM14
__attribute__ ((weak)) void TIM14_IRQHandler()
{
	while (1);
}

#elif defined(STM32F1_CONNECTIVITY_LINE_VECTORS)

// 0x0ec, 43: Reserved
__attribute__ ((weak)) void Reserved_0xec_Handler()
{
	while (1);
}

// 0x0f0, 44: Reserved
__attribute__ ((weak)) void Reserved_0xf0_Handler()
{
	while (1);
}

// 0x0f4, 45: Reserved
__attribute__ ((weak)) void Reserved_0xf4_Handler()
{
	while (1);
}

#elif defined(STM32F1_XL_DENSITY_VECTORS)

// 0x0ec, 43: TIM8 Break and TIM12
__attribute__ ((weak)) void TIM8_BRK_TIM12_IRQHandler()
{
	while (1);
}

// 0x0f0, 44: TIM8 Update and TIM13
__attribute__ ((weak)) void TIM8_UP_TIM13_IRQHandler()
{
	while (1);
}

// 0x0f4, 45: TIM8 Trigger and Commutation and TIM14
__attribute__ ((weak)) void TIM8_TRG_COM_TIM14_IRQHandler()
{
	while (1);
}

#else	// !defined(STM32F100_VECTORS) && !defined(STM32F1_CONNECTIVITY_LINE_VECTORS) &&
// !defined(STM32F1_XL_DENSITY_VECTORS)

// 0x0ec, 43: TIM8 Break
__attribute__ ((weak)) void TIM8_BRK_IRQHandler()
{
	while (1);
}

// 0x0f0, 44: TIM8 Update
__attribute__ ((weak)) void TIM8_UP_IRQHandler()
{
	while (1);
}

// 0x0f4, 45: TIM8 Trigger and Commutation
__attribute__ ((weak)) void TIM8_TRG_COM_IRQHandler()
{
	while (1);
}

#endif	// !defined(STM32F100_VECTORS) && !defined(STM32F1_CONNECTIVITY_LINE_VECTORS) &&
// !defined(STM32F1_XL_DENSITY_VECTORS)

#if defined(STM32F100_VECTORS) || defined(STM32F1_CONNECTIVITY_LINE_VECTORS)

// 0x0f8, 46: Reserved
__attribute__ ((weak)) void Reserved_0xf8_Handler()
{
	while (1);
}

// 0x0fc, 47: Reserved
__attribute__ ((weak)) void Reserved_0xfc_Handler()
{
	while (1);
}

#else	// !defined(STM32F100_VECTORS) && !defined(STM32F1_CONNECTIVITY_LINE_VECTORS)

// 0x0f8, 46: TIM8 Capture Compare
__attribute__ ((weak)) void TIM8_CC_IRQHandler()
{
	while (1);
}

// 0x0fc, 47: ADC3
__attribute__ ((weak)) void ADC3_IRQHandler()
{
	while (1);
}

#endif	// !defined(STM32F100_VECTORS) && !defined(STM32F1_CONNECTIVITY_LINE_VECTORS)

#if defined(STM32F1_CONNECTIVITY_LINE_VECTORS)

// 0x100, 48: Reserved
__attribute__ ((weak)) void Reserved_0x100_Handler()
{
	while (1);
}

#else	// !defined(STM32F1_CONNECTIVITY_LINE_VECTORS)

// 0x100, 48: FSMC
__attribute__ ((weak)) void FSMC_IRQHandler()
{
	while (1);
}

#endif	// !defined(STM32F1_CONNECTIVITY_LINE_VECTORS)

#if defined(STM32F100_VECTORS) || defined(STM32F1_CONNECTIVITY_LINE_VECTORS)

// 0x104, 49: Reserved
__attribute__ ((weak)) void Reserved_0x104_Handler()
{
	while (1);
}

#else	// !defined(STM32F100_VECTORS) && !defined(STM32F1_CONNECTIVITY_LINE_VECTORS)

// 0x104, 49: SDIO
__attribute__ ((weak)) void SDIO_IRQHandler()
{
	while (1);
}

#endif	// !defined(STM32F100_VECTORS) && !defined(STM32F1_CONNECTIVITY_LINE_VECTORS)

// 0x108, 50: TIM5
__attribute__ ((weak)) void TIM5_IRQHandler()
{
	while (1);
}

// 0x10c, 51: SPI3
__attribute__ ((weak)) void SPI3_IRQHandler()
{
	while (1);
}

// 0x110, 52: UART4
__attribute__ ((weak)) void UART4_IRQHandler()
{
	while (1);
}

// 0x114, 53: UART5
__attribute__ ((weak)) void UART5_IRQHandler()
{
	while (1);
}

#if defined(STM32F100_VECTORS)

// 0x118, 54: TIM6 and DAC underrun
__attribute__ ((weak)) void TIM6_DAC_IRQHandler()
{
	while (1);
}

#else	// !defined(STM32F100_VECTORS)

// 0x118, 54: TIM6
__attribute__ ((weak)) void TIM6_IRQHandler()
{
	while (1);
}

#endif	// !defined(STM32F100_VECTORS)

// 0x11c, 55: TIM7
__attribute__ ((weak)) void TIM7_IRQHandler()
{
	while (1);
}

// 0x120, 56: DMA2 Channel1
__attribute__ ((weak)) void DMA2_Channel1_IRQHandler()
{
	while (1);
}

// 0x124, 57: DMA2 Channel2
__attribute__ ((weak)) void DMA2_Channel2_IRQHandler()
{
	while (1);
}

// 0x128, 58: DMA2 Channel3
__attribute__ ((weak)) void DMA2_Channel3_IRQHandler()
{
	while (1);
}

#if defined(STM32F1_CONNECTIVITY_LINE_VECTORS)

// 0x12c, 59: DMA2 Channel4
__attribute__ ((weak)) void DMA2_Channel4_IRQHandler()
{
	while (1);
}

#else	// !defined(STM32F1_CONNECTIVITY_LINE_VECTORS)

// 0x12c, 59: DMA2 Channel4 and DMA2 Channel5
__attribute__ ((weak)) void DMA2_Channel4_5_IRQHandler()
{
	while (1);
}

#endif	// !defined(STM32F1_CONNECTIVITY_LINE_VECTORS)

#if defined(STM32F100_VECTORS) || defined(STM32F1_CONNECTIVITY_LINE_VECTORS)

// 0x130, 60: DMA2 Channel5
__attribute__ ((weak)) void DMA2_Channel5_IRQHandler()
{
	while (1);
}

#endif	// defined(STM32F100_VECTORS) || defined(STM32F1_CONNECTIVITY_LINE_VECTORS)

#if defined(STM32F1_CONNECTIVITY_LINE_VECTORS)

// 0x134, 61: Ethernet
__attribute__ ((weak)) void ETH_IRQHandler()
{
	while (1);
}

// 0x138, 62: Ethernet Wakeup through EXTI line
__attribute__ ((weak)) void ETH_WKUP_IRQHandler()
{
	while (1);
}

// 0x13c, 63: CAN2 TX
__attribute__ ((weak)) void CAN2_TX_IRQHandler()
{
	while (1);
}

// 0x140, 64: CAN2 RX0
__attribute__ ((weak)) void CAN2_RX0_IRQHandler()
{
	while (1);
}

// 0x144, 65: CAN2 RX1
__attribute__ ((weak)) void CAN2_RX1_IRQHandler()
{
	while (1);
}

// 0x148, 66: CAN2 SCE
__attribute__ ((weak)) void CAN2_SCE_IRQHandler()
{
	while (1);
}

// 0x14c, 67: USB On The Go FS
__attribute__ ((weak)) void OTG_FS_IRQHandler()
{
	while (1);
}

#endif	// defined(STM32F1_CONNECTIVITY_LINE_VECTORS)

}	// extern "C"

/*---------------------------------------------------------------------------------------------------------------------+
| local types
+---------------------------------------------------------------------------------------------------------------------*/

/// single interrupt vector - pointer to function with no arguments and no return value
using InterruptVector = void(*)();

/*---------------------------------------------------------------------------------------------------------------------+
| global variables
+---------------------------------------------------------------------------------------------------------------------*/

/// chip vector table
extern "C" const InterruptVector chipVectors[] __attribute__ ((section(".chipVectors")))
{
		WWDG_IRQHandler,					// 0x040, 0: Window watchdog
		PVD_IRQHandler,						// 0x044, 1: PVD through EXTI Line detection
		TAMP_STAMP_IRQHandler,				// 0x048, 2: Tamper and TimeStamp through the EXTI line
		RTC_WKUP_IRQHandler,				// 0x04c, 3: RTC Wakeup through the EXTI line
		FLASH_IRQHandler,					// 0x050, 4: Flash
		RCC_IRQHandler,						// 0x054, 5: RCC
		EXTI0_IRQHandler,					// 0x058, 6: EXTI Line0<commit_msg>Force linking of STM32F1's chipVectors[]<commit_after>/**
 * \file
 * \brief STM32F1 chip vector table and default weak handlers
 *
 * \author Copyright (C) 2016-2017 <NAME> http://www.distortec.com http://www.freddiechopin.info
 *
 * \par License
 * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not
 * distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
 */

#include "distortos/distortosConfiguration.h"

#include <cstddef>

/*---------------------------------------------------------------------------------------------------------------------+
| vectors' configuration
+---------------------------------------------------------------------------------------------------------------------*/

#if defined(CONFIG_CHIP_STM32F100)
	#define STM32F100_VECTORS
#elif defined(CONFIG_CHIP_STM32F105) || defined(CONFIG_CHIP_STM32F107)
	#define STM32F1_CONNECTIVITY_LINE_VECTORS
#elif defined(CONFIG_CHIP_STM32F101RF) || defined(CONFIG_CHIP_STM32F101VF) || defined(CONFIG_CHIP_STM32F101ZF) || \
		defined(CONFIG_CHIP_STM32F103RF) || defined(CONFIG_CHIP_STM32F103VF) || defined(CONFIG_CHIP_STM32F103ZF) || \
		defined(CONFIG_CHIP_STM32F101RG) || defined(CONFIG_CHIP_STM32F101VG) || defined(CONFIG_CHIP_STM32F101ZG) || \
		defined(CONFIG_CHIP_STM32F103RG) || defined(CONFIG_CHIP_STM32F103VG) || defined(CONFIG_CHIP_STM32F103ZG)
	#define STM32F1_XL_DENSITY_VECTORS
#else
	#define STM32F1_STANDARD_VECTORS
#endif

extern "C"
{

/*---------------------------------------------------------------------------------------------------------------------+
| default weak handlers
+---------------------------------------------------------------------------------------------------------------------*/

// 0x040, 0: Window watchdog
__attribute__ ((weak)) void WWDG_IRQHandler()
{
	while (1);
}

// 0x044, 1: PVD through EXTI Line detection
__attribute__ ((weak)) void PVD_IRQHandler()
{
	while (1);
}

// 0x048, 2: Tamper and TimeStamp through the EXTI line
__attribute__ ((weak)) void TAMP_STAMP_IRQHandler()
{
	while (1);
}

// 0x04c, 3: RTC Wakeup through the EXTI line
__attribute__ ((weak)) void RTC_WKUP_IRQHandler()
{
	while (1);
}

// 0x050, 4: Flash
__attribute__ ((weak)) void FLASH_IRQHandler()
{
	while (1);
}

// 0x054, 5: RCC
__attribute__ ((weak)) void RCC_IRQHandler()
{
	while (1);
}

// 0x058, 6: EXTI Line0
__attribute__ ((weak)) void EXTI0_IRQHandler()
{
	while (1);
}

// 0x05c, 7: EXTI Line1
__attribute__ ((weak)) void EXTI1_IRQHandler()
{
	while (1);
}

// 0x060, 8: EXTI Line2
__attribute__ ((weak)) void EXTI2_IRQHandler()
{
	while (1);
}

// 0x064, 9: EXTI Line3
__attribute__ ((weak)) void EXTI3_IRQHandler()
{
	while (1);
}

// 0x068, 10: EXTI Line4
__attribute__ ((weak)) void EXTI4_IRQHandler()
{
	while (1);
}

// 0x06c, 11: DMA1 Channel1
__attribute__ ((weak)) void DMA1_Channel1_IRQHandler()
{
	while (1);
}

// 0x070, 12: DMA1 Channel2
__attribute__ ((weak)) void DMA1_Channel2_IRQHandler()
{
	while (1);
}

// 0x074, 13: DMA1 Channel3
__attribute__ ((weak)) void DMA1_Channel3_IRQHandler()
{
	while (1);
}

// 0x078, 14: DMA1 Channel4
__attribute__ ((weak)) void DMA1_Channel4_IRQHandler()
{
	while (1);
}

// 0x07c, 15: DMA1 Channel5
__attribute__ ((weak)) void DMA1_Channel5_IRQHandler()
{
	while (1);
}

// 0x080, 16: DMA1 Channel6
__attribute__ ((weak)) void DMA1_Channel6_IRQHandler()
{
	while (1);
}

// 0x084, 17: DMA1 Channel7
__attribute__ ((weak)) void DMA1_Channel7_IRQHandler()
{
	while (1);
}

#if defined(STM32F100_VECTORS)

// 0x088, 18: ADC1
__attribute__ ((weak)) void ADC1_IRQHandler()
{
	while (1);
}

#else	// !defined(STM32F100_VECTORS)

// 0x088, 18: ADC1 and ADC2
__attribute__ ((weak)) void ADC1_2_IRQHandler()
{
	while (1);
}

#endif	// !defined(STM32F100_VECTORS)

#if defined(STM32F100_VECTORS)

// 0x08c, 19: Reserved
__attribute__ ((weak)) void Reserved_0x8c_Handler()
{
	while (1);
}

// 0x090, 20: Reserved
__attribute__ ((weak)) void Reserved_0x90_Handler()
{
	while (1);
}

// 0x094, 21: Reserved
__attribute__ ((weak)) void Reserved_0x94_Handler()
{
	while (1);
}

// 0x098, 22: Reserved
__attribute__ ((weak)) void Reserved_0x98_Handler()
{
	while (1);
}

#elif defined(STM32F1_CONNECTIVITY_LINE_VECTORS)

// 0x08c, 19: CAN1 TX
__attribute__ ((weak)) void CAN1_TX_IRQHandler()
{
	while (1);
}

// 0x090, 20: CAN1 RX0
__attribute__ ((weak)) void CAN1_RX0_IRQHandler()
{
	while (1);
}

// 0x094, 21: CAN1 RX1
__attribute__ ((weak)) void CAN1_RX1_IRQHandler()
{
	while (1);
}

// 0x098, 22: CAN1 SCE
__attribute__ ((weak)) void CAN1_SCE_IRQHandler()
{
	while (1);
}

#else	// !defined(STM32F100_VECTORS) && !defined(STM32F1_CONNECTIVITY_LINE_VECTORS)

// 0x08c, 19: USB High Priority or CAN1 TX
__attribute__ ((weak)) void USB_HP_CAN1_TX_IRQHandler()
{
	while (1);
}

// 0x090, 20: USB Low Priority or CAN1 RX0
__attribute__ ((weak)) void USB_LP_CAN1_RX0_IRQHandler()
{
	while (1);
}

// 0x094, 21: CAN1 RX1
__attribute__ ((weak)) void CAN1_RX1_IRQHandler()
{
	while (1);
}

// 0x098, 22: CAN1 SCE
__attribute__ ((weak)) void CAN1_SCE_IRQHandler()
{
	while (1);
}

#endif	// !defined(STM32F100_VECTORS) && !defined(STM32F1_CONNECTIVITY_LINE_VECTORS)

// 0x09c, 23: EXTI Line[9:5]
__attribute__ ((weak)) void EXTI9_5_IRQHandler()
{
	while (1);
}

#if defined(STM32F100_VECTORS)

// 0x0a0, 24: TIM1 Break and TIM15
__attribute__ ((weak)) void TIM1_BRK_TIM15_IRQHandler()
{
	while (1);
}

// 0x0a4, 25: TIM1 Update and TIM16
__attribute__ ((weak)) void TIM1_UP_TIM16_IRQHandler()
{
	while (1);
}

// 0x0a8, 26: TIM1 Trigger and Commutation and TIM17
__attribute__ ((weak)) void TIM1_TRG_COM_TIM17_IRQHandler()
{
	while (1);
}

#elif defined(STM32F1_XL_DENSITY_VECTORS)

// 0x0a0, 24: TIM1 Break and TIM9
__attribute__ ((weak)) void TIM1_BRK_TIM9_IRQHandler()
{
	while (1);
}

// 0x0a4, 25: TIM1 Update and TIM10
__attribute__ ((weak)) void TIM1_UP_TIM10_IRQHandler()
{
	while (1);
}

// 0x0a8, 26: TIM1 Trigger and Commutation and TIM11
__attribute__ ((weak)) void TIM1_TRG_COM_TIM11_IRQHandler()
{
	while (1);
}

#else	// !defined(STM32F100_VECTORS) && !defined(STM32F1_XL_DENSITY_VECTORS)

// 0x0a0, 24: TIM1 Break
__attribute__ ((weak)) void TIM1_BRK_IRQHandler()
{
	while (1);
}

// 0x0a4, 25: TIM1 Update
__attribute__ ((weak)) void TIM1_UP_IRQHandler()
{
	while (1);
}

// 0x0a8, 26: TIM1 Trigger and Commutation
__attribute__ ((weak)) void TIM1_TRG_COM_IRQHandler()
{
	while (1);
}

#endif	// !defined(STM32F100_VECTORS) && !defined(STM32F1_XL_DENSITY_VECTORS)

// 0x0ac, 27: TIM1 Capture Compare
__attribute__ ((weak)) void TIM1_CC_IRQHandler()
{
	while (1);
}

// 0x0b0, 28: TIM2
__attribute__ ((weak)) void TIM2_IRQHandler()
{
	while (1);
}

// 0x0b4, 29: TIM3
__attribute__ ((weak)) void TIM3_IRQHandler()
{
	while (1);
}

// 0x0b8, 30: TIM4
__attribute__ ((weak)) void TIM4_IRQHandler()
{
	while (1);
}

// 0x0bc, 31: I2C1 event
__attribute__ ((weak)) void I2C1_EV_IRQHandler()
{
	while (1);
}

// 0x0c0, 32: I2C1 error
__attribute__ ((weak)) void I2C1_ER_IRQHandler()
{
	while (1);
}

// 0x0c4, 33: I2C2 event
__attribute__ ((weak)) void I2C2_EV_IRQHandler()
{
	while (1);
}

// 0x0c8, 34: I2C2 error
__attribute__ ((weak)) void I2C2_ER_IRQHandler()
{
	while (1);
}

// 0x0cc, 35: SPI1
__attribute__ ((weak)) void SPI1_IRQHandler()
{
	while (1);
}

// 0x0d0, 36: SPI2
__attribute__ ((weak)) void SPI2_IRQHandler()
{
	while (1);
}

// 0x0d4, 37: USART1
__attribute__ ((weak)) void USART1_IRQHandler()
{
	while (1);
}

// 0x0d8, 38: USART2
__attribute__ ((weak)) void USART2_IRQHandler()
{
	while (1);
}

// 0x0dc, 39: USART3
__attribute__ ((weak)) void USART3_IRQHandler()
{
	while (1);
}

// 0x0e0, 40: EXTI Line[15:10]
__attribute__ ((weak)) void EXTI15_10_IRQHandler()
{
	while (1);
}

// 0x0e4, 41: RTC Alarm (A and B) through EXTI line
__attribute__ ((weak)) void RTC_Alarm_IRQHandler()
{
	while (1);
}

#if defined(STM32F100_VECTORS)

// 0x0e8, 42: CEC
__attribute__ ((weak)) void CEC_IRQHandler()
{
	while (1);
}

#elif defined(STM32F1_CONNECTIVITY_LINE_VECTORS)

// 0x0e8, 42: USB On-The-Go FS Wakeup through EXTI line
__attribute__ ((weak)) void OTG_FS_WKUP_IRQHandler()
{
	while (1);
}

#else	// !defined(STM32F100_VECTORS) && !defined(STM32F1_CONNECTIVITY_LINE_VECTORS)

// 0x0e8, 42: USB wakeup from suspend through EXTI line
__attribute__ ((weak)) void USB_WKUP_IRQHandler()
{
	while (1);
}

#endif	// !defined(STM32F100_VECTORS) && !defined(STM32F1_CONNECTIVITY_LINE_VECTORS)

#if defined(STM32F100_VECTORS)

// 0x0ec, 43: TIM12
__attribute__ ((weak)) void TIM12_IRQHandler()
{
	while (1);
}

// 0x0f0, 44: TIM13
__attribute__ ((weak)) void TIM13_IRQHandler()
{
	while (1);
}

// 0x0f4, 45: TIM14
__attribute__ ((weak)) void TIM14_IRQHandler()
{
	while (1);
}

#elif defined(STM32F1_CONNECTIVITY_LINE_VECTORS)

// 0x0ec, 43: Reserved
__attribute__ ((weak)) void Reserved_0xec_Handler()
{
	while (1);
}

// 0x0f0, 44: Reserved
__attribute__ ((weak)) void Reserved_0xf0_Handler()
{
	while (1);
}

// 0x0f4, 45: Reserved
__attribute__ ((weak)) void Reserved_0xf4_Handler()
{
	while (1);
}

#elif defined(STM32F1_XL_DENSITY_VECTORS)

// 0x0ec, 43: TIM8 Break and TIM12
__attribute__ ((weak)) void TIM8_BRK_TIM12_IRQHandler()
{
	while (1);
}

// 0x0f0, 44: TIM8 Update and TIM13
__attribute__ ((weak)) void TIM8_UP_TIM13_IRQHandler()
{
	while (1);
}

// 0x0f4, 45: TIM8 Trigger and Commutation and TIM14
__attribute__ ((weak)) void TIM8_TRG_COM_TIM14_IRQHandler()
{
	while (1);
}

#else	// !defined(STM32F100_VECTORS) && !defined(STM32F1_CONNECTIVITY_LINE_VECTORS) &&
// !defined(STM32F1_XL_DENSITY_VECTORS)

// 0x0ec, 43: TIM8 Break
__attribute__ ((weak)) void TIM8_BRK_IRQHandler()
{
	while (1);
}

// 0x0f0, 44: TIM8 Update
__attribute__ ((weak)) void TIM8_UP_IRQHandler()
{
	while (1);
}

// 0x0f4, 45: TIM8 Trigger and Commutation
__attribute__ ((weak)) void TIM8_TRG_COM_IRQHandler()
{
	while (1);
}

#endif	// !defined(STM32F100_VECTORS) && !defined(STM32F1_CONNECTIVITY_LINE_VECTORS) &&
// !defined(STM32F1_XL_DENSITY_VECTORS)

#if defined(STM32F100_VECTORS) || defined(STM32F1_CONNECTIVITY_LINE_VECTORS)

// 0x0f8, 46: Reserved
__attribute__ ((weak)) void Reserved_0xf8_Handler()
{
	while (1);
}

// 0x0fc, 47: Reserved
__attribute__ ((weak)) void Reserved_0xfc_Handler()
{
	while (1);
}

#else	// !defined(STM32F100_VECTORS) && !defined(STM32F1_CONNECTIVITY_LINE_VECTORS)

// 0x0f8, 46: TIM8 Capture Compare
__attribute__ ((weak)) void TIM8_CC_IRQHandler()
{
	while (1);
}

// 0x0fc, 47: ADC3
__attribute__ ((weak)) void ADC3_IRQHandler()
{
	while (1);
}

#endif	// !defined(STM32F100_VECTORS) && !defined(STM32F1_CONNECTIVITY_LINE_VECTORS)

#if defined(STM32F1_CONNECTIVITY_LINE_VECTORS)

// 0x100, 48: Reserved
__attribute__ ((weak)) void Reserved_0x100_Handler()
{
	while (1);
}

#else	// !defined(STM32F1_CONNECTIVITY_LINE_VECTORS)

// 0x100, 48: FSMC
__attribute__ ((weak)) void FSMC_IRQHandler()
{
	while (1);
}

#endif	// !defined(STM32F1_CONNECTIVITY_LINE_VECTORS)

#if defined(STM32F100_VECTORS) || defined(STM32F1_CONNECTIVITY_LINE_VECTORS)

// 0x104, 49: Reserved
__attribute__ ((weak)) void Reserved_0x104_Handler()
{
	while (1);
}

#else	// !defined(STM32F100_VECTORS) && !defined(STM32F1_CONNECTIVITY_LINE_VECTORS)

// 0x104, 49: SDIO
__attribute__ ((weak)) void SDIO_IRQHandler()
{
	while (1);
}

#endif	// !defined(STM32F100_VECTORS) && !defined(STM32F1_CONNECTIVITY_LINE_VECTORS)

// 0x108, 50: TIM5
__attribute__ ((weak)) void TIM5_IRQHandler()
{
	while (1);
}

// 0x10c, 51: SPI3
__attribute__ ((weak)) void SPI3_IRQHandler()
{
	while (1);
}

// 0x110, 52: UART4
__attribute__ ((weak)) void UART4_IRQHandler()
{
	while (1);
}

// 0x114, 53: UART5
__attribute__ ((weak)) void UART5_IRQHandler()
{
	while (1);
}

#if defined(STM32F100_VECTORS)

// 0x118, 54: TIM6 and DAC underrun
__attribute__ ((weak)) void TIM6_DAC_IRQHandler()
{
	while (1);
}

#else	// !defined(STM32F100_VECTORS)

// 0x118, 54: TIM6
__attribute__ ((weak)) void TIM6_IRQHandler()
{
	while (1);
}

#endif	// !defined(STM32F100_VECTORS)

// 0x11c, 55: TIM7
__attribute__ ((weak)) void TIM7_IRQHandler()
{
	while (1);
}

// 0x120, 56: DMA2 Channel1
__attribute__ ((weak)) void DMA2_Channel1_IRQHandler()
{
	while (1);
}

// 0x124, 57: DMA2 Channel2
__attribute__ ((weak)) void DMA2_Channel2_IRQHandler()
{
	while (1);
}

// 0x128, 58: DMA2 Channel3
__attribute__ ((weak)) void DMA2_Channel3_IRQHandler()
{
	while (1);
}

#if defined(STM32F1_CONNECTIVITY_LINE_VECTORS)

// 0x12c, 59: DMA2 Channel4
__attribute__ ((weak)) void DMA2_Channel4_IRQHandler()
{
	while (1);
}

#else	// !defined(STM32F1_CONNECTIVITY_LINE_VECTORS)

// 0x12c, 59: DMA2 Channel4 and DMA2 Channel5
__attribute__ ((weak)) void DMA2_Channel4_5_IRQHandler()
{
	while (1);
}

#endif	// !defined(STM32F1_CONNECTIVITY_LINE_VECTORS)

#if defined(STM32F100_VECTORS) || defined(STM32F1_CONNECTIVITY_LINE_VECTORS)

// 0x130, 60: DMA2 Channel5
__attribute__ ((weak)) void DMA2_Channel5_IRQHandler()
{
	while (1);
}

#endif	// defined(STM32F100_VECTORS) || defined(STM32F1_CONNECTIVITY_LINE_VECTORS)

#if defined(STM32F1_CONNECTIVITY_LINE_VECTORS)

// 0x134, 61: Ethernet
__attribute__ ((weak)) void ETH_IRQHandler()
{
	while (1);
}

// 0x138, 62: Ethernet Wakeup through EXTI line
__attribute__ ((weak)) void ETH_WKUP_IRQHandler()
{
	while (1);
}

// 0x13c, 63: CAN2 TX
__attribute__ ((weak)) void CAN2_TX_IRQHandler()
{
	while (1);
}

// 0x140, 64: CAN2 RX0
__attribute__ ((weak)) void CAN2_RX0_IRQHandler()
{
	while (1);
}

// 0x144, 65: CAN2 RX1
__attribute__ ((weak)) void CAN2_RX1_IRQHandler()
{
	while (1);
}

// 0x148, 66: CAN2 SCE
__attribute__ ((weak)) void CAN2_SCE_IRQHandler()
{
	while (1);
}

// 0x14c, 67: USB On The Go FS
__attribute__ ((weak)) void OTG_FS_IRQHandler()
{
	while (1);
}

#endif	// defined(STM32F1_CONNECTIVITY_LINE_VECTORS)

}	// extern "C"

/*---------------------------------------------------------------------------------------------------------------------+
| local types
+---------------------------------------------------------------------------------------------------------------------*/

/// single interrupt vector - pointer to function with no arguments and no return value
using InterruptVector = void(*)();

/*---------------------------------------------------------------------------------------------------------------------+
| global variables
+---------------------------------------------------------------------------------------------------------------------*/

/// chip vector table
extern "C" const InterruptVector chipVectors[] __attribute__ ((section(".chipVectors"), used))
{
		WWDG_IRQHandler,					// 0x040, 0: Window watchdog
		PVD_IRQHandler,						// 0x044, 1: PVD through EXTI Line detection
		TAMP_STAMP_IRQHandler,				// 0x048, 2: Tamper and TimeStamp through the EXTI line
		RTC_WKUP_IRQHandler,				// 0x04c, 3: RTC Wakeup through the EXTI line
		FLASH_IRQHandler,					// 0x050, 4: Flash
		RCC_IRQHandler,						// 0x054, 5: RCC
		EXTI0_IRQHandler,					// 0x058, 6: EXTI Line0
{'fraction_non_alphanumeric': 0.19695397489539748, 'fraction_numerical': 0.08445188284518829, 'mean_word_length': 3.577995709469813, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3625292', 'n_tokens_mistral': 13308, 'n_tokens_neox': 11593, 'n_words': 2620}