2ade55501aca89bbd580639f39a7efd1ae055e0e
[fw/openocd] / src / target / target / pic32mx.cfg
1
2 if { [info exists CHIPNAME] } { 
3    set  _CHIPNAME $CHIPNAME    
4 } else {         
5    set  _CHIPNAME pic32mx
6 }
7
8 if { [info exists ENDIAN] } {   
9    set  _ENDIAN $ENDIAN    
10 } else {         
11    set  _ENDIAN little
12 }
13
14 if { [info exists CPUTAPID ] } {
15    set _CPUTAPID $CPUTAPID
16 } else {
17   # force an error till we get a good number
18    set _CPUTAPID 0xffffffff
19 }
20
21 jtag_nsrst_delay 100
22 jtag_ntrst_delay 100
23
24 #use combined on interfaces or targets that can't set TRST/SRST separately
25 reset_config srst_only
26
27 #jtag scan chain
28 #format L IRC IRCM IDCODE (Length, IR Capture, IR Capture Mask, IDCODE)
29 jtag newtap $_CPUNAME cpu -irlen 5  -ircapture 0x1 -irmask 0x1 -expected-id $_CPUTAPID
30
31 set _TARGETNAME [format "%s.cpu" $_CHIPNAME]
32 target create $_TARGETNAME mips_m4k -endian $_ENDIAN -chain-position $_TARGETNAME
33
34 $_TARGETNAME configure -work-area-virt 0 -work-area-phys 0xa0000000 -work-area-size 16384 -work-area-backup 0
35
36
37 # For more information about the configuration files, take a look at:
38 # openocd.texi