2025-03-27 11:22 AM
I'm trying to debug some embedded rust. I was using openocd (12) and gdb-multiarch. I currently using an stm32f3discovery. I've tried C with eclipse Embedded ARM and STM32CubeIDE and while STM32CubeIDE does work (validating my hardware) nothing else works reliably. I have tried using ST-LINK_gdbserver from the stm32cubeide installation with gdb-multiarch which give much the same results as openocd + gdbmultiarch. Below is a run from rust but C gives much the same results:
I start openocd which listens on :3333
I start gdb-multiarch:
$ gdb-multiarch -q target/thumbv7em-none-eabihf/debug/examples/hello -ex "target extended-remote :3333"
Reading symbols from target/thumbv7em-none-eabihf/debug/examples/hello...
Remote debugging using :3333
0x080005fc in ?? ()
(gdb) b main
Breakpoint 1 at 0x45c: file examples/hello.rs, line 11.
(gdb) c
Continuing.
^C
Program received signal SIGINT, Interrupt.
0x080005fc in ?? ()
(gdb)
2025-03-27 11:30 AM
This is on a Debian bookworm host.
2025-03-27 2:40 PM
Do you use the ST branch (or fork) of OpenOCD?
2025-03-27 4:47 PM
If your mean https://github.com/STMicroelectronics/OpenOCD I tried that as well in fact I just cloned and built branch openocd-cubeide-r6. I there a different one I could try?
2025-03-27 4:51 PM - edited 2025-03-27 5:00 PM
Yes that one. Can this be related to https://community.st.com/t5/others-stm32-mcus-related/problem-with-single-step-stm32f7/td-p/417538 ?
2025-04-01 4:30 PM
Not really since I can not execute at all either by stepping or "continue". I have received an stm32f3discovery board that mostly works though sometimes it fails under openocd (may be because the MCU is still running. SO I run gdb-multiarch against /opt/st/stm32cubeide_1.18.0/plugins/com.st.stm32cube.ide.mcu.externaltools.stlink-gdb-server.linux64_2.2.100.202501151542/tools/bin and then I can use openocd (from debian repo) again. I can't seen to get my other boards to work (stm32f429i-disco [not disc1 may be too old], stm32f746g-disco [openocd can't even find it], Nucleo F429). all the boards have updated stlink FW.