You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

41 lines
1.0 KiB

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