cancel
Showing results for 
Search instead for 
Did you mean: 

Errors while debugging a project in STM32CubeIDE

TKopp.67
Associate II

Hello everyone,

I succeeded to import a project for a STM32F405 inside the STM32CubeIDE. It means i created an empty STM32Cube project and imported my own sources and Makefile. I succeeded to compile it and run a debug session after modifying the project and adding the debug flags in the different Makefiles of my project. The debug session works well, i can use live expression, and make step by step.

But when i reach one particular function, then i can't use any buttons like "Step over" or others. I can only pause the debug session and then i get this message : "Break at address "0x1fff36a8" with no debug information available, or outside of program code".

I checked in the memory map and saw that this is the system memory but i don't know why it goes there.

I also several time got this error : No source available for "(gdb[23].proc[42000].threadGroup[i1],gdb[23].proc[42000].OSthread[1]).thread[1].frame[0]"

Did anyone already dealed with those ?

I attach the configuration files of my project if anyone knows how to read them and could find the problem.

Let me know if any other information could be helpful.

Thanks for your answer,

Thomas

30 REPLIES 30
TKopp.67
Associate II

Okay i maybe found the problem, but i wanna be able to deal with that. I have external library (that the provider didn't send the sources we only have headers and a .a static library file). How the debugger can pass through those without making any issue ?? Is it possible ?

TKopp.67
Associate II

also even when i comment this function and just press "resume" to launch the application after pausing it i still get an error like : Break at address "0x1fff36aa" with no debug information available, or outside of program code.

Markus GIRDLAND
ST Employee

Hello TKopp!

This is a problem that's hard to pinpoint and because of that I can't really give any specific information. My guess is that it might be a stack overflow/corruption.

If everything works when you're not going to the library functions then it's probably some error between the library and the application.

To try and find it you could check the stack pointer before entering the function and after the error (Higher? Lower? Have you returned?).

Could you find out more information by assembly stepping?

You could also try to strip the project down to the bare minimum and then expand from there to find where the error is.

As I mentioned, this could be because of many different reasons... error in the build settings, bug in code, bug in library. There might be a problem by CDT if you don't have access to the library as well.

Maybe this can give you some ideas of how to pinpoint the error, at least.

TKopp.67
Associate II

Hello Markus,

Thanks firstly for your answer.

I am not sure that my issue comes from the library. I tried to comment all calls to this library and i still had the same error.

The strange thing, is that when i launch the debug session and resume the execution, the application works fine until i hit the button stop (even if is one hour after so i don't think the MCU is faulting). Then of course the application stops, but also i can't use anything like live expression anymore and the error happens on the screen. If i just make step by step it seems to work (maybe i would get an error at a moment i don't know).

For the stack analysis, i have info after the build, but should i be able to see something while code execution ? (sorry i am new to the IDE).

For the build settings, i compared what does my makefile to what does the one of your project examples, and it seems kinda similar except some warning flags (i have -fno-inline and -fno-common more which i don't think can be the problem).

I also tried to implement my code initialisation with just a variable increment in the while loop and still gets the same error.

Best Regards,

Thomas

Hello Markus,

Thanks firstly for your answer.

I am not sure that my issue comes from the library. I tried to comment all calls to this library and i still had the same error.

The strange thing, is that when i launch the debug session and resume the execution, the application works fine until i hit the button stop (even if is one hour after so i don't think the MCU is faulting). Then of course the application stops, but also i can't use anything like live expression anymore and the error happens on the screen. If i just make step by step it seems to work (maybe i would get an error at a moment i don't know).

For the stack analysis, i have info after the build, but should i be able to see something while code execution ? (sorry i am new to the IDE).

For the build settings, i compared what does my makefile to what does the one of your project examples, and it seems kinda similar except some warning flags (i have -fno-inline and -fno-common more which i don't think can be the problem).

I also tried to implement my code initialisation with just a variable increment in the while loop and still gets the same error.

Best Regards,

Thomas

Radosław
Senior

FPU settings are same for your project and library? Did you have default interrupt handler handler? Missing library source code shouldn't be a problem.

You are 100% sure that library is included correcly?

Radosław
Senior

Send me your makefile.... this will give me much more info.

Also when i use the live expression, i can't follow the variable i added when the execution goes to another source file than where the variable is declared.

Here is the IDE output :

Multiple errors reported.

1) Failed to execute MI command:

-var-create - * debug

Error message from debugger back end:

-var-create: unable to create variable object

2) Failed to execute MI command:

-var-create - * debug

Error message from debugger back end:

-var-create: unable to create variable object

3) Failed to execute MI command:

-data-evaluate-expression debug

Error message from debugger back end:

No symbol "debug" in current context.

4) Failed to execute MI command:

-var-create - * debug

Error message from debugger back end:

-var-create: unable to create variable object

5) Unable to create variable object

Hello,

Thanks for your answer,

Here are the compilation lines of the 2 libraries and the global application (i guess better than the makefile for you).

However, it seems that my issue finally only occurs when i enable the systick. Any idea ?

"Did you have default interrupt handler handler?" Do you mean default or fault handlers ?

Thanks for your answer,

Thomas