cancel
Showing results for 
Search instead for 
Did you mean: 

How to fix "No source available for main() at ..." encountered while debugging ?

Simon151
Associate

Hi everyone,

I’m currently trying to debug my project. However, as soon as I start the debugger, I always get the following error message: "No source available for main() at 0x80048bc". I’m using a custom board with an STM32L4P5ZGT6.

 

Read and followed these threads: https://community.st.com/t5/stm32cubeide-mcus/how-to-solve-the-error-quot-no-source-available-for-main-at-quot/td-p/228420

and https://community.st.com/t5/stm32cubeide-mcus/debug-quot-no-source-available-for-main-quot/m-p/385835

 

I ensured I’m using the Debug build configuration and set Debug Level to -g3.

 

Any Ideas how to fix this?

image.png

 

Simon151_0-1758872623933.png

 

Thanks in advance.

Simon

 

2 REPLIES 2
TDK
Super User

How are you starting the debugger?

Does the Console tab show the programmer downloading the ELF to the chip?

 

If you feel a post has answered your question, please click "Accept as Solution".
Simon151
Associate

I start the debugger via the Debug Configurations I want to make sure the Debug build is selected and the correct launch file is used.

Flashing works, but as soon as the program is programmed onto the target I get the “No source available” message.

I’m using FreeRTOS and external memory (QSPI). Could this be related?