cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to configure OpenOCD for remote debugging.

DKapu.2
Associate

I am working on a system designed on stm32mp157c mpu. I am trying to setup a remote debugging setup wherein I am running an openocd debugger script on this stm32mp1 mpu. The target I am debugging is an stm32f405 discovery board, which is connected to the mpu via stlink/V2 in-circuit debugger using SWD. Finally, I will be connecting to the debugger on my remote PC through CubeIDE using the 'Connect to remote GDB server port'.

I was successful in creating the openocd environment at the stm32mp1 end, however, connecting to this via CubeIDE gave me an error.

---------------------------------------------

xPack OpenOCD armhf Open On-Chip Debugger 0.11.0+dev (2021-10-16-21:24)

Licensed under GNU GPL v2

For bug reports, read

http://openocd.org/doc/doxygen/bugs.html

debug_level: 2

Warn : Interface already configured, ignoring

Error: already specified hl_layout stlink

Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD

srst_only separate srst_nogate srst_open_drain connect_deassert_srst

Info : Listening on port 6666 for tcl connections

Info : Listening on port 4444 for telnet connections

Info : clock speed 2000 kHz

Info : STLINK V2J41S7 (API v2) VID:PID 0483:3748

Info : Target voltage: 2.897580

Info : stm32f4x.cpu: Cortex-M4 r0p1 processor detected

Info : stm32f4x.cpu: target has 6 breakpoints, 4 watchpoints

Info : starting gdb server for stm32f4x.cpu on 3333

Info : Listening on port 3333 for gdb connections

Info : accepting 'gdb' connection on tcp/3333

Info : device id = 0x100f6413

Info : flash size = 1024 kbytes

Info : flash size = 512 bytes

invalid command name "ReadAPEx"

Info : dropped 'gdb' connection

--------------------------------------------------

I have ensured the connections on the stlink side and the configuration on the CubeIDE. Can anyone help me figure out why is this issue happening? Is it related to the openocd version I am using or something else?

TIA.

2 REPLIES 2
Olivier GALLIEN
ST Employee

Hi @DKapu.2​ ,

your setup looks quite unusual and unclear for me.

I understand you try to debug the F4 from the MPU board ?

Why this setup rather than directly connects the F4 on Host PC ?

On which core of the MP1 openOCD is running A7 or M4 ?

Engi boot or production boot ?

Can you please further elaborate and provide more details ? a draw would be perfect.

Olivier

Olivier GALLIEN
In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
Neolithic
Associate III

Hi,

 

I am facing an exact same issue with my STM32F407 while trying to debug it using remote OpenOCD. Here is my OpenOCD messages.

 

Info : BCM2835 GPIO JTAG/SWD bitbang driver
Info : clock speed 2002 kHz
Info : SWD DPIDR 0x2ba01477
Info : stm32f4x.cpu: hardware has 6 breakpoints, 4 watchpoints
Info : starting gdb server for stm32f4x.cpu on 3300
Info : Listening on port 3300 for gdb connections
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x08036758 msp: 0x10010000
Info : Listening on port 6600 for tcl connections
Info : Listening on port 4400 for telnet connections
Info : accepting 'gdb' connection on tcp/3300
Info : device id = 0x10076413
Info : flash size = 512 kbytes
Info : flash size = 512 bytes
invalid command name "ReadAPEx"
Info : dropped 'gdb' connection

 

Were you able to fix the problem? If so, then can you please guide me too.

 

Regards,

Junaid