X-Git-Url: https://review.openocd.org/gitweb?p=openocd.git;a=blobdiff_plain;f=tcl%2Ftarget%2Fpic32mx.cfg;h=6127a5404f539f3a51240b397ef0a4a3de6b6518;hp=139f801f78b16397e253d87b8cc76ad67316925e;hb=3e6f9e8d1e65c4da505ff78481d54a115520d3d1;hpb=dbbc9c41f7db210b0a4e226540a28e0a8a5019bf diff --git a/tcl/target/pic32mx.cfg b/tcl/target/pic32mx.cfg index 139f801f78..6127a5404f 100644 --- a/tcl/target/pic32mx.cfg +++ b/tcl/target/pic32mx.cfg @@ -1,13 +1,13 @@ -if { [info exists CHIPNAME] } { - set _CHIPNAME $CHIPNAME -} else { +if { [info exists CHIPNAME] } { + set _CHIPNAME $CHIPNAME +} else { set _CHIPNAME pic32mx } -if { [info exists ENDIAN] } { - set _ENDIAN $ENDIAN -} else { +if { [info exists ENDIAN] } { + set _ENDIAN $ENDIAN +} else { set _ENDIAN little } @@ -28,10 +28,10 @@ reset_config srst_only #format L IRC IRCM IDCODE (Length, IR Capture, IR Capture Mask, IDCODE) jtag newtap $_CHIPNAME cpu -irlen 5 -ircapture 0x1 -irmask 0x1f -expected-id $_CPUTAPID -set _TARGETNAME [format "%s.cpu" $_CHIPNAME] +set _TARGETNAME $_CHIPNAME.cpu target create $_TARGETNAME mips_m4k -endian $_ENDIAN -chain-position $_TARGETNAME -$_TARGETNAME configure -work-area-virt 0 -work-area-phys 0xa0000000 -work-area-size 16384 -work-area-backup 0 +$_TARGETNAME configure -work-area-phys 0xa0000000 -work-area-size 16384 -work-area-backup 0 flash bank pic32mx 0xbd000000 0 0 0 0 flash bank pic32mx 0xbfc00000 0 0 0 0