Add another JTAG config found in andre-richter tutorials
* See https://github.com/rust-embedded/rust-raspi3-OS-tutorials/pull/17 * See https://github.com/rust-embedded/rust-raspi3-OS-tutorials/tree/JTAG However, https://github.com/rust-embedded/rust-raspi3-OS-tutorials/blob/JTAG/docker/raspi3-openocd/rpi3.cfg is actually a SUSE version.
This commit is contained in:
parent
76dca06039
commit
bf6d3f7f16
5
Makefile
5
Makefile
|
@ -86,7 +86,10 @@ hopper: all
|
||||||
hopperv4 -l RAW --base-address 0x80000 --entrypoint 0x80000 --file-offset 0 --aarch64 -e kernel8.img
|
hopperv4 -l RAW --base-address 0x80000 --entrypoint 0x80000 --file-offset 0 --aarch64 -e kernel8.img
|
||||||
|
|
||||||
openocd:
|
openocd:
|
||||||
$(OPENOCD) -f interface/jlink.cfg -f ./doc/rpi3_jlink.cfg
|
$(OPENOCD) -f interface/jlink.cfg -f ./doc/rpi3_jlink_suse.cfg
|
||||||
|
|
||||||
|
openocd_naotako:
|
||||||
|
$(OPENOCD) -f interface/jlink.cfg -f ./doc/rpi3_jlink_naotako.cfg
|
||||||
|
|
||||||
gdb: kernel8.img
|
gdb: kernel8.img
|
||||||
make nm | grep _SEGGER_RTT | awk '{print $$1}' | ./make-gdb-connect.sh
|
make nm | grep _SEGGER_RTT | awk '{print $$1}' | ./make-gdb-connect.sh
|
||||||
|
|
|
@ -0,0 +1,46 @@
|
||||||
|
#
|
||||||
|
# Docker image naotaco/openocd:armv8 configures JTAG similar to this
|
||||||
|
# Extracted via:
|
||||||
|
# $ docker run --rm naotaco/openocd:armv8 /bin/sh -c "cat /usr/local/share/openocd/scripts/target/rpi3.cfg"
|
||||||
|
#
|
||||||
|
transport select jtag
|
||||||
|
|
||||||
|
# we need to enable srst even though we don't connect it
|
||||||
|
reset_config trst_and_srst
|
||||||
|
|
||||||
|
adapter_khz 4000
|
||||||
|
jtag_ntrst_delay 500
|
||||||
|
|
||||||
|
if { [info exists CHIPNAME] } {
|
||||||
|
set _CHIPNAME $CHIPNAME
|
||||||
|
} else {
|
||||||
|
set _CHIPNAME rpi3
|
||||||
|
}
|
||||||
|
|
||||||
|
#
|
||||||
|
# Main DAP
|
||||||
|
#
|
||||||
|
if { [info exists DAP_TAPID] } {
|
||||||
|
set _DAP_TAPID $DAP_TAPID
|
||||||
|
} else {
|
||||||
|
set _DAP_TAPID 0x4ba00477
|
||||||
|
}
|
||||||
|
|
||||||
|
jtag newtap $_CHIPNAME dap -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id $_DAP_TAPID -enable
|
||||||
|
|
||||||
|
set _TARGETNAME $_CHIPNAME.cpu
|
||||||
|
|
||||||
|
set DBGBASE {0x80010000 0x80012000 0x80014000 0x80016000}
|
||||||
|
set CTIBASE {0x80018000 0x80019000 0x8001a000 0x8001b000}
|
||||||
|
set _cores 4
|
||||||
|
|
||||||
|
for { set _core 0 } { $_core < $_cores } { incr _core } {
|
||||||
|
|
||||||
|
target create $_TARGETNAME.$_core aarch64 \
|
||||||
|
-chain-position $_CHIPNAME.dap -coreid $_core \
|
||||||
|
-dbgbase [lindex $DBGBASE $_core] -ctibase [lindex $CTIBASE $_core]
|
||||||
|
}
|
||||||
|
|
||||||
|
# In contrast with SUSE config, naotaco only configures core0 events
|
||||||
|
$_TARGETNAME.0 configure -event reset-assert-post "aarch64 dbginit"
|
||||||
|
$_TARGETNAME.0 configure -event gdb-attach { halt }
|
|
@ -1,3 +1,6 @@
|
||||||
|
#
|
||||||
|
# https://www.suse.com/c/debugging-raspberry-pi-3-with-jtag/ configures JTAG like this
|
||||||
|
#
|
||||||
transport select jtag
|
transport select jtag
|
||||||
|
|
||||||
# we need to enable srst even though we don't connect it
|
# we need to enable srst even though we don't connect it
|
Loading…
Reference in New Issue