Update openocd configurations

This commit is contained in:
Philippe Teuwen 2021-02-04 13:10:29 +01:00
commit a065e21bed
15 changed files with 41 additions and 104 deletions

View file

@ -28,3 +28,5 @@ gdb_memory_map enable
sam7x.cpu configure -work-area-virt 0 -work-area-phys 0x00200000 -work-area-size 0x10000 -work-area-backup 0
flash bank sam7x.flash.0 at91sam7 0 0 0 0 sam7x.cpu 0 0 0 0 0 0 0 18432
flash bank sam7x.flash.1 at91sam7 0 0 0 0 sam7x.cpu 1 0 0 0 0 0 0 18432
transport select jtag
adapter speed 1000

View file

@ -1,8 +0,0 @@
# Commands specific to the Olimex ARM-USB-OCD Dongle
interface ft2232
ft2232_device_desc "Olimex OpenOCD JTAG"
ft2232_layout "olimex-jtag"
ft2232_vid_pid 0x15BA 0x0003
jtag_speed 2
jtag_nsrst_delay 200
jtag_ntrst_delay 200

View file

@ -1,10 +0,0 @@
# Commands specific to the Bus Blaster
interface ftdi
ftdi_device_desc "Dual RS232-HS"
ftdi_vid_pid 0x0403 0x6010
ftdi_layout_init 0x0c08 0x0f1b
ftdi_layout_signal nTRST -data 0x0100 -noe 0x0400
ftdi_layout_signal nSRST -data 0x0200 -noe 0x0800
adapter_khz 1000

View file

@ -1,10 +1,8 @@
# Commands specific to the BusPirate
interface buspirate
buspirate_port /dev/ttyUSB0
adapter_khz 1000
# Communication speed
buspirate_speed normal # or fast
source [find interface/buspirate.cfg]
buspirate_port /dev/ttyUSB0
# Voltage regulator: enabled = 1 or disabled = 0
buspirate_vreg 1

View file

@ -11,13 +11,4 @@
# Black <> GND
# Red <> 3.3 (don't connect if C232HM-EDSL-0! power via USB instead)
interface ftdi
#ftdi_device_desc "C232HM-DDHSL-0"
#ftdi_device_desc "C232HM-EDHSL-0"
ftdi_vid_pid 0x0403 0x6014
ftdi_layout_init 0x0008 0x400b
ftdi_layout_signal LED -ndata 0x4000
transport select jtag
adapter_khz 1000
source [find interface/ftdi/c232hm.cfg]

View file

@ -1,4 +0,0 @@
# Commands specific to the Segger J-Link
interface jlink
transport select jtag
adapter_khz 1000

View file

@ -1,8 +0,0 @@
# Commands specific to the Amontec JTAGKey
interface ft2232
ft2232_device_desc "Amontec JTAGkey A"
ft2232_layout jtagkey
ft2232_vid_pid 0x0403 0xcff8
jtag_khz 200
jtag_nsrst_delay 200
jtag_ntrst_delay 200

View file

@ -12,26 +12,7 @@
# 6 <> GND
# 1 <> 3.3
interface bcm2835gpio
# This file is meant for first versions of Raspberry Pi
# You can check yours with:
# dd if=/proc/device-tree/soc/ranges bs=4 skip=1 count=1 2>/dev/null|xxd -p
# if it returns 20000000, you're fine
# if it returns 3F000000, use interface-raspberrypi2.cfg
bcm2835gpio_peripheral_base 0x20000000
# 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 113714 28
# 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
source [find interface/raspberrypi-native.cfg]
bcm2835gpio_srst_num 18
reset_config srst_only srst_push_pull
transport select jtag
adapter_khz 1000

View file

@ -12,26 +12,7 @@
# 6 <> GND
# 1 <> 3.3
interface bcm2835gpio
# This file is meant for recent versions of Raspberry Pi
# You can check yours with:
# dd if=/proc/device-tree/soc/ranges bs=4 skip=1 count=1 2>/dev/null|xxd -p
# if it returns 20000000, use interface-raspberrypi.cfg
# if it returns 3F000000, you're fine
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
source [find interface/raspberrypi2-native.cfg]
bcm2835gpio_srst_num 18
reset_config srst_only srst_push_pull
transport select jtag
adapter_khz 1000

View file

@ -1,6 +0,0 @@
# Commands specific to the Shikra
interface ftdi
transport select jtag
ftdi_vid_pid 0x0403 0x6014
ftdi_layout_init 0x0c08 0x0f1b
adapter_khz 2000

View file

@ -1,7 +0,0 @@
# Commands specific to the Wiggler
interface parport
parport_port 0x378
parport_cable wiggler
jtag_speed 0
jtag_nsrst_delay 200
jtag_ntrst_delay 200

View file

@ -1,7 +1,34 @@
CONFIG_GEN=general.cfg
CONFIG_CHIP=chip-at91sam7s.cfg
CONFIG_BOARD=board-at91sam7s.cfg
IMAGE=../../recovery/proxmark3_recovery.bin
DUMP="dump_$(date +'%Y%m%d-%H%M%S').bin"
# Example using Segger Jlink:
CONFIG_IF=interface-jlink.cfg
# One can use openocd-provided interfaces or local interface files
# Here are a few examples
# Segger Jlink:
CONFIG_IF=interface/jlink.cfg
# Raspberry Pi models Pi1, Pi2 and Pi Zero (read interface-raspberrypi.cfg for pinout)
#CONFIG_IF=interface-raspberrypi.cfg
# Raspberry Pi models 2+ and above (read interface-raspberrypi2.cfg for pinout)
#CONFIG_IF=interface-raspberrypi2.cfg
# DP BusBlaster:
#CONFIG_IF=interface/ftdi/dp_busblaster.cfg
# BusPirate:
#CONFIG_IF=interface-buspirate.cfg
# C232HM-DDHSL-0 and C232HM-EDSL-0 (beware! read interface-c232hm.cfg instructions)
#CONFIG_IF=interface-c232hm.cfg
# Olimex ARM-USB-OCD Dongle:
#CONFIG_IF=interface/ftdi/olimex-arm-usb-ocd.cfg
# Amontec JTAGKey:
#CONFIG_IF=interface/ftdi/jtagkey.cfg
# Wiggler:
#CONFIG_IF=interface/parport.cfg

View file

@ -7,4 +7,4 @@ if [ -e "$DUMP" ]; then
echo "$DUMP exists already. Abort!"
exit 1
fi
openocd -f $CONFIG_GEN -f $CONFIG_IF -f $CONFIG_CHIP -c "init;halt;dump_image $DUMP 0x100000 0x80000;exit"
openocd -f $CONFIG_GEN -f $CONFIG_IF -f $CONFIG_BOARD -c "init;halt;dump_image $DUMP 0x100000 0x80000;exit"

View file

@ -7,4 +7,4 @@ if [ ! -e "$IMAGE" ]; then
echo "$IMAGE missing. Abort!"
exit 1
fi
openocd -f $CONFIG_GEN -f $CONFIG_IF -f $CONFIG_CHIP -c "init;halt;flash erase_sector 0 0 15;flash erase_sector 1 0 15;flash write_image $IMAGE 0x100000;exit"
openocd -f $CONFIG_GEN -f $CONFIG_IF -f $CONFIG_BOARD -c "init;halt;flash erase_sector 0 0 15;flash erase_sector 1 0 15;flash write_image $IMAGE 0x100000;exit"

View file

@ -6,4 +6,4 @@ cd $(dirname "$0")
echo "*********************************************"
echo "Connect to OpenOCD via: telnet localhost $(awk '/^telnet_port/{print$2}' $CONFIG_GEN)"
echo "*********************************************"
openocd -f $CONFIG_GEN -f $CONFIG_IF -f $CONFIG_CHIP
openocd -f $CONFIG_GEN -f $CONFIG_IF -f $CONFIG_BOARD