Not sure whether bumping this thread was the right thing to do since it feels like I'm hijacking it, but on the other hand having two threads regarding the same subject on the same forum also felt weird, and since the discussion here seems to have ran its course, I decided to bump.
I'm trying to figure out a way to output HDMI audio from a Raspberry Pi 4 as I mentioned in another thread, and since so far my attempts have been fruitless I was hoping that with a Raspberry Pi 5 and its debug probe I could insert some watch points to try finding out how Linux does it, as the interface seems similar enough. However I'm pretty new to hardware debugging, as my bare metal project has been using print debugging all along, and on top of that I'm also totally blind which makes connecting things to the GPIO pins a huge adventure and is the main reason why I' not using JTAG on the Raspberry Pi 4 instead.
Hoping that setting up a debugging session would be easy, I installed OpenOCD on another Raspberry Pi, connected the probe to it, and used the configuration below (which originates in this thread but I changed slightly because the copy I downloaded had an error on line 40), however now I'm getting an error that is exactly the same regardless of whether the probe is actually connected to the Pi 5 or not.
The following is the config that I'm using:
And the following is the output that I get from OpenOCD with the target Raspberry Pi 5 booted normally into Linux:
So my questions are:
1. When the official debug probe has the Micro USB port pointing towards me and the components are facing me, is the SWD connector on the left or right side??
2. I appended the enable_jtag_gpio=1 line to /boot/firmware/config.txt on the target Raspberry Pi 5, but since Linux is running normally, do I need to reconfigure the GPIO inside Linux?
I'm trying to figure out a way to output HDMI audio from a Raspberry Pi 4 as I mentioned in another thread, and since so far my attempts have been fruitless I was hoping that with a Raspberry Pi 5 and its debug probe I could insert some watch points to try finding out how Linux does it, as the interface seems similar enough. However I'm pretty new to hardware debugging, as my bare metal project has been using print debugging all along, and on top of that I'm also totally blind which makes connecting things to the GPIO pins a huge adventure and is the main reason why I' not using JTAG on the Raspberry Pi 4 instead.
Hoping that setting up a debugging session would be easy, I installed OpenOCD on another Raspberry Pi, connected the probe to it, and used the configuration below (which originates in this thread but I changed slightly because the copy I downloaded had an error on line 40), however now I'm getting an error that is exactly the same regardless of whether the probe is actually connected to the Pi 5 or not.
The following is the config that I'm using:
Code:
# SPDX-License-Identifier: GPL-2.0-or-later# The Broadcom BCM2712 used in Raspberry Pi 5# No documentation was found on Broadcom website# Partial information is available in Raspberry Pi website:# https://www.raspberrypi.com/documentation/computers/processors.html#bcm2712# v1.0 initial revision - trejan on forums.raspberrypi.comif { [info exists CHIPNAME] } { set _CHIPNAME $CHIPNAME} else { set _CHIPNAME bcm2712}if { [info exists CHIPCORES] } { set _cores $CHIPCORES} else { set _cores 4}if { [info exists USE_SMP] } { set _USE_SMP $USE_SMP} else { set _USE_SMP 0}if { [info exists DAP_TAPID] } { set _DAP_TAPID $DAP_TAPID} else { set _DAP_TAPID 0x4ba00477}transport select swdswd newdap $_CHIPNAME cpu -expected-id $_DAP_TAPID -irlen 4adapter speed 4000dap create $_CHIPNAME.dap -chain-position $_CHIPNAME.cpu# MEM-AP for direct accesstarget create $_CHIPNAME.ap mem_ap -dap $_CHIPNAME.dap -ap-num 0# these addresses are obtained from the ROM table via 'dap info 0' commandset _DBGBASE {0x80010000 0x80110000 0x80210000 0x80310000}set _CTIBASE {0x80020000 0x80120000 0x80220000 0x80320000}set _smp_command "target smp"for { set _core 0 } { $_core < $_cores } { incr _core } { set _CTINAME $_CHIPNAME.cti$_core set _TARGETNAME $_CHIPNAME.cpu$_core cti create $_CTINAME -dap $_CHIPNAME.dap -ap-num 0 -baseaddr [lindex $_CTIBASE $_core] target create $_TARGETNAME aarch64 -dap $_CHIPNAME.dap -ap-num 0 -dbgbase [lindex $_DBGBASE $_core] -cti $_CTINAME set _smp_command "$_smp_command $_TARGETNAME"}if {$_USE_SMP} { eval $_smp_command}# default target is cpu0targets $_CHIPNAME.cpu0
Code:
jps@raspberrypi:~ $ sudo openocd --file interface/cmsis-dap.cfg --file raspi5.cfgOpen On-Chip Debugger 0.12.0Licensed under GNU GPL v2For bug reports, readhttp://openocd.org/doc/doxygen/bugs.htmlInfo : Listening on port 6666 for tcl connectionsInfo : Listening on port 4444 for telnet connectionsInfo : Using CMSIS-DAPv2 interface with VID:PID=0x2e8a:0x000c, serial=E6614103E7486325Info : 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 kHzError: Error connecting DP: cannot read IDR
1. When the official debug probe has the Micro USB port pointing towards me and the components are facing me, is the SWD connector on the left or right side??
2. I appended the enable_jtag_gpio=1 line to /boot/firmware/config.txt on the target Raspberry Pi 5, but since Linux is running normally, do I need to reconfigure the GPIO inside Linux?
Statistics: Posted by Fridux — Mon Apr 22, 2024 10:20 pm