Skip to main content
Visitor II
January 27, 2021
Question

Errors while debugging a project in STM32CubeIDE

  • January 27, 2021
  • 15 replies
  • 14018 views

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

    This topic has been closed for replies.

    15 replies

    TKopp.67Author
    Visitor II
    January 27, 2021

    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.67Author
    Visitor II
    January 27, 2021

    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.

    ST Employee
    January 28, 2021

    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.67Author
    Visitor II
    January 28, 2021

    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

    TKopp.67Author
    Visitor II
    January 28, 2021

    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

    Visitor II
    January 29, 2021

    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?

    Visitor II
    January 29, 2021

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

    TKopp.67Author
    Visitor II
    January 29, 2021

    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

    Visitor II
    January 29, 2021

    This external library is also use nano lib? this is c++ library? etc.

    Yes, i ask about default handler, systick? Strange, but i wil be hard to find. I don't like to create libraries *.a.

    TKopp.67Author
    Visitor II
    January 29, 2021

    I don't have the sources of this library so i removed it from the project (as it's not compiled with debug flags).

    I am sorry but what you mean by default handler ? we use them as defined in the libopencm3. Yes, if i enable the systick interrupt i get my error. But the strange thing is that when i put a break point in the systick interrupt handler the execution never stops inside. But my application is running normally which means systick works but the debugger can't put breakpoint inside and gets lost after that.

    TKopp.67Author
    Visitor II
    January 29, 2021

    And sorry now i am free to answer you as soon as you ask me something. I was wondering if it could be the libopencm3 as it uses a different linker.

    (cortex-m-generic from libopencm3) and STM32F405RFTX_FLASH.ld from stm32cubeIDE autogenerated.

    Visitor II
    January 29, 2021

    section for irq table seems be have different names , LD script must be complementary with startup file and irq vector table file.

    TKopp.67Author
    Visitor II
    January 29, 2021

    So you think if in my ld script and the libopencm3 .ld i fix the names it should maybe work ? and that this may be my problem ?

    Visitor II
    January 29, 2021

    Seems looks you get 2 irq vectors, i'm not familiar with this library.

    TKopp.67Author
    Visitor II
    January 29, 2021

    Well just we use our 0_sys/stm32f4-ECG.ld which refer only to cortex-m-generic.ld in the libopencm3 those are the only one we use for the overall project. The other one is just an example of the one that is automatically generated for a project with this microcontroller but i don't use it in my project. So why do you say 2 vector tables ?

    What do you mean exactly by cleaning my project structure, isn't it okay ? :D

    Sorry i am pretty new with this environment and don't understand maaaany stuffs !

    all my interrupts are working on the application just the debugger is lost.

    Visitor II
    January 29, 2021

    If this is a problem, but names correction isn't solution.

    I strongly recomends to clean you project structure.