Debugging H5 and/or H7 from within Arduino IDE: Can't get it to work
Posted: Fri Jul 18, 2025 1:50 pm
I've been pulling my hair out over this... all I want to do is debug my code from within the Arduino IDE.
I tried this on my H523. After adding the section to boards.txt and adding a linker script, I can build/compile/upload no problem. When trying to debug though, I'm running into a bunch of issues. (Please note that debugging from CubeIDE works fine)
When trying to debug though, I'm ran into a few issues: The boards.txt entry that came with stm32duino was missing an entry for openocd.target, that was an easy fix. But it's also missing a .cfg file (I copied it from CubeIDE) and also missing gdb_helper.tcl (which is referenced in the .cfg file).
Now, when I start to debug, it is complaining that there is no flash-driver for the STM32H5x
I'm a complete noob to openocd but it seems that the openocd binary that ST uses in CubeIDE (where debugging works fine) is a customized version (that, presumably, knows how to flash H5 MCUs).
I'm about to switch to a H7 MCU (waiting for part), my question is: Am I also going to run into issues trying to debug from Arduino? To put it in a less optimistic way: Does debugging H5 and/or H7 MCUs from Arduino even work?
I tried this on my H523. After adding the section to boards.txt and adding a linker script, I can build/compile/upload no problem. When trying to debug though, I'm running into a bunch of issues. (Please note that debugging from CubeIDE works fine)
When trying to debug though, I'm ran into a few issues: The boards.txt entry that came with stm32duino was missing an entry for openocd.target, that was an easy fix. But it's also missing a .cfg file (I copied it from CubeIDE) and also missing gdb_helper.tcl (which is referenced in the .cfg file).
Now, when I start to debug, it is complaining that there is no flash-driver for the STM32H5x
I'm a complete noob to openocd but it seems that the openocd binary that ST uses in CubeIDE (where debugging works fine) is a customized version (that, presumably, knows how to flash H5 MCUs).
I'm about to switch to a H7 MCU (waiting for part), my question is: Am I also going to run into issues trying to debug from Arduino? To put it in a less optimistic way: Does debugging H5 and/or H7 MCUs from Arduino even work?