openocd.cfg 877 B

12345678910111213141516171819202122232425262728293031
  1. # JTAG adapter setup
  2. adapter_khz 10000
  3. interface ftdi
  4. ftdi_device_desc "Olimex OpenOCD JTAG ARM-USB-TINY-H"
  5. ftdi_vid_pid 0x15ba 0x002a
  6. ftdi_layout_init 0x0808 0x0a1b
  7. ftdi_layout_signal nSRST -oe 0x0200
  8. #ftdi_layout_signal nTRST -data 0x0100 -oe 0x0100
  9. ftdi_layout_signal LED -data 0x0800
  10. set _CHIPNAME riscv
  11. jtag newtap $_CHIPNAME cpu -irlen 5 -expected-id 0x20000001
  12. set _TARGETNAME $_CHIPNAME.cpu
  13. target create $_TARGETNAME.0 riscv -chain-position $_TARGETNAME
  14. $_TARGETNAME.0 configure -work-area-phys 0x80000000 -work-area-size 10000 -work-area-backup 1
  15. # Un-comment these two flash lines if you have a SPI flash and want to write
  16. # it.
  17. flash bank spi0 fespi 0x40000000 0 0 0 $_TARGETNAME.0 0x20004000
  18. init
  19. if {[ info exists pulse_srst]} {
  20. ftdi_set_signal nSRST 0
  21. ftdi_set_signal nSRST z
  22. }
  23. halt
  24. #flash protect 0 64 last off
  25. echo "Ready for Remote Connections"