Unsuccessfully trying to debug an UNO R4 Wifi

Hi
I am trying to step thru my simple blinky code on my R4 Wifi board. I am getting the following error:
[2025-02-13T19:52:10.882Z] SERVER CONSOLE DEBUG: onBackendConnect: gdb-server session connected. You can switch to "DEBUG CONSOLE" to see GDB interactions.
"C:\Users\username\AppData\Local\Arduino15\packages\arduino\tools\openocd\0.11.0-arduino2/bin/openocd" -c "gdb_port 50000" -c "tcl_port 50001" -c "telnet_port 50002" -s "c:\Users\RobertOujesky\AppData\Local\Temp\.arduinoIDE-unsaved2025113-9800-1saarwv.3xb1\sketch_feb13a" -f "C:/Program Files/Arduino IDE/resources/app/plugins/cortex-debug/extension/support/openocd-helpers.tcl" -f interface/cmsis-dap.cfg -f "C:\Users\RobertOujesky\AppData\Local\Arduino15\packages\arduino\hardware\renesas_uno\1.3.2/debugger/select_swd.cfg" -f "C:\Users\RobertOujesky\AppData\Local\Arduino15\packages\arduino\hardware\renesas_uno\1.3.2/debugger/R7FA4M1AB.cfg"
Open On-Chip Debugger 0.11.0+dev-gab95bac57-dirty (2021-05-11-10:45)
Licensed under GNU GPL v2
For bug reports, read
OpenOCD: Bug Reporting
CDRTOSConfigure
swd
adapter speed: 1000 kHz

Info : Listening on port 50001 for tcl connections
Info : Listening on port 50002 for telnet connections
Info : Using CMSIS-DAPv2 interface with VID:PID=0x2e8a:0x000c, serial=E6633861A3533838
Info : CMSIS-DAP: SWD Supported
Info : CMSIS-DAP: FW Version = 2.0.0
Info : CMSIS-DAP: Interface Initialised (SWD)
Info : SWCLK/TCK = 0 SWDIO/TMS = 0 TDI = 0 TDO = 0 nTRST = 0 nRESET = 0
Info : CMSIS-DAP: Interface ready
Info : clock speed 1000 kHz
Error: Error connecting DP: cannot read IDR

[2025-02-13T19:52:14.682Z] SERVER CONSOLE DEBUG: onBackendConnect: gdb-server session closed
GDB server session ended. This terminal will be reused, waiting for next session to start...

I am running Windows 11 2.3.4 of the IDE
I have the board connected to my laptop with a usb cable. I can successfully upload the sketch, just cannot use the debug feature.
My assumption is that I do not need a probe, that the board already has that....
Thanks for any advice.

Have you followed these instructions?

Thanks for the reply.
Yes. I am doing all that and I get to the last step "Start Debugging" and when i press the debug icon, I get the posted messages in the gdb-server window. The last one is:
Error: Error connecting DP: cannot read IDR

thanks!

Fixed!
the problem is my USB hub. Once I unplugged it from the hub and directly into my laptop, I am able to debug and step. :slight_smile:
thanks all!

Next challenge is that I want to use visual studio and VGDB. Let's see how that goes

1 Like

I do not use openocd, but I use the Arduino IDE 2.3.4. Following the instructions in the link I provided above, I can set breakpoints and interact with the R4 WiFi.

The IDE uses openocd.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.