STM32CubeMX Generates different names for interrupt handler in startup file & stm32l4xx_it.c
- March 20, 2026
- 1 reply
- 209 views
Hi everyone,
I just started developing software for a new project containing on of the STM32L4P5 series microcontrollers. Therefore I bought the NUCELO-L4P5ZG starter-kit to get used to the IDE, HAL and so on. I use the STM32CubeMX IDE (Version 6.16.1) to configure the board and generate the basic initialization sources. Further code writing is done in STM32CubeIDE (Version: 2.1.1).
For the beginning I configured three GPIO pins for the LEDs on the board and the LPUART for simple data transfer to terminal on host computer. For the transmission I want to use DMA . After generating the code with CubeMX and implementing some simple blink logic for the LEDs, I added the line HAL_UART_Transmit_DMA(&hlpuart1, buffer, 14); to the main loop. I debugged the code and saw that the code ran into the infinite loop in the DefaultHandler in the startup file startup_stm32l4p5zgtx.s:
After searching for two and a half hour I finally found the problem: the generated names for the interrupt handler in the startup file and the stm32l4xx_it.c are slightly different. See the following sections:

and

After changing the name manually in the stm32l4xx_it.c file everything works fine (until the next generation of the initialization code with CubeMX).
Please see this as a bug report and consider this issue for new releases of CubeMX.
Attached: my entire project.
