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