2020-01-25 4:22 PM
The debugger is getting stuck on a random line about 350 lines into main(). There is nothing particular about this line of source code except its location, because if I comment out that line it just stops on the next one, and if I add a line it stops earlier. When the debugger is not active, the source runs just fine without stopping in that area. I have deleted all breakpoints and watchpoints. I have set the optimizations to "off". When the debugger is stuck on that line, its status is "running."
This is my first time debugging this project after converting from TrueStudio. I may need to switch back if I can't find anything else to try.
Any suggestions?
2023-02-28 11:32 PM
I got stuck with this same problem today - After trying to add too many breakpoints.
The fix was:
I suspect there is a breakpoint register somewhere in the core that the debugger "forgets" about, and it needs a power cycle to clear that register.
2024-07-31 2:32 AM
It worked for me: Made Clean and compile again
2025-11-06 1:38 PM
It's Baa-aaack.
Power cycling my prototype didn't help. Rolling back the code to the previous commit that I had been troubleshooting fine didn't help. Going back one more commit also didn't help.
I decided to copy the project into a new project within my workspace. First it got to the start of main but then terminated the session when I tried to reset. Without changing anything, I tried again and now the console says "lost connection" and I'm getting a dialog box saying "Failed to Enable Live Expressions"
After a re-start of the IDE, I re-started the debug session, and this time after it stopped at home, I hit continue, and then watched it stop at a random spot in the code a few hundred lines down. There are no breakpoints enabled.
I tried to reset and there was no response. Then I tried continue and the debugger shut down.
Next I'm going to try copying my project into a brand new workspace
2025-11-07 8:06 AM
I made a new workspace, and started a new project from the .ioc file. Generating bare code from that allowed debugging.
Then I copied my code from Core and the USB and BLE folders, re-installed eGIT, and compiled my code.
Now I started a debugging session, and it started on on main ok, but then when I reset again, it put the breakpoint further down in my code where I had no breakpoint. Clicking continue killed the debug session.
I decided to try again, after rebuilding code from the .ioc. I'm getting the same thing, where it starts out o.k., breaking on the first statement in main. But then I hit continue and it breaks about 50 lines down, where I don't have any breakpoint. I click reset again, and it takes me to that same spot. I hit continue, and the debugging session is killed again with "GdbSession, Lost target connection, Exiting..."
2025-11-07 9:04 AM
I'm starting over with the new workspace to see at what point things start to go wrong.
I quit the IDE and deleted everything in the workspace folder except the .ioc file. That includes the .metadata folder. Then I made a new project from the .ioc file.
I generated code, and it compiles.
I made a new debug configuration for the debug build and started a debug session. It starts at the right place. I can add breakpoints and get rid of them and all debugging is working.
Next I modified the FLASH.ld file to accommodate OTA, using examdiffpro to copy the relelvant parts from my working file on another program.
I did a clean and refresh and re-built.
Now I'm getting the "Break at address "0x800277e" with no debug information available, or outside of program code." message.
I'm using CubeProg to make sure that my OTA application is still installed correctly. I bet it's not. I did a full chip erase, and checked the stack. It was 1.19. I think I want the 1.20 version, so I tried to program that from the repository. I got a bunch of errors. Next I tried to re-program the FUS with 1.20, and got a data read failure. Next I tried a full chip erase again and got a failure there too, with the message to check flash protection. It disconnected. so I re-connected and was able to read the regular flash memory. Back to the firmware upgrade services, and it's reading fine. Read FUS infos gives FUS version 1.2.0.0 and stack version 1.22.0.2. I started the stack successfully and disconnected.
Back to the IDE. Now it halted correctly at the start of Main. But when I reset, it goes into the weeds, with "Break at address "0x8000b80" with no debug information available, or outside of program code."
I added "set $pc=Reset_Handler" to my reset configuration, and now it seems to halt in the right place when I click reset. However, when I continue, it goes off into the weeds after trying to start USB, after "HAL_PCD_Start(). I have a project that works with USB and BLE together, but I don't know what the key to success is. Based on what I have seen, it looks like the code generated from the .ioc, when it includes USB, is not compatible with the shifted start position necessary for OTA. I'll try re-generating code from the .ioc again. It's still getting stuck at USB init.
Here's where I may need to make a support ticket because this is all just autogenerated code that's not working with the mods needed for OTA.