adsp-sc58x.cfg 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. # SPDX-License-Identifier: GPL-2.0-or-later
  2. #
  3. # Analog Devices ADSP-SC58x (ARM Cortex-A5 plus one or two SHARC+ DSPs)
  4. #
  5. # Evaluation boards by Analog Devices (and designs derived from them) use a
  6. # non-standard 10-pin 0.05" ARM Cortex Debug Connector. In this bastardized
  7. # implementation, pin 9 (GND or GNDDetect) has been usurped with JTAG /TRST.
  8. #
  9. # As a result, a standards-compliant debug pod will force /TRST active,
  10. # putting the processor's debug interface into reset and preventing usage.
  11. #
  12. # A connector adapter must be employed on these boards to isolate or remap
  13. # /TRST so that it is only asserted when intended.
  14. source [find target/swj-dp.tcl]
  15. if { [info exists CHIPNAME] } {
  16. set _CHIPNAME $CHIPNAME
  17. } else {
  18. set _CHIPNAME ADSP-SC58x
  19. }
  20. if { [info exists ENDIAN] } {
  21. set _ENDIAN $ENDIAN
  22. } else {
  23. set _ENDIAN little
  24. }
  25. if { [info exists CPUTAPID] } {
  26. set _CPUTAPID $CPUTAPID
  27. } else {
  28. set _CPUTAPID 0x3BA02477
  29. }
  30. swj_newdap $_CHIPNAME cpu -irlen 4 -expected-id $_CPUTAPID
  31. dap create $_CHIPNAME.dap -chain-position $_CHIPNAME.cpu
  32. target create ap0.mem mem_ap -dap $_CHIPNAME.dap -ap-num 0
  33. set _TARGETNAME $_CHIPNAME.cpu
  34. target create $_TARGETNAME cortex_a -endian $_ENDIAN -dap $_CHIPNAME.dap
  35. $_TARGETNAME configure -event examine-end {
  36. global _TARGETNAME
  37. sc58x_enabledebug
  38. }
  39. proc sc58x_enabledebug {} {
  40. # Enable debugging functionality by setting bits in the TAPC_DBGCTL register
  41. # it is not possible to halt the target unless these bits have been set
  42. ap0.mem mww 0x31131000 0xFFFF
  43. }