Skip to main content
Visitor II
November 28, 2025
Question

No source file corresponding to 'huart2() at 0x20000108"

  • November 28, 2025
  • 3 replies
  • 244 views

Edited by a ST moderator. In next time please use English language.

 

在STM32CUBEIDE中配置STM32F103C4完以后直接编译出现《没有 “huart2() at 0x20000108” 对应的源文件》不知道该如何把huart导入到编译器的路径下

Translation: After configuring the STM32F103C4 in STM32CUBEIDE, I encountered the error "No source file corresponding to 'huart2() at 0x20000108'" during compilation. I don't know how to import the huart2() file into the compiler's path.

3 replies

Technical Moderator
November 28, 2025

Hello @LEGENDTU and welcome to ST community.

It seems the debug symbols are empty in your case. Are you using "Release" in debug settings?

If it is the case, you should use "Debug" instead.

 

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
Andrew Neil
Super User
November 28, 2025

"huart2()" suggests that it's trying to treat your UART handle as a function?

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
Tesla DeLorean
Guru
November 29, 2025

It's pointing to RAM.

You show no code or usage detail.

Present the problem in a fashion that might be understood or diagnosed. 

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
Andrew Neil
Super User
November 29, 2025

@Tesla DeLorean wrote:

It's pointing to RAM.


Which is where you'd expect a UART handle to be.

@LEGENDTU perhaps try searching your code for any instance of "huart2()" ...

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.