Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 7604

Troubleshooting • RPI5 OpenOCD Reset Does Not Work

$
0
0
Hello, I am debugging a bare metal project running on a Raspberry Pi 5 with the Raspberry Pi Debug Probe, OpenOCD, and GDB. I am trying to run monitor reset halt in GDB, to tell OpenOCD to reset the Raspberry Pi 5, but it doesn't do anything for me. Initially I was getting the error Error: bcm2712.cpu0: how to reset? when I ran monitor reset halt, so I added reset_config trst_and_srst trst_pulls_srst to my OpenOCD config file. Now I don't get an error, but I still don't get any results (the device does not reset after the command is ran).

How do I properly setup OpenOCD so I can reset the device with monitor reset halt? My current config file is the only OpenOCD config file that I have setup, and I used a combination of online resources and the OpenOCD User's Guide to do so. I am more of a software person, and my understanding of hardware is a little hazy. Any advice is greatly appreciated!

My OpenOCD command and the output it generates are shown below.

Code:

openocd --file openocd/cmsis-dap.cfg --file openocd/openocd_raspi5.cfg &gdb-multiarch \-ex "file symbols.elf" \-ex "b _start" \-ex "target extended-remote :3333"Open On-Chip Debugger 0.12.0Licensed under GNU GPL v2For bug reports, readhttp://openocd.org/doc/doxygen/bugs.htmlInfo : Hardware thread awareness createdInfo : Hardware thread awareness createdInfo : Hardware thread awareness createdInfo : Hardware thread awareness createdRunning SMP Command: target smp bcm2712.cpu0 bcm2712.cpu1 bcm2712.cpu2 bcm2712.cpu3Info : Listening on port 6666 for tcl connectionsInfo : Listening on port 4444 for telnet connectionsInfo : Using CMSIS-DAPv2 interface with VID:PID=0x2e8a:0x000c, serial=E6633861A32A5938Info : CMSIS-DAP: SWD supportedInfo : CMSIS-DAP: Atomic commands supportedInfo : CMSIS-DAP: Test domain timer supportedInfo : CMSIS-DAP: FW Version = 2.0.0Info : CMSIS-DAP: Interface Initialised (SWD)Info : SWCLK/TCK = 0 SWDIO/TMS = 0 TDI = 0 TDO = 0 nTRST = 0 nRESET = 0Info : CMSIS-DAP: Interface readyInfo : clock speed 4000 kHzInfo : SWD DPIDR 0x2ba01477Info : bcm2712.cpu0: hardware has 6 breakpoints, 4 watchpointsInfo : bcm2712.cpu1: hardware has 6 breakpoints, 4 watchpointsInfo : bcm2712.cpu2: hardware has 6 breakpoints, 4 watchpointsInfo : gdb port disabledInfo : starting gdb server for bcm2712.cpu0 on 3333Info : Listening on port 3333 for gdb connectionsRemote debugging using :3333Info : accepting 'gdb' connection on tcp/3333Info : bcm2712.cpu0 cluster 0 core 0 multi coreInfo : bcm2712.cpu1 cluster 1 core 0 multi corebcm2712.cpu1 halted in AArch64 state due to debug-request, current mode: EL3Hcpsr: 0x800002cd pc: 0x1adcMMU: disabled, D-Cache: disabled, I-Cache: enabledInfo : bcm2712.cpu2 cluster 2 core 0 multi corebcm2712.cpu2 halted in AArch64 state due to debug-request, current mode: EL3Hcpsr: 0x800002cd pc: 0x1adcMMU: disabled, D-Cache: disabled, I-Cache: enabledInfo : bcm2712.cpu3 cluster 3 core 0 multi corebcm2712.cpu3 halted in AArch64 state due to debug-request, current mode: EL3Hcpsr: 0x800002cd pc: 0x1adcMMU: disabled, D-Cache: disabled, I-Cache: enabledbcm2712.cpu0 halted in AArch64 state due to debug-request, current mode: EL2Hcpsr: 0x000003c9 pc: 0x80000MMU: disabled, D-Cache: disabled, I-Cache: disabledInfo : New GDB Connection: 1, Target bcm2712.cpu0, state: halted0x0000000000080000 in _start ()

Statistics: Posted by Raspberry_Confused — Tue Apr 15, 2025 7:44 pm



Viewing all articles
Browse latest Browse all 7604

Trending Articles