ngultra.cfg 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. # SPDX-License-Identifier: BSD-3-Clause
  2. # Copyright (C) 2022 by NanoXplore, France - all rights reserved
  3. #
  4. # configuration file for NG-Ultra SoC from NanoXplore.
  5. # NG-Ultra is a quad-core Cortex-R52 SoC + an FPGA.
  6. #
  7. transport select jtag
  8. adapter speed 10000
  9. if { [info exists CHIPNAME] } {
  10. set _CHIPNAME $CHIPNAME
  11. } else {
  12. set _CHIPNAME NGULTRA
  13. }
  14. if { [info exists CHIPCORES] } {
  15. set _cores $CHIPCORES
  16. } else {
  17. set _cores 4
  18. }
  19. set DBGBASE {0x88210000 0x88310000 0x88410000 0x88510000}
  20. set CTIBASE {0x88220000 0x88320000 0x88420000 0x88520000}
  21. # Coresight access to the SoC
  22. jtag newtap $_CHIPNAME.coresight cpu -irlen 4 -expected-id 0x6BA00477
  23. # Misc TAP devices
  24. jtag newtap $_CHIPNAME.soc cpu -irlen 7 -expected-id 0xFAAA0555
  25. jtag newtap $_CHIPNAME.pmb unknown1 -irlen 5 -expected-id 0xBA20A005
  26. jtag newtap $_CHIPNAME.fpga fpga -irlen 4 -ignore-version -ignore-bypass
  27. # Create the Coresight DAP
  28. dap create $_CHIPNAME.coresight.dap -chain-position $_CHIPNAME.coresight.cpu
  29. for { set _core 0 } { $_core < $_cores } { incr _core } {
  30. cti create cti.$_core -dap $_CHIPNAME.coresight.dap -ap-num 0 \
  31. -baseaddr [lindex $CTIBASE $_core]
  32. # Cores are armv8-r but works with aarch64 (since armv8-r not directly supported by openocd yet).
  33. if { $_core == 0} {
  34. target create core.$_core aarch64 -dap $_CHIPNAME.coresight.dap \
  35. -ap-num 0 -dbgbase [lindex $DBGBASE $_core] -cti cti.$_core
  36. } else {
  37. target create core.$_core aarch64 -dap $_CHIPNAME.coresight.dap \
  38. -ap-num 0 -dbgbase [lindex $DBGBASE $_core] -cti cti.$_core -defer-examine
  39. }
  40. }
  41. # Create direct APB and AXI interfaces
  42. target create APB mem_ap -dap $_CHIPNAME.coresight.dap -ap-num 0
  43. target create AXI mem_ap -dap $_CHIPNAME.coresight.dap -ap-num 1