annotate calypso-jtag/early-experiments/with-reset.cfg @ 173:df4bf4e06221

doc: several articles moved to other repositories
author Mychaela Falconia <falcon@freecalypso.org>
date Mon, 11 Sep 2023 06:51:05 +0000
parents 240221552ecf
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
61
3940292ad76f calypso-jtag: finally got some breakthrough
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1 # The Calypso target is connected to an unbuffered FT2232D adapter
3940292ad76f calypso-jtag: finally got some breakthrough
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2 # acting as the JTAG interface following Mother Mychaela's method,
3940292ad76f calypso-jtag: finally got some breakthrough
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
3 # ADBUS7 is wired to the reset pin on TI's 14-pin connector.
3940292ad76f calypso-jtag: finally got some breakthrough
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
4 #
3940292ad76f calypso-jtag: finally got some breakthrough
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
5 # This config is an attempt (unsuccessful) to get OpenOCD's reset
3940292ad76f calypso-jtag: finally got some breakthrough
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
6 # infrastructure (including reset halt) to work with the very different
3940292ad76f calypso-jtag: finally got some breakthrough
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
7 # way of doing things on the Calypso.
3940292ad76f calypso-jtag: finally got some breakthrough
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
8
3940292ad76f calypso-jtag: finally got some breakthrough
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
9 interface ftdi
3940292ad76f calypso-jtag: finally got some breakthrough
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
10 ftdi_vid_pid 0x0403 0x7151
3940292ad76f calypso-jtag: finally got some breakthrough
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
11
3940292ad76f calypso-jtag: finally got some breakthrough
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
12 ftdi_layout_init 0x0088 0x008b
3940292ad76f calypso-jtag: finally got some breakthrough
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
13 ftdi_layout_signal XDS_RESET -data 0x0080 -oe 0x0080
3940292ad76f calypso-jtag: finally got some breakthrough
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
14
3940292ad76f calypso-jtag: finally got some breakthrough
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
15 transport select jtag
3940292ad76f calypso-jtag: finally got some breakthrough
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
16 adapter_khz 6000
3940292ad76f calypso-jtag: finally got some breakthrough
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
17
3940292ad76f calypso-jtag: finally got some breakthrough
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
18 # Reset like the one produced by TI's original XDS510/560 adapters
3940292ad76f calypso-jtag: finally got some breakthrough
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
19 proc init_reset { mode } {
3940292ad76f calypso-jtag: finally got some breakthrough
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
20 ftdi_set_signal XDS_RESET 0
3940292ad76f calypso-jtag: finally got some breakthrough
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
21 sleep 50
3940292ad76f calypso-jtag: finally got some breakthrough
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
22 ftdi_set_signal XDS_RESET 1
3940292ad76f calypso-jtag: finally got some breakthrough
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
23 sleep 10
3940292ad76f calypso-jtag: finally got some breakthrough
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
24 jtag arp_init
3940292ad76f calypso-jtag: finally got some breakthrough
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
25 }
3940292ad76f calypso-jtag: finally got some breakthrough
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
26
3940292ad76f calypso-jtag: finally got some breakthrough
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
27 if { [info exists CHIPNAME] } {
3940292ad76f calypso-jtag: finally got some breakthrough
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
28 set _CHIPNAME $CHIPNAME
3940292ad76f calypso-jtag: finally got some breakthrough
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
29 } else {
3940292ad76f calypso-jtag: finally got some breakthrough
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
30 set _CHIPNAME calypso
3940292ad76f calypso-jtag: finally got some breakthrough
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
31 }
3940292ad76f calypso-jtag: finally got some breakthrough
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
32
3940292ad76f calypso-jtag: finally got some breakthrough
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
33 if { [info exists CPUTAPID] } {
3940292ad76f calypso-jtag: finally got some breakthrough
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
34 set _CPUTAPID $CPUTAPID
3940292ad76f calypso-jtag: finally got some breakthrough
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
35 } else {
3940292ad76f calypso-jtag: finally got some breakthrough
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
36 set _CPUTAPID 0x3100e02f
3940292ad76f calypso-jtag: finally got some breakthrough
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
37 }
3940292ad76f calypso-jtag: finally got some breakthrough
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
38
3940292ad76f calypso-jtag: finally got some breakthrough
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
39 jtag newtap $_CHIPNAME dsp -irlen 8
3940292ad76f calypso-jtag: finally got some breakthrough
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
40 jtag newtap $_CHIPNAME arm -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id $_CPUTAPID
3940292ad76f calypso-jtag: finally got some breakthrough
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
41
3940292ad76f calypso-jtag: finally got some breakthrough
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
42 set _TARGETNAME $_CHIPNAME.arm
3940292ad76f calypso-jtag: finally got some breakthrough
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
43 target create $_TARGETNAME arm7tdmi -endian little -chain-position $_TARGETNAME
3940292ad76f calypso-jtag: finally got some breakthrough
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
44
3940292ad76f calypso-jtag: finally got some breakthrough
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
45 arm7_9 dbgrq enable
3940292ad76f calypso-jtag: finally got some breakthrough
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
46
3940292ad76f calypso-jtag: finally got some breakthrough
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
47 proc calypso_magic {} {
3940292ad76f calypso-jtag: finally got some breakthrough
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
48 irscan calypso.arm 0x0b -endstate DRPAUSE
3940292ad76f calypso-jtag: finally got some breakthrough
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
49 drscan calypso.arm 2 2 -endstate RUN/IDLE
3940292ad76f calypso-jtag: finally got some breakthrough
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
50 }
3940292ad76f calypso-jtag: finally got some breakthrough
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
51
3940292ad76f calypso-jtag: finally got some breakthrough
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
52 # watchdog disable with minimal finger strokes to make it in time
3940292ad76f calypso-jtag: finally got some breakthrough
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
53 proc wd {} {
3940292ad76f calypso-jtag: finally got some breakthrough
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
54 calypso.arm mwh 0xFFFFF804 0xF5
3940292ad76f calypso-jtag: finally got some breakthrough
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
55 calypso.arm mwh 0xFFFFF804 0xA0
3940292ad76f calypso-jtag: finally got some breakthrough
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
56 }
3940292ad76f calypso-jtag: finally got some breakthrough
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
57
3940292ad76f calypso-jtag: finally got some breakthrough
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
58 $_TARGETNAME configure -event examine-start calypso_magic
3940292ad76f calypso-jtag: finally got some breakthrough
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
59
3940292ad76f calypso-jtag: finally got some breakthrough
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
60 # deliberately empty procedure here, as init_reset already did the job
3940292ad76f calypso-jtag: finally got some breakthrough
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
61 $_TARGETNAME configure -event reset-assert { }