jtag tools: some factorisation

This commit is contained in:
Philippe Teuwen 2019-07-10 22:35:29 +02:00
commit 4bd15d900b
12 changed files with 29 additions and 32 deletions

View file

@ -0,0 +1,3 @@
# Ports
telnet_port 4444
gdb_port 3333

View file

@ -1,7 +1,3 @@
# Ports
telnet_port 4444
gdb_port 3333
# Commands specific to the Olimex ARM-USB-OCD Dongle
interface ft2232
ft2232_device_desc "Olimex OpenOCD JTAG"

View file

@ -1,7 +1,3 @@
# Ports
telnet_port 4444
gdb_port 3333
# Commands specific to the Bus Blaster
interface ftdi
ftdi_device_desc "Dual RS232-HS"

View file

@ -1,7 +1,3 @@
# Ports
telnet_port 4444
gdb_port 3333
# Commands specific to the BusPirate
interface buspirate
buspirate_port /dev/ttyUSB0

View file

@ -1,7 +1,3 @@
# Ports
telnet_port 4444
gdb_port 3333
# Commands specific to the Segger J-Link
interface jlink
transport select jtag

View file

@ -1,7 +1,3 @@
# Ports
telnet_port 4444
gdb_port 3333
# Commands specific to the Amontec JTAGKey
interface ft2232
ft2232_device_desc "Amontec JTAGkey A"

View file

@ -1,7 +1,3 @@
# Ports
telnet_port 4444
gdb_port 3333
# Commands specific to the Shikra
interface ftdi
transport select jtag

View file

@ -1,6 +1,3 @@
telnet_port 4444
gdb_port 3333
# Commands specific to the Wiggler
interface parport
parport_port 0x378

View file

@ -0,0 +1,7 @@
CONFIG_GEN=general.cfg
CONFIG_CHIP=chip-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

View file

@ -0,0 +1,9 @@
#!/bin/bash
. openocd_configuration || exit 1
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"

View file

@ -1,12 +1,9 @@
#!/bin/bash
# Example using Segger Jlink:
CONFIG_CHIP=chip-at91sam7s.cfg
CONFIG_IF=interface-jlink.cfg
IMAGE=../../recovery/proxmark3_recovery.bin
. openocd_configuration || exit 1
if [ ! -e "$IMAGE" ]; then
echo "$IMAGE missing. Abort!"
exit 1
fi
openocd -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_CHIP -c "init;halt;flash erase_sector 0 0 15;flash erase_sector 1 0 15;flash write_image $IMAGE 0x100000;exit"

View file

@ -0,0 +1,8 @@
#!/bin/bash
. openocd_configuration || exit 1
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