openocd_gdlink_riscv.cfg 891 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. adapter speed 1000
  2. reset_config srst_only
  3. adapter srst pulse_width 100
  4. adapter driver cmsis-dap
  5. transport select jtag
  6. set _CHIPNAME riscv
  7. jtag newtap $_CHIPNAME cpu -irlen 5 -expected-id 0x1000563d
  8. set _TARGETNAME $_CHIPNAME.cpu
  9. target create $_TARGETNAME riscv -chain-position $_TARGETNAME
  10. $_TARGETNAME configure -work-area-phys 0x20000000 -work-area-size 20480 -work-area-backup 0
  11. # Work-area is a space in RAM used for flash programming
  12. if { [info exists WORKAREASIZE] } {
  13. set _WORKAREASIZE $WORKAREASIZE
  14. } else {
  15. set _WORKAREASIZE 0x5000
  16. }
  17. # Allow overriding the Flash bank size
  18. if { [info exists FLASH_SIZE] } {
  19. set _FLASH_SIZE $FLASH_SIZE
  20. } else {
  21. # autodetect size
  22. set _FLASH_SIZE 0
  23. }
  24. # flash size will be probed
  25. set _FLASHNAME $_CHIPNAME.flash
  26. flash bank $_FLASHNAME gd32vf103 0x08000000 0 0 0 $_TARGETNAME
  27. riscv set_reset_timeout_sec 1
  28. init
  29. halt