jh8100_0150_f1.cfg 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. # _MULTI_TARGETS:
  2. # 0 - for debug single CPU. Start openocd locally.
  3. # 1 - for debug multiple CPUs. Start openocd (need version >= 0.11.0 for e24) before and set "Remote Target" port.
  4. set _MULTI_TARGETS 0
  5. set _JLINK 0
  6. set _CHIPNAME JH8100
  7. # "adapter_khz" is DEPRECATED in openocd v0.11.0, replace with "adapter speed" if not available
  8. #adapter_khz 4000
  9. adapter speed 2000
  10. # listen on all interfaces for incoming TCP/IP connections, useful for multiple targets (_MULTI_TARGETS == 1)
  11. bindto 0.0.0.0
  12. if { $_JLINK } {
  13. #interface jlink
  14. adapter driver jlink
  15. # Select a specific device if more than one connected
  16. #jlink serial 4294967295
  17. } else {
  18. #source [find interface/ftdi/olimex-arm-usb-tiny-h.cfg]
  19. #source olimex-arm-usb-tiny-h.cfg
  20. # Select a specific device if more than one connected
  21. interface ftdi
  22. ftdi_device_desc "Olimex OpenOCD JTAG ARM-USB-TINY-H"
  23. ftdi_vid_pid 0x15ba 0x002a
  24. ftdi_serial "OL3EBABB"
  25. ftdi_layout_init 0x0808 0x0a1b
  26. ftdi_layout_signal nSRST -oe 0x0200
  27. ftdi_layout_signal nTRST -data 0x0100 -oe 0x0100
  28. ftdi_layout_signal LED -data 0x0800
  29. }
  30. transport select jtag
  31. #set remote interrupt-on-connect off
  32. ## Follow chain order
  33. jtag newtap RV64ABCDFHIMSU cpu -irlen 5 -expected-id 0x08100cfd -disable
  34. jtag newtap RV32ACFIMUX cpu -irlen 5 -expected-id 0x08100cfd -disable
  35. source [find jrc.cfg]
  36. target create RV32ACFIMUX.hart0 riscv -chain-position RV32ACFIMUX.cpu -coreid 0 -gdb-port 3334
  37. target create RV64ABCDFHIMSU.core0 riscv -chain-position RV64ABCDFHIMSU.cpu -coreid 2 -rtos hwthread -gdb-port 3333
  38. init
  39. RV32ACFIMUX.hart0 configure -event gdb-detach {
  40. jtag tapdisable RV32ACFIMUX.cpu
  41. jtag tapdisable RV64ABCDFHIMSU.cpu
  42. shutdown
  43. }
  44. RV64ABCDFHIMSU.core0 configure -event gdb-detach {
  45. jtag tapdisable RV64ABCDFHIMSU.cpu
  46. jtag tapdisable RV32ACFIMUX.cpu
  47. shutdown
  48. }
  49. halt
  50. scan_chain
  51. #echo "load U-Boot SPL .................."
  52. #fast_load_image u-boot-spl.bin 0xb000000
  53. #fast_load
  54. #echo "load U-Boot itb images .................."
  55. #fast_load_image u-boot.itb 0xa0000000
  56. #fast_load
  57. #echo "load Linux kernel image .................."
  58. #fast_load_image Image_165.gz 0x47000000
  59. #fast_load
  60. #echo "load Linux dtb image .................."
  61. #fast_load_image jh8100-fpga_165.dtb 0x46000000
  62. #fast_load
  63. #echo "load rootfs image .................."
  64. #fast_load_image rootfs_165.cpio 0x59000000
  65. #fast_load
  66. echo "Finish loading images.................."
  67. echo "Ready for Remote Connections"