Advertisement
ALTracer

BMDA v1.10.0-rc0-78 scans BM-310S RV32IMC

Sep 27th, 2023
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.57 KB | None | 0 0
  1. mint-user@Workstation451 ~/g/b/blackmagic (feature/risc-v) [255]> ./src/blackmagic -c mdr187 -tjv 5
  2. Black Magic Debug App v1.10.0-rc0-78-ga705f960-dirty
  3. for Black Magic Probe, ST-Link v2 and v3, CMSIS-DAP, J-Link and FTDI (MPSSE)
  4. Using 0403:6010 <no serial number> FTDI
  5. Dual RS232-HS ---
  6. Running in Test Mode
  7. Target voltage: (null) Volt
  8. Speed set to 3.750MHz for JTAG
  9. Resetting TAP
  10. Change state to Shift-DR
  11. Scanning out ID codes
  12. Return to Run-Test/Idle
  13. Change state to Shift-IR
  14. Scanning out IRs
  15. Return to Run-Test/Idle
  16. Change state to Shift-DR
  17. jtag_scan: Sanity check failed: BYPASS dev count doesn't match IR scan
  18. Return to Run-Test/Idle
  19. ID code 0x000006df: RISC-V debug v0.13
  20. RISC-V debug v0.13/v1.0 DMI
  21. RISC-V debug v0.13 DM
  22. Hart has 2 data registers
  23. Attempting 64-bit read on misa
  24. Reading 64-bit CSR 301
  25. CSR access failed: 2
  26. Unknown address width, defaulting to 32
  27. Reading 32-bit CSR f11
  28. CSR access failed: 2
  29. Reading 64-bit CSR f12
  30. CSR access failed: 2
  31. Reading 64-bit CSR f13
  32. CSR access failed: 2
  33. Reading 64-bit CSR f14
  34. CSR access failed: 2
  35. Hart 0: 64-bit RISC-V (arch = 00000000), vendor = 0, impl = 0, exts = 00000000
  36. Writing 32-bit CSR 7a0
  37. CSR access failed: 2
  38. -> riscv64_probe
  39. Probing failed, please report unknown RISC-V 64 device
  40. Reading 32-bit CSR 7b0
  41. CSR access failed: 2
  42. DMI read at 0x0000001d failed with status 2
  43. Error while reading the next DM base address
  44. *** 1 RISC-V rv64
  45. DMI write at 0x00000010 failed with status 2
  46. Can not attach to target 1
  47. mint-user@Workstation451 ~/g/b/blackmagic (feature/risc-v)> [255] git diff --cached
  48. diff --git a/src/platforms/hosted/ftdi_bmp.c b/src/platforms/hosted/ftdi_bmp.c
  49. index 45ccf15d..dcfec9ed 100644
  50. --- a/src/platforms/hosted/ftdi_bmp.c
  51. +++ b/src/platforms/hosted/ftdi_bmp.c
  52. @@ -86,6 +86,17 @@ const cable_desc_s cable_desc[] = {
  53. .description = "FLOSS-JTAG",
  54. .name = "flossjtag",
  55. },
  56. + {
  57. + /*
  58. + * Direct connection from FTDI to JTAG/SWD.
  59. + * Pin 5 directly connected to RST.
  60. + */
  61. + .vendor = 0x0403U,
  62. + .product = 0x6010U,
  63. + .interface = INTERFACE_A,
  64. + .description = "Dual RS232-HS",
  65. + .name = "mdr187",
  66. + },
  67. {
  68. /*
  69. * MPSSE_SK (DB0) ----------- SWDCK/JTCK
  70. diff --git a/src/target/jtag_devs.c b/src/target/jtag_devs.c
  71. index 7ae4b5f2..c2a83eb9 100644
  72. --- a/src/target/jtag_devs.c
  73. +++ b/src/target/jtag_devs.c
  74. @@ -125,6 +125,12 @@ const jtag_dev_descr_s dev_descr[] = {
  75. .descr = "RISC-V debug v0.13.",
  76. .handler = riscv_jtag_dtm_handler,
  77. },
  78. + {
  79. + .idcode = 0x000006dfU,
  80. + .idmask = 0x0fffffffU,
  81. + .descr = "RISC-V debug v0.13",
  82. + .handler = riscv_jtag_dtm_handler,
  83. + },
  84. {
  85. .idcode = 0x000007a3U,
  86. .idmask = 0x00000fffU,
  87. diff --git a/src/target/jtag_scan.c b/src/target/jtag_scan.c
  88. index d3fc1e45..d6d53493 100644
  89. --- a/src/target/jtag_scan.c
  90. +++ b/src/target/jtag_scan.c
  91. @@ -300,8 +300,8 @@ static bool jtag_sanity_check(void)
  92. /* If the device count gleaned above does not match the device count, error out */
  93. if (device != jtag_dev_count) {
  94. DEBUG_ERROR("jtag_scan: Sanity check failed: BYPASS dev count doesn't match IR scan\n");
  95. - jtag_dev_count = 0;
  96. - return false;
  97. +// jtag_dev_count = 0;
  98. +// return false;
  99. }
  100.  
  101. /* Everything's accounted for, so clean up */
  102. mint-user@Workstation451 ~/g/b/blackmagic (feature/risc-v)> openocd -f ~/MLDR187-ft2232hl.cfg
  103. Open On-Chip Debugger 0.12.0-01005-g7a867d4e9 (2023-03-29-11:25)
  104. Licensed under GNU GPL v2
  105. For bug reports, read
  106. http://openocd.org/doc/doxygen/bugs.html
  107. Info : clock speed 3000 kHz
  108. Info : JTAG tap: riscv.cpu tap/device found: 0x000006df (mfg: 0x36f (JSC ICC Milandr), part: 0x0000, ver: 0x0)
  109. Error: failed write at 0x10, status=2
  110. Error: failed write at 0x10, status=2
  111. Error: failed write at 0x10, status=2
  112. Error: failed read at 0x10, status=2
  113. Warn : target riscv.cpu examination failed
  114. Info : starting gdb server for riscv.cpu on 3333
  115. Info : Listening on port 3333 for gdb connections
  116. Info : JTAG tap: riscv.cpu tap/device found: 0x000006df (mfg: 0x36f (JSC ICC Milandr), part: 0x0000, ver: 0x0)
  117. Error: failed write at 0x10, status=2
  118. Error: failed read at 0x10, status=2
  119. fish: Job 1, 'openocd -f ~/MLDR187-ft2232hl.c…' terminated by signal SIGSEGV (Address boundary error)
  120. mint-user@Workstation451 ~/g/b/blackmagic (feature/risc-v) [SIGSEGV]> openocd -f ~/MLDR187-ft2232hl.cfg
  121. Open On-Chip Debugger 0.12.0-01005-g7a867d4e9 (2023-03-29-11:25)
  122. Licensed under GNU GPL v2
  123. For bug reports, read
  124. http://openocd.org/doc/doxygen/bugs.html
  125. Info : clock speed 3000 kHz
  126. Info : JTAG tap: riscv.cpu tap/device found: 0x000006df (mfg: 0x36f (JSC ICC Milandr), part: 0x0000, ver: 0x0)
  127. Info : datacount=2 progbufsize=16
  128. Info : Disabling abstract command reads from CSRs.
  129. Info : Examined RISC-V core; found 1 harts
  130. Info : hart 0: XLEN=32, misa=0x40101104
  131. Info : starting gdb server for riscv.cpu on 3333
  132. Info : Listening on port 3333 for gdb connections
  133. Info : JTAG tap: riscv.cpu tap/device found: 0x000006df (mfg: 0x36f (JSC ICC Milandr), part: 0x0000, ver: 0x0)
  134. Reset
  135. Ready for Remote Connections
  136. Info : Listening on port 6666 for tcl connections
  137. Info : Listening on port 4444 for telnet connections
  138. ^Cshutdown command invoked
  139. mint-user@Workstation451 ~/g/b/blackmagic (feature/risc-v) [SIGINT]> cat ~/MLDR187-ft2232hl.cfg
  140. adapter speed 3000
  141. reset_config srst_only
  142.  
  143. adapter driver ftdi
  144. ftdi device_desc "Dual RS232-HS"
  145. ftdi vid_pid 0x0403 0x6010
  146. # channel 1 is used for interface UART
  147. ftdi channel 0
  148. # just TCK TDI TDO TMS, no reset
  149. ftdi layout_init 0x0028 0x02b
  150. ftdi layout_signal nSRST -data 0x0020 -oe 0x0020
  151. ## Milandr probe
  152. ## ftdi_tdo_sample_edge falling
  153. transport select jtag
  154. set _CHIPNAME riscv
  155. jtag newtap $_CHIPNAME cpu -irlen 5 -expected-id 0x000006df
  156. set _TARGETNAME $_CHIPNAME.cpu
  157. target create $_TARGETNAME riscv -chain-position $_TARGETNAME -work-area-phys 0x80010000 -work-area-size 0x2000
  158. $_TARGETNAME configure -event reset-end {echo Reset}
  159.  
  160. gdb_report_data_abort enable
  161. gdb_report_register_access_error enable
  162. gdb_memory_map enable
  163. gdb_flash_program enable
  164.  
  165. # flash bank bank0 mdr187 0x10000000 0x00040000 0 0 $_TARGETNAME 0 64 1 #page=4K
  166.  
  167. init
  168. reset halt
  169. echo "Ready for Remote Connections"
  170. mint-user@Workstation451 ~/g/b/blackmagic (feature/risc-v)>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement