has anyone got debugging for STM32 working? #1630
-
I am trying to activate debugging capabilities for STM32duino I found that the instructions on the wiki are not quite up to date, but I roughly followed them with some modifications I installed the GNU MCU plugin, though I was not able to deselect things as suggested in the above linked wiki.
and set it in Window -> Preferences -> MCU -> Global OpenOCD Path As for the executable name, But, when I run the debug configuration, I get a lot of output and on start, the source code does not appear, but instead a window with a button to open disassembly. Not quite what I expected... Sadly, Sloeber is not supported by the official STM32 Arduino core |
Beta Was this translation helpful? Give feedback.
Replies: 13 comments 1 reply
-
A.COMPILER.PATH is from really old Sloeber when CDT uppercased all environment variables. gnu mcu has become part of the eclipse community and is now embedded C/C++ https://marketplace.eclipse.org/content/eclipse-embedded-cc Also note #1625 As to not supported. |
Beta Was this translation helpful? Give feedback.
-
Thanks! will give it a try |
Beta Was this translation helpful? Give feedback.
-
I just checked the envrionment variables and found this: looks kinda weird to me... |
Beta Was this translation helpful? Give feedback.
-
Looks normal to me. |
Beta Was this translation helpful? Give feedback.
-
this one:
|
Beta Was this translation helpful? Give feedback.
-
As this is in the platform.txt |
Beta Was this translation helpful? Give feedback.
-
seems they have found out already: |
Beta Was this translation helpful? Give feedback.
-
That is good. |
Beta Was this translation helpful? Give feedback.
-
absolutely understandable! Nevertheless your comments help me get an idea what is going on and - hopefully - to get debug running... I'm a bit short of time, but if I should manage to get a reproducible behaviour I'll keep you posted. |
Beta Was this translation helpful? Give feedback.
-
Made some progress on this and thought I'd share my findings
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 |
Beta Was this translation helpful? Give feedback.
-
at the time of writing it was like a "one of" and it only works in the exact way described. I didn't get my "old" installation of sloeber with the actual projects to correctly run debug. But yes, you are right, it is a success |
Beta Was this translation helpful? Give feedback.
-
I think this is default behaviour |
Beta Was this translation helpful? Give feedback.
-
Ah! Good to know, thanks |
Beta Was this translation helpful? Give feedback.
Made some progress on this and thought I'd share my findings
I started with a fresh install of Sloeber 4.4.3 product
then added STM32 platform from
then go to Help -> Install New Software and search for openOCD which yields exactly one result which I installed
create blink example for STM32 (Nucleo-L412KB in my case) with debug options enabled
Optimize on Debug (-Og) and Debug symbols and core logs set to Core logs and Symbols enabled(-g)
build project by hitting Ctrl-R (takes an awful lot of time on Windows - blessed are the Lunix-users ;) )
Then create a run/debug configuration by …