# HG changeset patch # User Mychaela Falconia # Date 1561259550 0 # Node ID 240221552ecf9eca8f5a1949f9f2a0bfb259ad03 # Parent 3940292ad76f3855c0f0785b67b503be5b384c66 calypso-jtag: files reshuffled for release diff -r 3940292ad76f -r 240221552ecf calypso-jtag/autoprobe.cfg --- a/calypso-jtag/autoprobe.cfg Sun Jun 23 01:08:01 2019 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,16 +0,0 @@ -# The Calypso target is connected to an unbuffered FT2232D adapter -# acting as the JTAG interface following Mother Mychaela's method, -# ADBUS7 is wired to the reset pin on TI's 14-pin connector. -# The present OpenOCD config sets things up to allow scan chain autoprobing -# and manual nSRST manipulation, and nothing more. - -interface ftdi -ftdi_vid_pid 0x0403 0x7151 - -ftdi_layout_init 0x0088 0x008b -ftdi_layout_signal nSRST -data 0x0080 -oe 0x0080 - -transport select jtag - -adapter_khz 6000 -reset_config srst_only srst_push_pull diff -r 3940292ad76f -r 240221552ecf calypso-jtag/brute.cfg --- a/calypso-jtag/brute.cfg Sun Jun 23 01:08:01 2019 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,86 +0,0 @@ -# The Calypso target is connected to an unbuffered FT2232D adapter -# acting as the JTAG interface following Mother Mychaela's method, -# ADBUS7 is wired to the reset pin on TI's 14-pin connector. -# -# This OpenOCD config is a proof of concept, demonstrating our ability -# to (1) halt an already-running Calypso through the scan chain without -# doing a reset, (2) perform a reset (Iota nTESTRESET) without a halt, -# i.e., reset and let run, and (3) perform a reset with a built-in halt, -# halting the Calypso at the reset vector before it executes even one -# instruction, with all hardware in its pristine state directly out of -# superdeep reset. This proof of concept is done in a "brute force" way, -# bypassing most of OpenOCD's infrastructure and using our own ad hoc -# Tcl procedures instead. - -interface ftdi -ftdi_vid_pid 0x0403 0x7151 - -ftdi_layout_init 0x0088 0x008b -ftdi_layout_signal XDS_RESET -data 0x0080 -oe 0x0080 - -transport select jtag -adapter_khz 6000 - -# Reset like the one produced by TI's original XDS510/560 adapters -proc xds_reset {} { - ftdi_set_signal XDS_RESET 0 - sleep 50 - ftdi_set_signal XDS_RESET 1 - sleep 10 -} - -if { [info exists CHIPNAME] } { - set _CHIPNAME $CHIPNAME -} else { - set _CHIPNAME calypso -} - -if { [info exists CPUTAPID] } { - set _CPUTAPID $CPUTAPID -} else { - set _CPUTAPID 0x3100e02f -} - -jtag newtap $_CHIPNAME dsp -irlen 8 -jtag newtap $_CHIPNAME arm -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id $_CPUTAPID - -set _TARGETNAME $_CHIPNAME.arm -target create $_TARGETNAME arm7tdmi -endian little -chain-position $_TARGETNAME - -arm7_9 dbgrq enable - -proc calypso_magic {} { - irscan calypso.arm 0x0b -endstate DRPAUSE - drscan calypso.arm 2 2 -endstate RUN/IDLE -} - -proc enable_halt {} { - poll off - calypso_magic - poll on -} - -# watchdog disable with minimal finger strokes to make it in time -proc wd {} { - calypso.arm mwh 0xFFFFF804 0xF5 - calypso.arm mwh 0xFFFFF804 0xA0 -} - -proc reset_run {} { - poll off - xds_reset - jtag arp_init - calypso.arm arp_examine - poll on -} - -proc reset_halt {} { - poll off - xds_reset - jtag arp_init - calypso.arm arp_examine - calypso_magic - halt - wd - poll on -} diff -r 3940292ad76f -r 240221552ecf calypso-jtag/early-experiments/autoprobe.cfg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/calypso-jtag/early-experiments/autoprobe.cfg Sun Jun 23 03:12:30 2019 +0000 @@ -0,0 +1,16 @@ +# The Calypso target is connected to an unbuffered FT2232D adapter +# acting as the JTAG interface following Mother Mychaela's method, +# ADBUS7 is wired to the reset pin on TI's 14-pin connector. +# The present OpenOCD config sets things up to allow scan chain autoprobing +# and manual nSRST manipulation, and nothing more. + +interface ftdi +ftdi_vid_pid 0x0403 0x7151 + +ftdi_layout_init 0x0088 0x008b +ftdi_layout_signal nSRST -data 0x0080 -oe 0x0080 + +transport select jtag + +adapter_khz 6000 +reset_config srst_only srst_push_pull diff -r 3940292ad76f -r 240221552ecf calypso-jtag/early-experiments/taps-only.cfg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/calypso-jtag/early-experiments/taps-only.cfg Sun Jun 23 03:12:30 2019 +0000 @@ -0,0 +1,40 @@ +# The Calypso target is connected to an unbuffered FT2232D adapter +# acting as the JTAG interface following Mother Mychaela's method, +# ADBUS7 is wired to the reset pin on TI's 14-pin connector. +# This OpenOCD config sets up the TAPs and nSRST control ability, +# but no ARM7 target yet. EMU0 and EMU1 connections have also been +# added on ADBUS5 and ADBUS6, respectively. + +interface ftdi +ftdi_vid_pid 0x0403 0x7151 + +ftdi_layout_init 0x0088 0x008b +ftdi_layout_signal nSRST -data 0x0080 -oe 0x0080 +ftdi_layout_signal EMU0 -data 0x0020 -oe 0x0020 +ftdi_layout_signal EMU1 -data 0x0040 -oe 0x0040 + +transport select jtag + +adapter_khz 6000 +reset_config srst_only srst_push_pull + +if { [info exists CHIPNAME] } { + set _CHIPNAME $CHIPNAME +} else { + set _CHIPNAME calypso +} + +if { [info exists ENDIAN] } { + set _ENDIAN $ENDIAN +} else { + set _ENDIAN little +} + +if { [info exists CPUTAPID] } { + set _CPUTAPID $CPUTAPID +} else { + set _CPUTAPID 0x3100e02f +} + +jtag newtap $_CHIPNAME dsp -irlen 8 +jtag newtap $_CHIPNAME arm -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id $_CPUTAPID diff -r 3940292ad76f -r 240221552ecf calypso-jtag/early-experiments/with-reset.cfg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/calypso-jtag/early-experiments/with-reset.cfg Sun Jun 23 03:12:30 2019 +0000 @@ -0,0 +1,61 @@ +# The Calypso target is connected to an unbuffered FT2232D adapter +# acting as the JTAG interface following Mother Mychaela's method, +# ADBUS7 is wired to the reset pin on TI's 14-pin connector. +# +# This config is an attempt (unsuccessful) to get OpenOCD's reset +# infrastructure (including reset halt) to work with the very different +# way of doing things on the Calypso. + +interface ftdi +ftdi_vid_pid 0x0403 0x7151 + +ftdi_layout_init 0x0088 0x008b +ftdi_layout_signal XDS_RESET -data 0x0080 -oe 0x0080 + +transport select jtag +adapter_khz 6000 + +# Reset like the one produced by TI's original XDS510/560 adapters +proc init_reset { mode } { + ftdi_set_signal XDS_RESET 0 + sleep 50 + ftdi_set_signal XDS_RESET 1 + sleep 10 + jtag arp_init +} + +if { [info exists CHIPNAME] } { + set _CHIPNAME $CHIPNAME +} else { + set _CHIPNAME calypso +} + +if { [info exists CPUTAPID] } { + set _CPUTAPID $CPUTAPID +} else { + set _CPUTAPID 0x3100e02f +} + +jtag newtap $_CHIPNAME dsp -irlen 8 +jtag newtap $_CHIPNAME arm -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id $_CPUTAPID + +set _TARGETNAME $_CHIPNAME.arm +target create $_TARGETNAME arm7tdmi -endian little -chain-position $_TARGETNAME + +arm7_9 dbgrq enable + +proc calypso_magic {} { + irscan calypso.arm 0x0b -endstate DRPAUSE + drscan calypso.arm 2 2 -endstate RUN/IDLE +} + +# watchdog disable with minimal finger strokes to make it in time +proc wd {} { + calypso.arm mwh 0xFFFFF804 0xF5 + calypso.arm mwh 0xFFFFF804 0xA0 +} + +$_TARGETNAME configure -event examine-start calypso_magic + +# deliberately empty procedure here, as init_reset already did the job +$_TARGETNAME configure -event reset-assert { } diff -r 3940292ad76f -r 240221552ecf calypso-jtag/early-experiments/with-target.cfg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/calypso-jtag/early-experiments/with-target.cfg Sun Jun 23 03:12:30 2019 +0000 @@ -0,0 +1,41 @@ +# The Calypso target is connected to an unbuffered FT2232D adapter +# acting as the JTAG interface following Mother Mychaela's method, +# ADBUS7 is wired to the reset pin on TI's 14-pin connector. +# This OpenOCD config sets up the TAPs and the ARM7TDMI target +# in order to test OpenOCD's ability to halt with and without the +# "Calypso magic" that has supposedly been sniffed from TI's CCS +# by people who came before me. + +interface ftdi +ftdi_vid_pid 0x0403 0x7151 + +ftdi_layout_init 0x0088 0x008b +ftdi_layout_signal nSRST -data 0x0080 -oe 0x0080 + +transport select jtag + +adapter_khz 6000 +reset_config srst_only srst_push_pull + +if { [info exists CHIPNAME] } { + set _CHIPNAME $CHIPNAME +} else { + set _CHIPNAME calypso +} + +if { [info exists CPUTAPID] } { + set _CPUTAPID $CPUTAPID +} else { + set _CPUTAPID 0x3100e02f +} + +jtag newtap $_CHIPNAME dsp -irlen 8 +jtag newtap $_CHIPNAME arm -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id $_CPUTAPID + +set _TARGETNAME $_CHIPNAME.arm +target create $_TARGETNAME arm7tdmi -endian little -chain-position $_TARGETNAME + +proc calypso_magic {} { + irscan calypso.arm 0x0b -endstate DRPAUSE + drscan calypso.arm 2 2 -endstate RUN/IDLE +} diff -r 3940292ad76f -r 240221552ecf calypso-jtag/ft2232d-unbuf-poc.cfg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/calypso-jtag/ft2232d-unbuf-poc.cfg Sun Jun 23 03:12:30 2019 +0000 @@ -0,0 +1,86 @@ +# The Calypso target is connected to an unbuffered FT2232D adapter +# acting as the JTAG interface following Mother Mychaela's method, +# ADBUS7 is wired to the reset pin on TI's 14-pin connector. +# +# This OpenOCD config is a proof of concept, demonstrating our ability +# to (1) halt an already-running Calypso through the scan chain without +# doing a reset, (2) perform a reset (Iota nTESTRESET) without a halt, +# i.e., reset and let run, and (3) perform a reset with a built-in halt, +# halting the Calypso at the reset vector before it executes even one +# instruction, with all hardware in its pristine state directly out of +# superdeep reset. This proof of concept is done in a "brute force" way, +# bypassing most of OpenOCD's infrastructure and using our own ad hoc +# Tcl procedures instead. + +interface ftdi +ftdi_vid_pid 0x0403 0x7151 + +ftdi_layout_init 0x0088 0x008b +ftdi_layout_signal XDS_RESET -data 0x0080 -oe 0x0080 + +transport select jtag +adapter_khz 6000 + +# Reset like the one produced by TI's original XDS510/560 adapters +proc xds_reset {} { + ftdi_set_signal XDS_RESET 0 + sleep 50 + ftdi_set_signal XDS_RESET 1 + sleep 10 +} + +if { [info exists CHIPNAME] } { + set _CHIPNAME $CHIPNAME +} else { + set _CHIPNAME calypso +} + +if { [info exists CPUTAPID] } { + set _CPUTAPID $CPUTAPID +} else { + set _CPUTAPID 0x3100e02f +} + +jtag newtap $_CHIPNAME dsp -irlen 8 +jtag newtap $_CHIPNAME arm -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id $_CPUTAPID + +set _TARGETNAME $_CHIPNAME.arm +target create $_TARGETNAME arm7tdmi -endian little -chain-position $_TARGETNAME + +arm7_9 dbgrq enable + +proc calypso_magic {} { + irscan calypso.arm 0x0b -endstate DRPAUSE + drscan calypso.arm 2 2 -endstate RUN/IDLE +} + +proc enable_halt {} { + poll off + calypso_magic + poll on +} + +# watchdog disable with minimal finger strokes to make it in time +proc wd {} { + calypso.arm mwh 0xFFFFF804 0xF5 + calypso.arm mwh 0xFFFFF804 0xA0 +} + +proc reset_run {} { + poll off + xds_reset + jtag arp_init + calypso.arm arp_examine + poll on +} + +proc reset_halt {} { + poll off + xds_reset + jtag arp_init + calypso.arm arp_examine + calypso_magic + halt + wd + poll on +} diff -r 3940292ad76f -r 240221552ecf calypso-jtag/taps-only.cfg --- a/calypso-jtag/taps-only.cfg Sun Jun 23 01:08:01 2019 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,40 +0,0 @@ -# The Calypso target is connected to an unbuffered FT2232D adapter -# acting as the JTAG interface following Mother Mychaela's method, -# ADBUS7 is wired to the reset pin on TI's 14-pin connector. -# This OpenOCD config sets up the TAPs and nSRST control ability, -# but no ARM7 target yet. EMU0 and EMU1 connections have also been -# added on ADBUS5 and ADBUS6, respectively. - -interface ftdi -ftdi_vid_pid 0x0403 0x7151 - -ftdi_layout_init 0x0088 0x008b -ftdi_layout_signal nSRST -data 0x0080 -oe 0x0080 -ftdi_layout_signal EMU0 -data 0x0020 -oe 0x0020 -ftdi_layout_signal EMU1 -data 0x0040 -oe 0x0040 - -transport select jtag - -adapter_khz 6000 -reset_config srst_only srst_push_pull - -if { [info exists CHIPNAME] } { - set _CHIPNAME $CHIPNAME -} else { - set _CHIPNAME calypso -} - -if { [info exists ENDIAN] } { - set _ENDIAN $ENDIAN -} else { - set _ENDIAN little -} - -if { [info exists CPUTAPID] } { - set _CPUTAPID $CPUTAPID -} else { - set _CPUTAPID 0x3100e02f -} - -jtag newtap $_CHIPNAME dsp -irlen 8 -jtag newtap $_CHIPNAME arm -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id $_CPUTAPID diff -r 3940292ad76f -r 240221552ecf calypso-jtag/with-reset.cfg --- a/calypso-jtag/with-reset.cfg Sun Jun 23 01:08:01 2019 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,61 +0,0 @@ -# The Calypso target is connected to an unbuffered FT2232D adapter -# acting as the JTAG interface following Mother Mychaela's method, -# ADBUS7 is wired to the reset pin on TI's 14-pin connector. -# -# This config is an attempt (unsuccessful) to get OpenOCD's reset -# infrastructure (including reset halt) to work with the very different -# way of doing things on the Calypso. - -interface ftdi -ftdi_vid_pid 0x0403 0x7151 - -ftdi_layout_init 0x0088 0x008b -ftdi_layout_signal XDS_RESET -data 0x0080 -oe 0x0080 - -transport select jtag -adapter_khz 6000 - -# Reset like the one produced by TI's original XDS510/560 adapters -proc init_reset { mode } { - ftdi_set_signal XDS_RESET 0 - sleep 50 - ftdi_set_signal XDS_RESET 1 - sleep 10 - jtag arp_init -} - -if { [info exists CHIPNAME] } { - set _CHIPNAME $CHIPNAME -} else { - set _CHIPNAME calypso -} - -if { [info exists CPUTAPID] } { - set _CPUTAPID $CPUTAPID -} else { - set _CPUTAPID 0x3100e02f -} - -jtag newtap $_CHIPNAME dsp -irlen 8 -jtag newtap $_CHIPNAME arm -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id $_CPUTAPID - -set _TARGETNAME $_CHIPNAME.arm -target create $_TARGETNAME arm7tdmi -endian little -chain-position $_TARGETNAME - -arm7_9 dbgrq enable - -proc calypso_magic {} { - irscan calypso.arm 0x0b -endstate DRPAUSE - drscan calypso.arm 2 2 -endstate RUN/IDLE -} - -# watchdog disable with minimal finger strokes to make it in time -proc wd {} { - calypso.arm mwh 0xFFFFF804 0xF5 - calypso.arm mwh 0xFFFFF804 0xA0 -} - -$_TARGETNAME configure -event examine-start calypso_magic - -# deliberately empty procedure here, as init_reset already did the job -$_TARGETNAME configure -event reset-assert { } diff -r 3940292ad76f -r 240221552ecf calypso-jtag/with-target.cfg --- a/calypso-jtag/with-target.cfg Sun Jun 23 01:08:01 2019 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,41 +0,0 @@ -# The Calypso target is connected to an unbuffered FT2232D adapter -# acting as the JTAG interface following Mother Mychaela's method, -# ADBUS7 is wired to the reset pin on TI's 14-pin connector. -# This OpenOCD config sets up the TAPs and the ARM7TDMI target -# in order to test OpenOCD's ability to halt with and without the -# "Calypso magic" that has supposedly been sniffed from TI's CCS -# by people who came before me. - -interface ftdi -ftdi_vid_pid 0x0403 0x7151 - -ftdi_layout_init 0x0088 0x008b -ftdi_layout_signal nSRST -data 0x0080 -oe 0x0080 - -transport select jtag - -adapter_khz 6000 -reset_config srst_only srst_push_pull - -if { [info exists CHIPNAME] } { - set _CHIPNAME $CHIPNAME -} else { - set _CHIPNAME calypso -} - -if { [info exists CPUTAPID] } { - set _CPUTAPID $CPUTAPID -} else { - set _CPUTAPID 0x3100e02f -} - -jtag newtap $_CHIPNAME dsp -irlen 8 -jtag newtap $_CHIPNAME arm -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id $_CPUTAPID - -set _TARGETNAME $_CHIPNAME.arm -target create $_TARGETNAME arm7tdmi -endian little -chain-position $_TARGETNAME - -proc calypso_magic {} { - irscan calypso.arm 0x0b -endstate DRPAUSE - drscan calypso.arm 2 2 -endstate RUN/IDLE -}