altera_fpgasoc.cfg 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. # SPDX-License-Identifier: GPL-2.0-or-later
  2. #
  3. # Altera cyclone V SoC family, 5Cxxx
  4. #
  5. if { [info exists CHIPNAME] } {
  6. set _CHIPNAME $CHIPNAME
  7. } else {
  8. set _CHIPNAME fpgasoc
  9. }
  10. # CoreSight Debug Access Port
  11. if { [info exists DAP_TAPID] } {
  12. set _DAP_TAPID $DAP_TAPID
  13. } else {
  14. set _DAP_TAPID 0x4ba00477
  15. }
  16. jtag newtap $_CHIPNAME cpu -irlen 4 -ircapture 0x01 -irmask 0x0f \
  17. -expected-id $_DAP_TAPID
  18. # Subsidiary TAP: fpga
  19. if { [info exists FPGA_TAPID] } {
  20. set _FPGA_TAPID $FPGA_TAPID
  21. } else {
  22. set _FPGA_TAPID 0x02d020dd
  23. }
  24. jtag newtap $_CHIPNAME.fpga tap -irlen 10 -ircapture 0x01 -irmask 0x3 -expected-id $_FPGA_TAPID
  25. #
  26. # Cortex-A9 target
  27. #
  28. # GDB target: Cortex-A9, using DAP, configuring only one core
  29. # Base addresses of cores:
  30. # core 0 - 0x80110000
  31. # core 1 - 0x80112000
  32. # Slow speed to be sure it will work
  33. adapter speed 1000
  34. set _TARGETNAME1 $_CHIPNAME.cpu.0
  35. set _TARGETNAME2 $_CHIPNAME.cpu.1
  36. # A9 core 0
  37. dap create $_CHIPNAME.dap -chain-position $_CHIPNAME.cpu
  38. target create $_TARGETNAME1 cortex_a -dap $_CHIPNAME.dap \
  39. -coreid 0 -dbgbase 0x80110000
  40. $_TARGETNAME1 configure -event reset-start { adapter speed 1000 }
  41. $_TARGETNAME1 configure -event reset-assert-post "cycv_dbginit $_TARGETNAME1"
  42. # A9 core 1
  43. #target create $_TARGETNAME2 cortex_a -dap $_CHIPNAME.dap \
  44. # -coreid 1 -dbgbase 0x80112000
  45. #$_TARGETNAME2 configure -event reset-start { adapter speed 1000 }
  46. #$_TARGETNAME2 configure -event reset-assert-post "cycv_dbginit $_TARGETNAME2"
  47. proc cycv_dbginit {target} {
  48. # General Cortex-A8/A9 debug initialisation
  49. cortex_a dbginit
  50. }