dsp568013.cfg 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. # SPDX-License-Identifier: GPL-2.0-or-later
  2. # Script for freescale DSP568013
  3. if { [info exists CHIPNAME] } {
  4. set _CHIPNAME $CHIPNAME
  5. } else {
  6. set _CHIPNAME dsp568013
  7. }
  8. if { [info exists ENDIAN] } {
  9. set _ENDIAN $ENDIAN
  10. } else {
  11. # this defaults to a big endian
  12. set _ENDIAN little
  13. }
  14. if { [info exists CPUTAPID] } {
  15. set _CPUTAPID $CPUTAPID
  16. } else {
  17. set _CPUTAPID 0x01f2401d
  18. }
  19. #jtag speed
  20. adapter speed 800
  21. reset_config srst_only
  22. #MASTER tap
  23. jtag newtap $_CHIPNAME chp -irlen 8 -ircapture 1 -irmask 0x03 -expected-id $_CPUTAPID
  24. #CORE tap
  25. jtag newtap $_CHIPNAME cpu -irlen 4 -ircapture 1 -irmask 0x03 -disable -expected-id 0x02211004
  26. #target configuration - There is only 1 tap at a time, hence only 1 target is defined.
  27. set _TARGETNAME $_CHIPNAME.cpu
  28. target create $_TARGETNAME dsp5680xx -endian $_ENDIAN -chain-position $_TARGETNAME
  29. # Setup the interesting tap
  30. # Disable polling to be able to get idcode from core tap. If re enabled, can be re enabled, but it should be disabled to correctly unlock flash (operations require certain instruction to be in the IR register during reset, and polling would change this)
  31. jtag configure $_CHIPNAME.chp -event setup "
  32. jtag tapenable $_TARGETNAME
  33. poll off
  34. "
  35. #select CORE tap by modifying the TLM register.
  36. #to be used when MASTER tap is selected.
  37. jtag configure $_TARGETNAME -event tap-enable "
  38. irscan $_CHIPNAME.chp 0x05;
  39. drscan $_CHIPNAME.chp 4 0x02;
  40. jtag tapdisable $_CHIPNAME.chp;
  41. "
  42. #select MASTER tap by modifying the TLM register.
  43. #to be used when CORE tap is selected.
  44. jtag configure $_CHIPNAME.chp -event tap-enable "
  45. irscan $_TARGETNAME 0x08;
  46. drscan $_TARGETNAME 4 0x1;
  47. jtag tapdisable $_TARGETNAME;
  48. "
  49. #disables the master tap
  50. jtag configure $_TARGETNAME -event tap-disable "
  51. "
  52. #TODO FIND SMARTER WAY.
  53. jtag configure $_CHIPNAME.chp -event tap-disable "
  54. "
  55. #TODO FIND SMARTER WAY.
  56. #working area at base of ram
  57. $_TARGETNAME configure -work-area-virt 0
  58. #setup flash
  59. set _FLASHNAME $_CHIPNAME.flash
  60. flash bank $_FLASHNAME dsp5680xx_flash 0 0 2 1 $_TARGETNAME