Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- mint-user@Workstation451 ~/g/b/blackmagic (feature/risc-v) [255]> ./src/blackmagic -c mdr187 -tjv 5
- Black Magic Debug App v1.10.0-rc0-78-ga705f960-dirty
- for Black Magic Probe, ST-Link v2 and v3, CMSIS-DAP, J-Link and FTDI (MPSSE)
- Using 0403:6010 <no serial number> FTDI
- Dual RS232-HS ---
- Running in Test Mode
- Target voltage: (null) Volt
- Speed set to 3.750MHz for JTAG
- Resetting TAP
- Change state to Shift-DR
- Scanning out ID codes
- Return to Run-Test/Idle
- Change state to Shift-IR
- Scanning out IRs
- Return to Run-Test/Idle
- Change state to Shift-DR
- jtag_scan: Sanity check failed: BYPASS dev count doesn't match IR scan
- Return to Run-Test/Idle
- ID code 0x000006df: RISC-V debug v0.13
- RISC-V debug v0.13/v1.0 DMI
- RISC-V debug v0.13 DM
- Hart has 2 data registers
- Attempting 64-bit read on misa
- Reading 64-bit CSR 301
- CSR access failed: 2
- Unknown address width, defaulting to 32
- Reading 32-bit CSR f11
- CSR access failed: 2
- Reading 64-bit CSR f12
- CSR access failed: 2
- Reading 64-bit CSR f13
- CSR access failed: 2
- Reading 64-bit CSR f14
- CSR access failed: 2
- Hart 0: 64-bit RISC-V (arch = 00000000), vendor = 0, impl = 0, exts = 00000000
- Writing 32-bit CSR 7a0
- CSR access failed: 2
- -> riscv64_probe
- Probing failed, please report unknown RISC-V 64 device
- Reading 32-bit CSR 7b0
- CSR access failed: 2
- DMI read at 0x0000001d failed with status 2
- Error while reading the next DM base address
- *** 1 RISC-V rv64
- DMI write at 0x00000010 failed with status 2
- Can not attach to target 1
- mint-user@Workstation451 ~/g/b/blackmagic (feature/risc-v)> [255] git diff --cached
- diff --git a/src/platforms/hosted/ftdi_bmp.c b/src/platforms/hosted/ftdi_bmp.c
- index 45ccf15d..dcfec9ed 100644
- --- a/src/platforms/hosted/ftdi_bmp.c
- +++ b/src/platforms/hosted/ftdi_bmp.c
- @@ -86,6 +86,17 @@ const cable_desc_s cable_desc[] = {
- .description = "FLOSS-JTAG",
- .name = "flossjtag",
- },
- + {
- + /*
- + * Direct connection from FTDI to JTAG/SWD.
- + * Pin 5 directly connected to RST.
- + */
- + .vendor = 0x0403U,
- + .product = 0x6010U,
- + .interface = INTERFACE_A,
- + .description = "Dual RS232-HS",
- + .name = "mdr187",
- + },
- {
- /*
- * MPSSE_SK (DB0) ----------- SWDCK/JTCK
- diff --git a/src/target/jtag_devs.c b/src/target/jtag_devs.c
- index 7ae4b5f2..c2a83eb9 100644
- --- a/src/target/jtag_devs.c
- +++ b/src/target/jtag_devs.c
- @@ -125,6 +125,12 @@ const jtag_dev_descr_s dev_descr[] = {
- .descr = "RISC-V debug v0.13.",
- .handler = riscv_jtag_dtm_handler,
- },
- + {
- + .idcode = 0x000006dfU,
- + .idmask = 0x0fffffffU,
- + .descr = "RISC-V debug v0.13",
- + .handler = riscv_jtag_dtm_handler,
- + },
- {
- .idcode = 0x000007a3U,
- .idmask = 0x00000fffU,
- diff --git a/src/target/jtag_scan.c b/src/target/jtag_scan.c
- index d3fc1e45..d6d53493 100644
- --- a/src/target/jtag_scan.c
- +++ b/src/target/jtag_scan.c
- @@ -300,8 +300,8 @@ static bool jtag_sanity_check(void)
- /* If the device count gleaned above does not match the device count, error out */
- if (device != jtag_dev_count) {
- DEBUG_ERROR("jtag_scan: Sanity check failed: BYPASS dev count doesn't match IR scan\n");
- - jtag_dev_count = 0;
- - return false;
- +// jtag_dev_count = 0;
- +// return false;
- }
- /* Everything's accounted for, so clean up */
- mint-user@Workstation451 ~/g/b/blackmagic (feature/risc-v)> openocd -f ~/MLDR187-ft2232hl.cfg
- Open On-Chip Debugger 0.12.0-01005-g7a867d4e9 (2023-03-29-11:25)
- Licensed under GNU GPL v2
- For bug reports, read
- http://openocd.org/doc/doxygen/bugs.html
- Info : clock speed 3000 kHz
- Info : JTAG tap: riscv.cpu tap/device found: 0x000006df (mfg: 0x36f (JSC ICC Milandr), part: 0x0000, ver: 0x0)
- Error: failed write at 0x10, status=2
- Error: failed write at 0x10, status=2
- Error: failed write at 0x10, status=2
- Error: failed read at 0x10, status=2
- Warn : target riscv.cpu examination failed
- Info : starting gdb server for riscv.cpu on 3333
- Info : Listening on port 3333 for gdb connections
- Info : JTAG tap: riscv.cpu tap/device found: 0x000006df (mfg: 0x36f (JSC ICC Milandr), part: 0x0000, ver: 0x0)
- Error: failed write at 0x10, status=2
- Error: failed read at 0x10, status=2
- fish: Job 1, 'openocd -f ~/MLDR187-ft2232hl.c…' terminated by signal SIGSEGV (Address boundary error)
- mint-user@Workstation451 ~/g/b/blackmagic (feature/risc-v) [SIGSEGV]> openocd -f ~/MLDR187-ft2232hl.cfg
- Open On-Chip Debugger 0.12.0-01005-g7a867d4e9 (2023-03-29-11:25)
- Licensed under GNU GPL v2
- For bug reports, read
- http://openocd.org/doc/doxygen/bugs.html
- Info : clock speed 3000 kHz
- Info : JTAG tap: riscv.cpu tap/device found: 0x000006df (mfg: 0x36f (JSC ICC Milandr), part: 0x0000, ver: 0x0)
- Info : datacount=2 progbufsize=16
- Info : Disabling abstract command reads from CSRs.
- Info : Examined RISC-V core; found 1 harts
- Info : hart 0: XLEN=32, misa=0x40101104
- Info : starting gdb server for riscv.cpu on 3333
- Info : Listening on port 3333 for gdb connections
- Info : JTAG tap: riscv.cpu tap/device found: 0x000006df (mfg: 0x36f (JSC ICC Milandr), part: 0x0000, ver: 0x0)
- Reset
- Ready for Remote Connections
- Info : Listening on port 6666 for tcl connections
- Info : Listening on port 4444 for telnet connections
- ^Cshutdown command invoked
- mint-user@Workstation451 ~/g/b/blackmagic (feature/risc-v) [SIGINT]> cat ~/MLDR187-ft2232hl.cfg
- adapter speed 3000
- reset_config srst_only
- adapter driver ftdi
- ftdi device_desc "Dual RS232-HS"
- ftdi vid_pid 0x0403 0x6010
- # channel 1 is used for interface UART
- ftdi channel 0
- # just TCK TDI TDO TMS, no reset
- ftdi layout_init 0x0028 0x02b
- ftdi layout_signal nSRST -data 0x0020 -oe 0x0020
- ## Milandr probe
- ## ftdi_tdo_sample_edge falling
- transport select jtag
- set _CHIPNAME riscv
- jtag newtap $_CHIPNAME cpu -irlen 5 -expected-id 0x000006df
- set _TARGETNAME $_CHIPNAME.cpu
- target create $_TARGETNAME riscv -chain-position $_TARGETNAME -work-area-phys 0x80010000 -work-area-size 0x2000
- $_TARGETNAME configure -event reset-end {echo Reset}
- gdb_report_data_abort enable
- gdb_report_register_access_error enable
- gdb_memory_map enable
- gdb_flash_program enable
- # flash bank bank0 mdr187 0x10000000 0x00040000 0 0 $_TARGETNAME 0 64 1 #page=4K
- init
- reset halt
- echo "Ready for Remote Connections"
- mint-user@Workstation451 ~/g/b/blackmagic (feature/risc-v)>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement