cancel
Showing results for 
Search instead for 
Did you mean: 

stlink_gdbserver gdb-multiarch

beattie
Associate II

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)

5 REPLIES 5
beattie
Associate II

This is on a Debian bookworm host.

Pavel A.
Evangelist III

Do you use the ST branch (or fork) of OpenOCD?

 

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?

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.