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.
 
 
 
 
 
 

46 lines
1.1 KiB

  1. # Freescale i.MX51
  2. if { [info exists CHIPNAME] } {
  3. set _CHIPNAME $CHIPNAME
  4. } else {
  5. set _CHIPNAME imx51
  6. }
  7. # CoreSight Debug Access Port
  8. if { [info exists DAP_TAPID] } {
  9. set _DAP_TAPID $DAP_TAPID
  10. } else {
  11. set _DAP_TAPID 0x1ba00477
  12. }
  13. jtag newtap $_CHIPNAME cpu -irlen 4 -ircapture 0x1 -irmask 0xf \
  14. -expected-id $_DAP_TAPID
  15. # SDMA / no IDCODE
  16. jtag newtap $_CHIPNAME sdma -irlen 4 -ircapture 0x0 -irmask 0xf
  17. # SJC
  18. if { [info exists SJC_TAPID] } {
  19. set _SJC_TAPID SJC_TAPID
  20. } else {
  21. set _SJC_TAPID 0x0190c01d
  22. }
  23. jtag newtap $_CHIPNAME sjc -irlen 5 -ircapture 0x1 -irmask 0x1f \
  24. -expected-id $_SJC_TAPID -ignore-version
  25. # GDB target: Cortex-A8, using DAP
  26. set _TARGETNAME $_CHIPNAME.cpu
  27. dap create $_CHIPNAME.dap -chain-position $_CHIPNAME.cpu
  28. target create $_TARGETNAME cortex_a -dap $_CHIPNAME.dap
  29. # some TCK tycles are required to activate the DEBUG power domain
  30. jtag configure $_CHIPNAME.sjc -event post-reset "runtest 100"
  31. proc imx51_dbginit {target} {
  32. # General Cortex-A8 debug initialisation
  33. cortex_a dbginit
  34. }
  35. $_TARGETNAME configure -event reset-assert-post "imx51_dbginit $_TARGETNAME"