cancel
Showing results for 
Search instead for 
Did you mean: 

STM32 VS Code Extension generates startup file with unusable g_pfnVectors

KnarfB
Principal III

Using STM32 VS Code Extension 2.0.1 to create empty project for STM32C0116-DK board.

The generated startup_stm32c011f6ux.s file contains handlers in wrong (alphabetic ???) order:

 

 

 

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	ADC_IRQHandler                			/* ADC interrupt                                          */
  .word	DMA1_Channel1_IRQHandler      			/* DMA1 channel 1 interrupt                               */
  .word	DMA1_Channel2_3_IRQHandler    			/* DMA1 channel 2 and 3 interrupts                        */
  .word	DMAMUX_IRQHandler             			/* DMAMUX interrupts                                      */
  .word	EXTI0_1_IRQHandler            			/* EXTI line 0 and 1 interrupt                            */
  .word	EXTI2_3_IRQHandler            			/* EXTI line 2 and 3 interrupt                            */
  .word	EXTI4_5_IRQHandler            			/* EXTI line 4 and 5 interrupt                            */
  .word	I2C_IRQHandler                			/* global interrupt (combined with EXTI 23)               */
  .word	RCC_IRQHandler                			/* RCC global interrupt                                   */
  .word	RTC_IRQHandler                			/* RTC interrupts (EXTI lines 19)                         */
  .word	SPI_IRQHandler                			/* SPI/I2S global interrupt                               */
  .word	TIM1_BRK_UP_TRG_COM_IRQHandler			/* TIM1 break, update, trigger and commutation interrupts */
  .word	TIM1_CC_IRQHandler            			/* TIM1 Capture Compare interrupt                         */
  .word	TIM3_IRQHandler               			/* TIM3 gloabal interrupt                                 */
  .word	TIM14_IRQHandler              			/* TIM14 gloabal interrupt                                */
  .word	TIM16_IRQHandler              			/* TIM16 global interrupt                                 */
  .word	TIM17_IRQHandler              			/* TIM17 global interrupt                                 */
  .word	USART1_IRQHandler             			/* USART1 global interrupt (combined with EXTI 25)        */
  .word	USART2_IRQHandler             			/* USART2 global interrupt (combined with EXTI 25)        */
  .word	WWDG_IRQHandler               			/* Window watchdog interrupt                              */
  .size g_pfnVectors, .-g_pfnVectors

 

 

 

wheras CubeMX 6.12 generates the correct one:

 

 

 

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  WWDG_IRQHandler                   /* Window WatchDog              */
  .word  0                                 /* reserved                     */
  .word  RTC_IRQHandler                    /* RTC through the EXTI line    */
  .word  FLASH_IRQHandler                  /* FLASH                        */
  .word  RCC_IRQHandler                    /* RCC                          */
  .word  EXTI0_1_IRQHandler                /* EXTI Line 0 and 1            */
  .word  EXTI2_3_IRQHandler                /* EXTI Line 2 and 3            */
  .word  EXTI4_15_IRQHandler               /* EXTI Line 4 to 15            */
  .word  0                                 /* reserved                     */
  .word  DMA1_Channel1_IRQHandler          /* DMA1 Channel 1               */
  .word  DMA1_Channel2_3_IRQHandler        /* DMA1 Channel 2 and Channel 3 */
  .word  DMAMUX1_IRQHandler                /* DMAMUX1                      */
  .word  ADC1_IRQHandler                   /* ADC1                         */
  .word  TIM1_BRK_UP_TRG_COM_IRQHandler    /* TIM1 Break, Update, Trigger and Commutation */
  .word  TIM1_CC_IRQHandler                /* TIM1 Capture Compare         */
  .word  0                                 /* reserved                     */
  .word  TIM3_IRQHandler                   /* TIM3                         */
  .word  0                                 /* reserved                     */
  .word  0                                 /* reserved                     */
  .word  TIM14_IRQHandler                  /* TIM14                        */
  .word  0                                 /* reserved                     */
  .word  TIM16_IRQHandler                  /* TIM16                        */
  .word  TIM17_IRQHandler                  /* TIM17                        */
  .word  I2C1_IRQHandler                   /* I2C1                         */
  .word  0                                 /* reserved                     */
  .word  SPI1_IRQHandler                   /* SPI1                         */
  .word  0                                 /* reserved                     */
  .word  USART1_IRQHandler                 /* USART1                       */
  .word  USART2_IRQHandler                 /* USART2                       */
  .word  0                                 /* reserved                     */
  .word  0                                 /* reserved                     */
  .word  0                                 /* reserved                     */

  .size g_pfnVectors, .-g_pfnVectors

 

 

 

please fix

KnarfB

1 REPLY 1