From 7faf26cbac40b6617b1de7ed235240538db439a2 Mon Sep 17 00:00:00 2001 From: Berkus Decker Date: Fri, 1 Feb 2019 10:15:44 +0200 Subject: [PATCH] Add revision 1 of openocd configs - not working --- doc/rpi3_interface.cfg | 20 ++++++++++++++++++++ doc/rpi3_target.cfg | 25 +++++++++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 doc/rpi3_interface.cfg create mode 100644 doc/rpi3_target.cfg diff --git a/doc/rpi3_interface.cfg b/doc/rpi3_interface.cfg new file mode 100644 index 0000000..42e3e80 --- /dev/null +++ b/doc/rpi3_interface.cfg @@ -0,0 +1,20 @@ +# Broadcom 2835 on Raspberry Pi as JTAG host + +interface bcm2835gpio + +bcm2835gpio_peripheral_base 0x3F000000 + +# Transition delay calculation: SPEED_COEFF/khz - SPEED_OFFSET +# These depend on system clock, calibrated for stock 700MHz +# bcm2835gpio_speed SPEED_COEFF SPEED_OFFSET +bcm2835gpio_speed_coeffs 146203 36 + +# Each of the JTAG lines need a gpio number set: tck tms tdi tdo +# Header pin numbers: 23 22 19 21 +bcm2835gpio_jtag_nums 11 25 10 9 + +# If you define trst or srst, use appropriate reset_config +# Header pin numbers: TRST - 26, SRST - 12 + +bcm2835gpio_trst_num 7 +reset_config trst_only diff --git a/doc/rpi3_target.cfg b/doc/rpi3_target.cfg new file mode 100644 index 0000000..3195679 --- /dev/null +++ b/doc/rpi3_target.cfg @@ -0,0 +1,25 @@ +# Broadcom 2835 on Raspberry Pi as JTAG target + +telnet_port 4444 +gdb_port 5555 + +adapter_khz 1000 +transport select jtag + +if { [info exists CHIPNAME] } { +set _CHIPNAME $CHIPNAME +} else { +set _CHIPNAME rspi +} + +if { [info exists CPU_TAPID ] } { +set _CPU_TAPID $CPU_TAPID +} else { +set _CPU_TAPID 0x07b7617F +} + +jtag newtap $_CHIPNAME arm -irlen 5 -expected-id $_CPU_TAPID + +set _TARGETNAME $_CHIPNAME.arm +target create $_TARGETNAME arm11 -chain-position $_TARGETNAME +$_TARGETNAME configure -event gdb-attach { halt }