5 if { [info exists CHIPNAME] } {
6 set _CHIPNAME $CHIPNAME
11 if { [info exists ENDIAN] } {
14 # This config file was defaulting to big endian..
18 if { [info exists CPUTAPID] } {
19 set _CPUTAPID $CPUTAPID
21 set _CPUTAPID 0xffffffff
28 # This is for the case that TRST/SRST is not wired on your JTAG adaptor.
29 # Don't really need them anyways.
33 #format L IRC IRCM IDCODE (Length, IR Capture, IR Capture Mask, IDCODE)
34 jtag newtap $_CHIPNAME cpu -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id $_CPUTAPID
37 ## Target configuration
39 set _TARGETNAME [format "%s.cpu" $_CHIPNAME]
40 target create $_TARGETNAME arm7tdmi -endian $_ENDIAN -chain-position $_TARGETNAME
42 ## flash configuration
43 flash bank aduc702x 0x80000 0x10000 2 2 0
45 ## If you use the watchdog, the following code makes sure that the board
46 ## doesn't reboot when halted via JTAG. Yes, on the older generation
47 ## AdUC702x, timer3 continues running even when the CPU is halted.
49 proc watchdog_service {} {
53 set watchdog_hdl [after 500 watchdog_service]
56 $_TARGETNAME configure -event reset-halt-post { watchdog_service }
57 $_TARGETNAME configure -event old-pre_resume { global watchdog_hdl; after cancel $watchdog_hdl }