mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-19 13:00:42 -07:00
jtag tools: some factorisation
This commit is contained in:
parent
73bbb2e9e8
commit
4bd15d900b
12 changed files with 29 additions and 32 deletions
3
tools/jtag_openocd/general.cfg
Normal file
3
tools/jtag_openocd/general.cfg
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
# Ports
|
||||||
|
telnet_port 4444
|
||||||
|
gdb_port 3333
|
|
@ -1,7 +1,3 @@
|
||||||
# Ports
|
|
||||||
telnet_port 4444
|
|
||||||
gdb_port 3333
|
|
||||||
|
|
||||||
# Commands specific to the Olimex ARM-USB-OCD Dongle
|
# Commands specific to the Olimex ARM-USB-OCD Dongle
|
||||||
interface ft2232
|
interface ft2232
|
||||||
ft2232_device_desc "Olimex OpenOCD JTAG"
|
ft2232_device_desc "Olimex OpenOCD JTAG"
|
||||||
|
|
|
@ -1,7 +1,3 @@
|
||||||
# Ports
|
|
||||||
telnet_port 4444
|
|
||||||
gdb_port 3333
|
|
||||||
|
|
||||||
# Commands specific to the Bus Blaster
|
# Commands specific to the Bus Blaster
|
||||||
interface ftdi
|
interface ftdi
|
||||||
ftdi_device_desc "Dual RS232-HS"
|
ftdi_device_desc "Dual RS232-HS"
|
||||||
|
|
|
@ -1,7 +1,3 @@
|
||||||
# Ports
|
|
||||||
telnet_port 4444
|
|
||||||
gdb_port 3333
|
|
||||||
|
|
||||||
# Commands specific to the BusPirate
|
# Commands specific to the BusPirate
|
||||||
interface buspirate
|
interface buspirate
|
||||||
buspirate_port /dev/ttyUSB0
|
buspirate_port /dev/ttyUSB0
|
||||||
|
|
|
@ -1,7 +1,3 @@
|
||||||
# Ports
|
|
||||||
telnet_port 4444
|
|
||||||
gdb_port 3333
|
|
||||||
|
|
||||||
# Commands specific to the Segger J-Link
|
# Commands specific to the Segger J-Link
|
||||||
interface jlink
|
interface jlink
|
||||||
transport select jtag
|
transport select jtag
|
||||||
|
|
|
@ -1,7 +1,3 @@
|
||||||
# Ports
|
|
||||||
telnet_port 4444
|
|
||||||
gdb_port 3333
|
|
||||||
|
|
||||||
# Commands specific to the Amontec JTAGKey
|
# Commands specific to the Amontec JTAGKey
|
||||||
interface ft2232
|
interface ft2232
|
||||||
ft2232_device_desc "Amontec JTAGkey A"
|
ft2232_device_desc "Amontec JTAGkey A"
|
||||||
|
|
|
@ -1,7 +1,3 @@
|
||||||
# Ports
|
|
||||||
telnet_port 4444
|
|
||||||
gdb_port 3333
|
|
||||||
|
|
||||||
# Commands specific to the Shikra
|
# Commands specific to the Shikra
|
||||||
interface ftdi
|
interface ftdi
|
||||||
transport select jtag
|
transport select jtag
|
||||||
|
|
|
@ -1,6 +1,3 @@
|
||||||
telnet_port 4444
|
|
||||||
gdb_port 3333
|
|
||||||
|
|
||||||
# Commands specific to the Wiggler
|
# Commands specific to the Wiggler
|
||||||
interface parport
|
interface parport
|
||||||
parport_port 0x378
|
parport_port 0x378
|
||||||
|
|
7
tools/jtag_openocd/openocd_configuration.sample
Normal file
7
tools/jtag_openocd/openocd_configuration.sample
Normal 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
|
9
tools/jtag_openocd/openocd_flash_dump.sh
Executable file
9
tools/jtag_openocd/openocd_flash_dump.sh
Executable 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"
|
|
@ -1,12 +1,9 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Example using Segger Jlink:
|
. openocd_configuration || exit 1
|
||||||
CONFIG_CHIP=chip-at91sam7s.cfg
|
|
||||||
CONFIG_IF=interface-jlink.cfg
|
|
||||||
IMAGE=../../recovery/proxmark3_recovery.bin
|
|
||||||
|
|
||||||
if [ ! -e "$IMAGE" ]; then
|
if [ ! -e "$IMAGE" ]; then
|
||||||
echo "$IMAGE missing. Abort!"
|
echo "$IMAGE missing. Abort!"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
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"
|
||||||
|
|
8
tools/jtag_openocd/openocd_interactive.sh
Executable file
8
tools/jtag_openocd/openocd_interactive.sh
Executable 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
|
Loading…
Add table
Add a link
Reference in a new issue