Duane Ellis: "target as an [tcl] object" feature.
[fw/openocd] / src / target / target / aduc702x.cfg
1 ## -*- tcl -*-
2 ##
3
4 # This is for the case that TRST/SRST is not wired on your JTAG adaptor.
5 # Don't really need them anyways.  
6 reset_config none
7
8 ## JTAG scan chain
9 #format L IRC IRCM IDCODE (Length, IR Capture, IR Capture Mask, IDCODE)
10 jtag_device 4 0x1 0xf 0xe
11
12 ##
13 ## Target configuration
14 ##
15 target arm7tdmi little 0
16
17 ## software initiated reset (if your SRST isn't wired)
18 #proc target_0_reset {} { mwb 0x0ffff0230 04 }
19
20 # use top 1k of SRAM for as temporary JTAG memory 
21 #working_area 0 0x11C00 0x400 backup
22
23 ## flash configuration
24 ## AdUC702x not yet spported  :(
25
26 ## If you use the watchdog, the following code makes sure that the board
27 ## doesn't reboot when halted via JTAG.  Yes, on the older generation
28 ## AdUC702x, timer3 continues running even when the CPU is halted.
29
30 proc watchdog_service {} {
31     global watchdog_hdl
32     mww 0xffff036c 0
33 #    puts "watchdog!!"
34     set watchdog_hdl [after 500 watchdog_service]
35 }
36
37 [new_target_name] configure -event old-post_halt {  watchdog_service }
38 [new_target_name] configure -event old-pre_resume { global watchdog_hdl; after cancel $watchdog_hdl }