Skip to main content
Aishwarya
Associate III
May 13, 2020
Question

STM32WB50 || Error- undefined reference to lpuart1_irqhandler

  • May 13, 2020
  • 2 replies
  • 914 views

Empty code initialized peripherals(UART,SPI) code generated by STM32CubeIDE give error undefined reference to lpuart1_irqhandler at compile time.

In stm32wb50 only UART, SPI ,I2C & RF communication channel available.

Startup file has lpuart1_irqhandler , which is wrong .

if I can remove that line(line 197) from startup file it compile and run properly otherwise not.

What I do?0693W000000XMBgQAO.png

This topic has been closed for replies.

2 replies

TDK
Super User
May 13, 2020

At the bottom of the file, a bunch of those symbols are defined as weak references to Default_Handler. Add this one as well:

 .weak LPUART1_IRQHandler
 .thumb_set LPUART1_IRQHandler,Default_Handler

Appears to be a bug in the STM32CubeWB repository:

https://github.com/STMicroelectronics/STM32CubeWB/blob/master/Drivers/CMSIS/Device/ST/STM32WBxx/Source/Templates/gcc/startup_stm32wb50xx_cm4.s

"If you feel a post has answered your question, please click ""Accept as Solution""."
Aishwarya
AishwaryaAuthor
Associate III
May 18, 2020

thanks TDK