-
Notifications
You must be signed in to change notification settings - Fork 1k
cannot debug with openOCD in sloeber/eclipse #2280
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hi @MasteringTheMess Since this, the official way to debug is Arduino IDE 2 which support debug. |
Thanks for clarifying |
Made some progress on this and thought I'd share my findings - even though Sloeber is not officially supported
Now, all should run without error, but no source is shown! This is essentially what I described when starting this discussion here. Now, go to Project -> Properties -> Sloeber -> Compile Options and add -ggdb to append to C and C++ and run the freshly created Debug Configuration again (which takes an awful lot of time on windows because a complete build has to be done) The binary is downloaded to the µC and execution halts at the beginning of main() AND the corresponding source file is shown in the editor ! Happy debugging :) Credits go to Zach Wilcox over there on the Eclipse Forums for finding this back in 2018 |
Describe the bug
I am trying to activate debugging capabilities for STM32duino using sloeber, the arduino eclipse IDE.
I have latest sloeber 4.4.3 and latest STM32duino 2.7.1
I found that the instructions on the wiki are not quite up to date
As described below, I got the OCD server running and working somehow.
But, when I run the debug configuration, I get a lot of output and on start, the source code doeas not appear, but instead a window with a button to open disassembly.
Clearly, that is not what I expected...
the complete openOCD output:
manually set breakpoints get never hit
To Reproduce
I installed the GNU MCU plugin, though I was not able to deselect things as suggested in 1.1.1. Install OpenOCD from the GNU MCU Eclipse plug-ins
Following the instructions (blink example sketch, ...), i found that
${openocd_path}
had not been set at all.I searched my system and the only openocd.exe I found was stored in
, so I used this path and set it in Window -> Preferences -> MCU -> Global OpenOCD Path
Next difference to the wiki is, that I have a Nucleo-L4R5ZI, so I changed the config options to
As for the executable name,
${A.COMPILER.PATH}/arm-none-eabi-gdb
did not give a path, so I looked at the environment variables and found that${A.COMPILER.PATH}
does not exist in my installation.But I found another environment variable named
${compiler.path}
, so I used that.I set a breakpoint in the setup() function

Sloeber does not show the favourites menu, so I didn't bother activationg the buttons but run the debug session by right-clicking the project -> Debug As -> Debug configurations -> blink Release

when I now resume (F8) the breakpoint gets never reached or it is not active.
clicking suspend halts the target, but does not show code

some more lines appear under thread #1
I can stop & resume at will, but never get to see code, and the only change is that some more lines appear under Thread #1

And in the open OCd Debugger Console some messages appear on each halt

complete debugger console output:
The text was updated successfully, but these errors were encountered: