cancel
Showing results for 
Search instead for 
Did you mean: 

STM32 VSCode Extension generates incorrect vector table for NUCLEO-F767ZI

svcguy
Associate III

Version: 2.0.1

Steps to reproduce: Create empty project for NUCLEO-F767ZI, vector table in startup code will be incorrect.

 

 

/******************************************************************************
*
* The STM32F767ZITx vector table.  Note that the proper constructs
* must be placed on this to ensure that it ends up at physical address
* 0x0000.0000.
*
******************************************************************************/
  .section .isr_vector,"a",%progbits
  .type g_pfnVectors, %object

g_pfnVectors:
  .word	_estack
  .word	Reset_Handler
  .word	NMI_Handler
  .word	HardFault_Handler
  .word	0
  .word	0
  .word	0
  .word	0
  .word	0
  .word	0
  .word	0
  .word	SVC_Handler
  .word	0
  .word	0
  .word	PendSV_Handler
  .word	SysTick_Handler
  .word	HASH_RNG_IRQHandler          			/* Hash and Rng global interrupt                                       */
  .word	CRYP_IRQHandler              			/* CRYP crypto global interrupt                                        */
  .word	DCMI_IRQHandler              			/* DCMI global interrupt                                               */
  .word	FMC_IRQHandler               			/* FMC global interrupt                                                */
  .word	DMA2_Stream0_IRQHandler      			/* DMA2 Stream0 global interrupt                                       */
  .word	DMA2_Stream1_IRQHandler      			/* DMA2 Stream1 global interrupt                                       */
  .word	DMA2_Stream2_IRQHandler      			/* DMA2 Stream2 global interrupt                                       */
  .word	DMA2_Stream3_IRQHandler      			/* DMA2 Stream3 global interrupt                                       */
  .word	DMA2_Stream4_IRQHandler      			/* DMA2 Stream4 global interrupt                                       */
  .word	DMA2_Stream5_IRQHandler      			/* DMA2 Stream5 global interrupt                                       */
  .word	DMA2_Stream6_IRQHandler      			/* DMA2 Stream6 global interrupt                                       */
  .word	DMA2_Stream7_IRQHandler      			/* DMA2 Stream7 global interrupt                                       */
  .word	DMA1_Stream0_IRQHandler      			/* DMA1 Stream0 global interrupt                                       */
  .word	DMA1_Stream1_IRQHandler      			/* DMA1 Stream1 global interrupt                                       */
  .word	DMA1_Stream2_IRQHandler      			/* DMA1 Stream2 global interrupt                                       */
  .word	DMA1_Stream3_IRQHandler      			/* DMA1 Stream3 global interrupt                                       */
  .word	DMA1_Stream4_IRQHandler      			/* DMA1 Stream4 global interrupt                                       */
  .word	DMA1_Stream5_IRQHandler      			/* DMA1 Stream5 global interrupt                                       */
  .word	DMA1_Stream6_IRQHandler      			/* DMA1 Stream6 global interrupt                                       */
  .word	DMA1_Stream7_IRQHandler      			/* DMA1 Stream7 global interrupt                                       */
  .word	RCC_IRQHandler               			/* RCC global interrupt                                                */
  .word	SPI1_IRQHandler              			/* SPI1 global interrupt                                               */
  .word	SPI2_IRQHandler              			/* SPI2 global interrupt                                               */
  .word	SPI4_IRQHandler              			/* SPI 4 global interrupt                                              */
  .word	SPI5_IRQHandler              			/* SPI 5 global interrupt                                              */
  .word	SPI3_IRQHandler              			/* SPI3 global interrupt                                               */
  .word	SPI6_IRQHandler              			/* SPI 6 global interrupt                                              */
  .word	ADC_IRQHandler               			/* ADC1 global interrupt                                               */
  .word	WWDG_IRQHandler              			/* Window Watchdog interrupt                                           */
  .word	TIM1_BRK_TIM9_IRQHandler     			/* TIM1 Break interrupt and TIM9 global interrupt                      */
  .word	TIM1_UP_TIM10_IRQHandler     			/* TIM1 Update interrupt and TIM10                                     */
  .word	TIM1_TRG_COM_TIM11_IRQHandler			/* TIM1 Trigger and Commutation interrupts and TIM11 global interrupt  */
  .word	TIM1_CC_IRQHandler           			/* TIM1 Capture Compare interrupt                                      */
  .word	TIM8_BRK_TIM12_IRQHandler    			/* TIM8 Break interrupt and TIM12 global interrupt                     */
  .word	TIM8_UP_TIM13_IRQHandler     			/* TIM8 Update interrupt and TIM13 global interrupt                    */
  .word	TIM8_TRG_COM_TIM14_IRQHandler			/* TIM8 Trigger and Commutation interrupts and TIM14 global interrupt  */
  .word	TIM8_CC_IRQHandler           			/* TIM8 Capture Compare interrupt                                      */
  .word	TIM2_IRQHandler              			/* TIM2 global interrupt                                               */
  .word	TIM3_IRQHandler              			/* TIM3 global interrupt                                               */
  .word	TIM4_IRQHandler              			/* TIM4 global interrupt                                               */
  .word	TIM5_IRQHandler              			/* TIM5 global interrupt                                               */
  .word	TIM6_DAC_IRQHandler          			/* TIM6 global interrupt, DAC1 and DAC2 underrun error interrupt       */
  .word	TIM7_IRQHandler              			/* TIM7 global interrupt                                               */
  .word	ETH_IRQHandler               			/* Ethernet global interrupt                                           */
  .word	ETH_WKUP_IRQHandler          			/* Ethernet Wakeup through EXTI line                                   */
  .word	CAN1_TX_IRQHandler           			/* CAN1 TX interrupts                                                  */
  .word	CAN1_RX0_IRQHandler          			/* CAN1 RX0 interrupts                                                 */
  .word	CAN1_RX1_IRQHandler          			/* CAN1 RX1 interrupts                                                 */
  .word	CAN1_SCE_IRQHandler          			/* CAN1 SCE interrupt                                                  */
  .word	CAN2_TX_IRQHandler           			/* CAN2 TX interrupts                                                  */
  .word	CAN2_RX0_IRQHandler          			/* CAN2 RX0 interrupts                                                 */
  .word	CAN2_RX1_IRQHandler          			/* CAN2 RX1 interrupts                                                 */
  .word	CAN2_SCE_IRQHandler          			/* CAN2 SCE interrupt                                                  */
  .word	CAN3_TX_IRQHandler           			/* CAN3 TX interrupt                                                   */
  .word	CAN3_RX0_IRQHandler          			/* CAN3 RX0 interrupt                                                  */
  .word	CAN3_RX1_IRQHandler          			/* CAN3 RX1 interrupt                                                  */
  .word	CAN3_SCE_IRQHandler          			/* CAN3 SCE interrupt                                                  */
  .word	FLASH_IRQHandler             			/* Flash global interrupt                                              */
  .word	PVD_IRQHandler               			/* PVD through EXTI line detection                                     */
  .word	TAMP_STAMP_IRQHandler        			/* Tamper and TimeStamp interrupts through the EXTI line               */
  .word	EXTI0_IRQHandler             			/* EXTI Line0 interrupt                                                */
  .word	EXTI1_IRQHandler             			/* EXTI Line1 interrupt                                                */
  .word	EXTI2_IRQHandler             			/* EXTI Line2 interrupt                                                */
  .word	EXTI3_IRQHandler             			/* EXTI Line3 interrupt                                                */
  .word	EXTI4_IRQHandler             			/* EXTI Line4 interrupt                                                */
  .word	EXTI9_5_IRQHandler           			/* EXTI Line[9:5] interrupts                                           */
  .word	EXTI15_10_IRQHandler         			/* EXTI Line[15:10] interrupts                                         */
  .word	RTC_ALARM_IRQHandler         			/* RTC alarms through EXTI line 18 interrupts                          */
  .word	OTG_FS_WKUP_IRQHandler       			/* USB On-The-Go FS Wakeup through EXTI line interrupt                 */
  .word	OTG_HS_EP1_OUT_IRQHandler    			/* USB On The Go HS End Point 1 Out global interrupt                   */
  .word	OTG_HS_EP1_IN_IRQHandler     			/* USB On The Go HS End Point 1 In global interrupt                    */
  .word	OTG_HS_WKUP_IRQHandler       			/* USB On The Go HS Wakeup through EXTI interrupt                      */
  .word	OTG_HS_IRQHandler            			/* USB On The Go HS global interrupt                                   */
  .word	LCD_TFT_IRQHandler           			/* LTDC global interrupt                                               */
  .word	LCD_TFT_1_IRQHandler         			/* LCD-TFT global Error interrupt                                      */
  .word	SAI1_IRQHandler              			/* SAI1 global interrupt                                               */
  .word	SAI2_IRQHandler              			/* SAI2 global interrupt                                               */
  .word	DMA2D_IRQHandler             			/* DMA2D global interrupt                                              */
  .word	QuadSPI_IRQHandler           			/* QuadSPI global interrupt                                            */
  .word	SPDIFRX_IRQHandler           			/* SPDIFRX global interrupt                                            */
  .word	SDMMC1_IRQHandler            			/* SDMMC1 global interrupt                                             */
  .word	SDMMC2_IRQHandler            			/* SDMMC2 global interrupt                                             */
  .word	LP_Timer1_IRQHandler         			/* LP Timer1 global interrupt                                          */
  .word	I2C1_EV_IRQHandler           			/* I2C1 event interrupt                                                */
  .word	I2C1_ER_IRQHandler           			/* I2C1 error interrupt                                                */
  .word	I2C2_EV_IRQHandler           			/* I2C2 event interrupt                                                */
  .word	I2C2_ER_IRQHandler           			/* I2C2 error interrupt                                                */
  .word	I2C3_EV_IRQHandler           			/* I2C3 event interrupt                                                */
  .word	I2C3_ER_IRQHandler           			/* I2C3 error interrupt                                                */
  .word	I2C4_EV_IRQHandler           			/* I2C4 event interrupt                                                */
  .word	I2C4_ER_IRQHandler           			/* I2C4 Error interrupt                                                */
  .word	RTC_WKUP_IRQHandler          			/* RTC Tamper or TimeStamp /CSS on LSE through EXTI line 19 interrupts */
  .word	USART6_IRQHandler            			/* USART6 global interrupt                                             */
  .word	USART1_IRQHandler            			/* USART1 global interrupt                                             */
  .word	USART3_IRQHandler            			/* USART3 global interrupt                                             */
  .word	USART2_IRQHandler            			/* USART2 global interrupt                                             */
  .word	UART5_IRQHandler             			/* UART5 global interrupt                                              */
  .word	UART4_IRQHandler             			/* UART4 global interrupt                                              */
  .word	UART8_IRQHandler             			/* UART 8 global interrupt                                             */
  .word	UART7_IRQHandler             			/* UART7 global interrupt                                              */
  .word	OTG_FS_IRQHandler            			/* USB On The Go FS global interrupt                                   */
  .word	MDIOS_IRQHandler             			/* MDIO slave global interrupt                                         */
  .word	DFSDM1_FLT0_IRQHandler       			/* DFSDM1 Filter 0 global interrupt                                    */
  .word	DFSDM1_FLT1_IRQHandler       			/* DFSDM1 Filter 1 global interrupt                                    */
  .word	DFSDM1_FLT2_IRQHandler       			/* DFSDM1 Filter 2 global interrupt                                    */
  .word	DFSDM1_FLT3_IRQHandler       			/* DFSDM1 Filter 3 global interrupt                                    */
  .word	JPEG_IRQHandler              			/* JPEG global interrupt                                               */
  .word	DSIHOST_IRQHandler           			/* DSI host global interrupt                                           */
  .word	FPU_IRQHandler               			/* FPU global interrupt                                                */

 

2 REPLIES 2
billv
Associate

It would appear the exact same problem exists for the stm32f412rgt. Using the latest vs code extension (v2.0.1) with STM32CubeCLT_1.16.0 produces the attached file. The correct vector table should look like this (taken from Keil):

DCD __initial_sp ; Top of Stack
DCD Reset_Handler ; Reset Handler
DCD NMI_Handler ; NMI Handler
DCD HardFault_Handler ; Hard Fault Handler
DCD MemManage_Handler ; MPU Fault Handler
DCD BusFault_Handler ; Bus Fault Handler
DCD UsageFault_Handler ; Usage Fault Handler
DCD 0 ; Reserved location, used for firmware size
DCD 0 ; Reserved location, used for firmware crc
DCD 0 ; Reserved location, used for firmware version
DCD 0 ; Reserved location, used for firmware hash
DCD SVC_Handler ; SVCall Handler
DCD DebugMon_Handler ; Debug Monitor Handler
DCD 0 ; Reserved location, used for firmware build
DCD PendSV_Handler ; PendSV Handler
DCD SysTick_Handler ; SysTick Handler

; External Interrupts
DCD WWDG_IRQHandler ; Window WatchDog
DCD PVD_IRQHandler ; PVD through EXTI Line detection
DCD TAMP_STAMP_IRQHandler ; Tamper and TimeStamps through the EXTI line
DCD RTC_WKUP_IRQHandler ; RTC Wakeup through the EXTI line
DCD FLASH_IRQHandler ; FLASH
DCD RCC_IRQHandler ; RCC
DCD EXTI0_IRQHandler ; EXTI Line0
DCD EXTI1_IRQHandler ; EXTI Line1
DCD EXTI2_IRQHandler ; EXTI Line2
DCD EXTI3_IRQHandler ; EXTI Line3
DCD EXTI4_IRQHandler ; EXTI Line4
DCD DMA1_Stream0_IRQHandler ; DMA1 Stream 0
DCD DMA1_Stream1_IRQHandler ; DMA1 Stream 1
DCD DMA1_Stream2_IRQHandler ; DMA1 Stream 2
DCD DMA1_Stream3_IRQHandler ; DMA1 Stream 3
DCD DMA1_Stream4_IRQHandler ; DMA1 Stream 4
DCD DMA1_Stream5_IRQHandler ; DMA1 Stream 5
DCD DMA1_Stream6_IRQHandler ; DMA1 Stream 6
DCD ADC_IRQHandler ; ADC1, ADC2 and ADC3s
DCD CAN1_TX_IRQHandler ; CAN1 TX
DCD CAN1_RX0_IRQHandler ; CAN1 RX0
DCD CAN1_RX1_IRQHandler ; CAN1 RX1
DCD CAN1_SCE_IRQHandler ; CAN1 SCE
DCD EXTI9_5_IRQHandler ; External Line[9:5]s
DCD TIM1_BRK_TIM9_IRQHandler ; TIM1 Break and TIM9
DCD TIM1_UP_TIM10_IRQHandler ; TIM1 Update and TIM10
DCD TIM1_TRG_COM_TIM11_IRQHandler ; TIM1 Trigger and Commutation and TIM11
DCD TIM1_CC_IRQHandler ; TIM1 Capture Compare
DCD TIM2_IRQHandler ; TIM2
DCD TIM3_IRQHandler ; TIM3
DCD TIM4_IRQHandler ; TIM4
DCD I2C1_EV_IRQHandler ; I2C1 Event
DCD I2C1_ER_IRQHandler ; I2C1 Error
DCD I2C2_EV_IRQHandler ; I2C2 Event
DCD I2C2_ER_IRQHandler ; I2C2 Error
DCD SPI1_IRQHandler ; SPI1
DCD SPI2_IRQHandler ; SPI2
DCD USART1_IRQHandler ; USART1
DCD USART2_IRQHandler ; USART2
DCD USART3_IRQHandler ; USART3
DCD EXTI15_10_IRQHandler ; External Line[15:10]s
DCD RTC_Alarm_IRQHandler ; RTC Alarm (A and B) through EXTI Line
DCD OTG_FS_WKUP_IRQHandler ; USB OTG FS Wakeup through EXTI line
DCD TIM8_BRK_TIM12_IRQHandler ; TIM8 Break and TIM12
DCD TIM8_UP_TIM13_IRQHandler ; TIM8 Update and TIM13
DCD TIM8_TRG_COM_TIM14_IRQHandler ; TIM8 Trigger and Commutation and TIM14
DCD TIM8_CC_IRQHandler ; TIM8 Capture Compare
DCD DMA1_Stream7_IRQHandler ; DMA1 Stream7
DCD 0 ; Reserved
DCD SDIO_IRQHandler ; SDIO
DCD TIM5_IRQHandler ; TIM5
DCD SPI3_IRQHandler ; SPI3
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD TIM6_IRQHandler ; TIM6
DCD TIM7_IRQHandler ; TIM7
DCD DMA2_Stream0_IRQHandler ; DMA2 Stream 0
DCD DMA2_Stream1_IRQHandler ; DMA2 Stream 1
DCD DMA2_Stream2_IRQHandler ; DMA2 Stream 2
DCD DMA2_Stream3_IRQHandler ; DMA2 Stream 3
DCD DMA2_Stream4_IRQHandler ; DMA2 Stream 4
DCD DFSDM1_FLT0_IRQHandler ; DFSDM1 Filter 0 global interrupt
DCD DFSDM1_FLT1_IRQHandler ; DFSDM1 Filter 1 global interrupt
DCD CAN2_TX_IRQHandler ; CAN2 TX
DCD CAN2_RX0_IRQHandler ; CAN2 RX0
DCD CAN2_RX1_IRQHandler ; CAN2 RX1
DCD CAN2_SCE_IRQHandler ; CAN2 SCE
DCD OTG_FS_IRQHandler ; USB OTG FS
DCD DMA2_Stream5_IRQHandler ; DMA2 Stream 5
DCD DMA2_Stream6_IRQHandler ; DMA2 Stream 6
DCD DMA2_Stream7_IRQHandler ; DMA2 Stream 7
DCD USART6_IRQHandler ; USART6
DCD I2C3_EV_IRQHandler ; I2C3 event
DCD I2C3_ER_IRQHandler ; I2C3 error
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD RNG_IRQHandler ; RNG
DCD FPU_IRQHandler ; FPU
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD SPI4_IRQHandler ; SPI4
DCD SPI5_IRQHandler ; SPI5
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD QUADSPI_IRQHandler ; QuadSPI
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD FMPI2C1_EV_IRQHandler ; FMPI2C1 Event
DCD FMPI2C1_ER_IRQHandler ; FMPI2C1 Error