dsp568037.cfg 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. # SPDX-License-Identifier: GPL-2.0-or-later
  2. # Script for freescale DSP568037
  3. if { [info exists CHIPNAME] } {
  4. set _CHIPNAME $CHIPNAME
  5. } else {
  6. set _CHIPNAME dsp568037
  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 0x01f2801d
  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. jtag configure $_CHIPNAME.chp -event setup "jtag tapenable $_TARGETNAME"
  31. #select CORE tap by modifying the TLM register.
  32. #to be used when MASTER tap is selected.
  33. jtag configure $_TARGETNAME -event tap-enable "
  34. irscan $_CHIPNAME.chp 0x05;
  35. drscan $_CHIPNAME.chp 4 0x02;
  36. jtag tapdisable $_CHIPNAME.chp;
  37. "
  38. #select MASTER tap by modifying the TLM register.
  39. #to be used when CORE tap is selected.
  40. jtag configure $_CHIPNAME.chp -event tap-enable "
  41. irscan $_TARGETNAME 0x08;
  42. drscan $_TARGETNAME 4 0x1;
  43. jtag tapdisable $_TARGETNAME;
  44. "
  45. #disables the master tap
  46. jtag configure $_TARGETNAME -event tap-disable "
  47. "
  48. #TODO FIND SMARTER WAY.
  49. jtag configure $_CHIPNAME.chp -event tap-disable "
  50. "
  51. #TODO FIND SMARTER WAY.
  52. #working area at base of ram
  53. $_TARGETNAME configure -work-area-virt 0
  54. #setup flash
  55. set _FLASHNAME $_CHIPNAME.flash
  56. flash bank $_FLASHNAME dsp5680xx_flash 0 0 2 1 $_TARGETNAME