probe-rs: Connection to a Cortex-M0 based Chip VA10820 fails
I am trying to probe information for a Cortex-M0 based MCU using probe-rs.
I tried running probe-rs info for this but there seems to be some communication issue. I can connect with a JLinkServer without issues.
JLinkServer Output of command JLinkGDBServer -select USB -device Cortex-M0 -endian little -if JTAG-speed auto -LocalhostOnly:
va108xx-rs on update-va108xx [$»+⇡] via 🦀 v1.78.0 took 32s
❯ ./jlink-gdb.sh
SEGGER J-Link GDB Server V7.96k Command Line Version
JLinkARM.dll V7.96k (DLL compiled Jun 5 2024 13:26:06)
WARNING: Unknown command line parameter auto found.
Command line: -select USB -device Cortex-M0 -endian little -if JTAG-speed auto -LocalhostOnly
-----GDB Server start settings-----
GDBInit file: none
GDB Server Listening port: 2331
SWO raw output listening port: 2332
Terminal I/O port: 2333
Accept remote connection: localhost only
Generate logfile: off
Verify download: off
Init regs on start: off
Silent mode: off
Single run mode: off
Target connection timeout: 0 ms
------J-Link related settings------
J-Link Host interface: USB
J-Link script: none
J-Link settings file: none
------Target related settings------
Target device: Cortex-M0
Target device parameters: none
Target interface: JTAG
Target interface speed: 4000kHz
Target endian: little
Connecting to J-Link...
J-Link is connected.
Firmware: J-Link OB-STM32F103 V1 compiled Oct 30 2023 12:12:03
Hardware: V1.00
S/N: 660006392
Checking target voltage...
Target voltage: 3.30 V
Listening on TCP/IP port 2331
Connecting to target...
J-Link found 2 JTAG devices, Total IRLen = 9
JTAG ID: 0x0BA01477 (Cortex-M0)
Halting core...
Connected to target
Waiting for GDB connection...^CRestoring target state and closing J-Link connection...
Shutting down...
Output of probe-rs info
va108xx-rs on update-va108xx [$»+⇡] via 🦀 v1.78.0
❯ probe-rs info
Probing target via JTAG
INFO probe_rs::probe::jlink: J-Link: Firmware version: J-Link OB-STM32F103 V1 compiled Oct 30 2023 12:12:03
INFO probe_rs::probe::jlink: J-Link: Hardware version: J-Link 1.0.0
INFO probe_rs::probe::jlink: J-Link: Target voltage: 3.30 V
INFO probe_rs::probe::common: Found IDCODE: 0x040037E3 (Silicon Space Technology)
INFO probe_rs::probe::common: Found IDCODE: 0x0BA01477 (ARM Ltd)
INFO probe_rs::probe::common: JTAG DR scan complete, found 2 TAPs. [Some(IdCode { .0: 67123171, version: 0, part_number: 16387, manufacturer: 1009, manufacturer_continuation: 7, manufacturer_identity: 113, lsbit: true }), Some(IdCode { .0: 195040375, version: 0, part_number: 47617, manufacturer: 571, manufacturer_continuation: 4, manufacturer_identity: 59, lsbit: true })]
INFO probe_rs::probe::common: IR lengths are unambiguous: [5, 4]
INFO probe_rs::probe::common: Found 2 TAPs on reset scan
INFO probe_rs::probe: JtagChainItem { idcode: Some(IdCode { .0: 67123171, version: 0, part_number: 16387, manufacturer: 1009, manufacturer_continuation: 7, manufacturer_identity: 113, lsbit: true }), irlen: 5 }
INFO probe_rs::probe: JtagChainItem { idcode: Some(IdCode { .0: 195040375, version: 0, part_number: 47617, manufacturer: 571, manufacturer_continuation: 4, manufacturer_identity: 59, lsbit: true }), irlen: 4 }
ERROR write_dp_register: probe_rs::probe::arm_debug_interface: Unexpected DAP response: 0 dp=Default register=Select { .0: 0, ap_sel: 0, ap_bank_sel: 0, dp_bank_sel: 0 }
ERROR write_dp_register: probe_rs::probe::arm_debug_interface: Unexpected DAP response: 4 dp=Default register=Select { .0: 0, ap_sel: 0, ap_bank_sel: 0, dp_bank_sel: 0 }
ERROR write_dp_register: probe_rs::probe::arm_debug_interface: Unexpected DAP response: 4 dp=Default register=Select { .0: 0, ap_sel: 0, ap_bank_sel: 0, dp_bank_sel: 0 }
ERROR write_dp_register: probe_rs::probe::arm_debug_interface: Unexpected DAP response: 4 dp=Default register=Select { .0: 0, ap_sel: 0, ap_bank_sel: 0, dp_bank_sel: 0 }
ERROR write_dp_register: probe_rs::probe::arm_debug_interface: Unexpected DAP response: 0 dp=Default register=Select { .0: 0, ap_sel: 0, ap_bank_sel: 0, dp_bank_sel: 0 }
ERROR write_dp_register: probe_rs::probe::arm_debug_interface: Unexpected DAP response: 4 dp=Default register=Select { .0: 0, ap_sel: 0, ap_bank_sel: 0, dp_bank_sel: 0 }
.....
repeats very very often..
.....
Error showing ARM chip information for Debug Port Multidrop(285223207): An ARM specific error occurred.
Caused by:
0: An error occurred in the communication with an access port or debug port.
1: Target device did not respond to request.
RISC-V Chip:
IDCODE: 006db6eb6d
Version: 6
Part: 56174
Manufacturer: 1462 (Zyzyx)
Xtensa Chip:
IDCODE: 0000000002
Version: 0
Part: 0
Manufacturer: 1 (AMD)
Probing target via SWD
INFO probe_rs::probe::jlink: J-Link: Firmware version: J-Link OB-STM32F103 V1 compiled Oct 30 2023 12:12:03
INFO probe_rs::probe::jlink: J-Link: Hardware version: J-Link 1.0.0
INFO probe_rs::probe::jlink: J-Link: Target voltage: 3.30 V
Error showing ARM chip information for Debug Port Default: An ARM specific error occurred.
Caused by:
0: An error occurred in the communication with an access port or debug port.
1: Target device did not respond to request.
Trying alternate multi-drop debug ports
Error showing ARM chip information for Debug Port Multidrop(16787751): An ARM specific error occurred.
Caused by:
0: An error occurred in the communication with an access port or debug port.
1: Target device did not respond to request.
Error showing ARM chip information for Debug Port Multidrop(285223207): An ARM specific error occurred.
Caused by:
0: An error occurred in the communication with an access port or debug port.
1: Target device did not respond to request.
Debugging RISC-V targets over SWD is not supported. For these targets, JTAG is the only supported protocol. RISC-V specific information cannot be printed.
Debugging Xtensa targets over SWD is not supported. For these targets, JTAG is the only supported protocol. Xtensa specific information cannot be printed.
Relevant outputs with debug level enabled:
❯ RUST_LOG=probe_rs=debug probe-rs info --chip VA108xx --chip-description-path scripts/VA108xx_Series.yaml --speed 100
DEBUG list_cmsisdap_devices: probe_rs::probe::cmsisdap::tools: Searching for CMSIS-DAP probes using nusb
DEBUG list_cmsisdap_devices: probe_rs::probe::cmsisdap::tools: Found 0 CMSIS-DAP probes using nusb, searching HID
DEBUG list_cmsisdap_devices: probe_rs::probe::cmsisdap::tools: Found 0 CMSIS-DAP probes total
DEBUG list_wlink_devices: probe_rs::probe::wlink: Searching for WCH-Link(RV) probes
DEBUG list_wlink_devices: probe_rs::probe::wlink: Found 0 WCH-Link probes total
DEBUG probe_rs::probe::cmsisdap::tools: Attempting to open 1366:0101 in CMSIS-DAP v1 mode
DEBUG probe_rs::probe::jlink: scanning 1 interfaces
DEBUG probe_rs::probe::jlink: J-Link interface is #0
DEBUG probe_rs::probe::jlink: legacy caps: CapabilityFlags(GetHwVersion | ReadConfig | WriteConfig | SpeedInfo | GetMaxBlockSize | GetHwInfo | ResetStopTimed | SelectIf | GetCounters | GetCpuCaps | ExecCpuCmd | Swo | Register | Indicators | GetCapsEx)
DEBUG probe_rs::probe::jlink::capabilities: unknown ext. capability bits: 0xC00A140006C0C98EA5A33 truncated to 0x98EA5A33 (CapabilityFlags(Reserved0 | GetHwVersion | ReadConfig | WriteConfig | SpeedInfo | GetMaxBlockSize | GetHwInfo | ResetStopTimed | SelectIf | GetCounters | GetCpuCaps | ExecCpuCmd | Swo | Register | Indicators | GetCapsEx))
DEBUG probe_rs::probe::jlink: extended caps: CapabilityFlags(GetHwVersion | ReadConfig | WriteConfig | SpeedInfo | GetMaxBlockSize | GetHwInfo | ResetStopTimed | SelectIf | GetCounters | GetCpuCaps | ExecCpuCmd | Swo | Register | Indicators | GetCapsEx)
DEBUG probe_rs::probe::jlink: J-Link returned interface CJtag, which is not supported by probe-rs.
DEBUG probe_rs::probe::jlink: J-Link max mem block size for SWD IO: 10336 byte
DEBUG probe_rs::probe::jlink: Supported speeds: SpeedInfo { base_freq: 18000000, min_div: 9 }
INFO probe_rs::util::common_options: Protocol speed 100 kHz
Probing target via JTAG
DEBUG probe_rs::probe::jlink: Attaching to J-Link
DEBUG probe_rs::probe::jlink: Attaching with protocol 'JTAG'
DEBUG probe_rs::probe::jlink: J-Link: Capabilities: CapabilityFlags(GetHwVersion | ReadConfig | WriteConfig | SpeedInfo | GetMaxBlockSize | GetHwInfo | ResetStopTimed | SelectIf | GetCounters | GetCpuCaps | ExecCpuCmd | Swo | Register | Indicators | GetCapsEx)
INFO probe_rs::probe::jlink: J-Link: Firmware version: J-Link OB-STM32F103 V1 compiled Oct 30 2023 12:12:03
INFO probe_rs::probe::jlink: J-Link: Hardware version: J-Link 1.0.0
INFO probe_rs::probe::jlink: J-Link: Target voltage: 3.30 V
DEBUG probe_rs::probe::jlink: Resetting JTAG chain using trst
DEBUG probe_rs::probe::common: Resetting JTAG chain by setting tms high for 5 bits
DEBUG probe_rs::probe::common: Response to reset: []
DEBUG probe_rs::probe::common: Write DR: [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255], len=256
DEBUG probe_rs::probe::common: DR: BitVec<u8, bitvec::order::Lsb0> { addr: 0x5c5c34eae1f0, head: 000, bits: 256, capacity: 256 } [1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 1, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 0, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
INFO probe_rs::probe::common: Found IDCODE: 0x040037E3 (Silicon Space Technology)
INFO probe_rs::probe::common: Found IDCODE: 0x0BA01477 (ARM Ltd)
INFO probe_rs::probe::common: JTAG DR scan complete, found 2 TAPs. [Some(IdCode { .0: 67123171, version: 0, part_number: 16387, manufacturer: 1009, manufacturer_continuation: 7, manufacturer_identity: 113, lsbit: true }), Some(IdCode { .0: 195040375, version: 0, part_number: 47617, manufacturer: 571, manufacturer_continuation: 4, manufacturer_identity: 59, lsbit: true })]
DEBUG probe_rs::probe::common: Scanning JTAG chain for IR lengths
DEBUG probe_rs::probe::common: Write IR: [255, 255], len=16
DEBUG probe_rs::probe::common: IR scan: [1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1]
DEBUG probe_rs::probe::common: Resetting JTAG chain by setting tms high for 5 bits
DEBUG probe_rs::probe::common: Response to reset: []
DEBUG probe_rs::probe::common: Write IR: [0, 0, 255, 255], len=32
DEBUG probe_rs::probe::common: IR scan: [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1]
DEBUG probe_rs::probe::common: IR scan: [1, 0, 0, 0, 0, 1, 0, 0, 0]
INFO probe_rs::probe::common: IR lengths are unambiguous: [5, 4]
INFO probe_rs::probe::common: Found 2 TAPs on reset scan
DEBUG probe_rs::probe::common: Detected IR lens: [5, 4]
INFO probe_rs::probe: JtagChainItem { idcode: Some(IdCode { .0: 67123171, version: 0, part_number: 16387, manufacturer: 1009, manufacturer_continuation: 7, manufacturer_identity: 113, lsbit: true }), irlen: 5 }
INFO probe_rs::probe: JtagChainItem { idcode: Some(IdCode { .0: 195040375, version: 0, part_number: 47617, manufacturer: 571, manufacturer_continuation: 4, manufacturer_identity: 59, lsbit: true }), irlen: 4 }
DEBUG probe_rs::probe::common: Setting chain params: ChainParams { irpre: 0, irpost: 4, drpre: 0, drpost: 1, irlen: 5 }
DEBUG probe_rs::probe::common: Setting max_ir_address to 31
DEBUG probe_rs::probe::jlink: Attached succesfully
DEBUG probe_rs::cmd::info: Trying to show ARM chip information
DEBUG debug_port_setup: probe_rs::architecture::arm::sequences: Setting up debug port Default
DEBUG debug_port_setup: probe_rs::architecture::arm::sequences: Performing SWD line reset
DEBUG debug_port_setup:debug_port_connect: probe_rs::architecture::arm::sequences: JTAG: No special sequence needed to connect to debug port
DEBUG debug_port_start:write_dp_register: probe_rs::architecture::arm::dp: Writing DP register ABORT, value=0x0000001f dp=Default register=Abort { .0: 31 }
DEBUG debug_port_start:write_dp_register: probe_rs::probe::arm_debug_interface: Performing 1 transfers (0 additional transfers) dp=Default register=Abort { .0: 31 }
DEBUG debug_port_start:write_dp_register: probe_rs::probe::common: Write IR: [8, 0, 0, 0], len=5 dp=Default register=Abort { .0: 31 }
DEBUG debug_port_start:write_dp_register: probe_rs::probe::common: Write DR: [8, 0, 0, 0, 0, 0, 0, 0], len=35 dp=Default register=Abort { .0: 31 }
DEBUG debug_port_start:write_dp_register: probe_rs::architecture::arm::dp: Writing DP register SELECT, value=0x00000000 dp=Default register=Select { .0: 0, ap_sel: 0, ap_bank_sel: 0, dp_bank_sel: 0 }
DEBUG debug_port_start:write_dp_register: probe_rs::probe::arm_debug_interface: Performing 1 transfers (0 additional transfers) dp=Default register=Select { .0: 0, ap_sel: 0, ap_bank_sel: 0, dp_bank_sel: 0 }
DEBUG debug_port_start:write_dp_register: probe_rs::probe::common: Write IR: [10, 0, 0, 0], len=5 dp=Default register=Select { .0: 0, ap_sel: 0, ap_bank_sel: 0, dp_bank_sel: 0 }
DEBUG debug_port_start:write_dp_register: probe_rs::probe::common: Write DR: [4, 0, 0, 0, 0, 0, 0, 0], len=35 dp=Default register=Select { .0: 0, ap_sel: 0, ap_bank_sel: 0, dp_bank_sel: 0 }
ERROR debug_port_start:write_dp_register: probe_rs::probe::arm_debug_interface: Unexpected DAP response: 0 dp=Default register=Select { .0: 0, ap_sel: 0, ap_bank_sel: 0, dp_bank_sel: 0 }
DEBUG debug_port_start:write_dp_register: probe_rs::probe::common: Write DR: [7, 0, 0, 0, 0, 0, 0, 0], len=35 dp=Default register=Select { .0: 0, ap_sel: 0, ap_bank_sel: 0, dp_bank_sel: 0 }
ERROR debug_port_start:write_dp_register: probe_rs::probe::arm_debug_interface: Unexpected DAP response: 4 dp=Default register=Select { .0: 0, ap_sel: 0, ap_bank_sel: 0, dp_bank_sel: 0 }
DEBUG debug_port_start:write_dp_register: probe_rs::probe::common: Write DR: [3, 0, 0, 0, 0, 0, 0, 0], len=35 dp=Default register=Select { .0: 0, ap_sel: 0, ap_bank_sel: 0, dp_bank_sel: 0 }
ERROR debug_port_start:write_dp_register: probe_rs::probe::arm_debug_interface: Unexpected DAP response: 4 dp=Default register=Select { .0: 0, ap_sel: 0, ap_bank_sel: 0, dp_bank_sel: 0 }
DEBUG debug_port_start:write_dp_register: probe_rs::probe::common: Write DR: [7, 0, 0, 0, 0, 0, 0, 0], len=35 dp=Default register=Select { .0: 0, ap_sel: 0, ap_bank_sel: 0, dp_bank_sel: 0 }
ERROR debug_port_start:write_dp_register: probe_rs::probe::arm_debug_interface: Unexpected DAP response: 4 dp=Default register=Select { .0: 0, ap_sel: 0, ap_bank_sel: 0, dp_bank_sel: 0 }
DEBUG debug_port_start:write_dp_register: probe_rs::probe::common: Write DR: [4, 0, 0, 0, 0, 0, 0, 0], len=35 dp=Default register=Select { .0: 0, ap_sel: 0, ap_bank_sel: 0, dp_bank_sel: 0 }
ERROR debug_port_start:write_dp_register: probe_rs::probe::arm_debug_interface: Unexpected DAP response: 0 dp=Default register=Select { .0: 0, ap_sel: 0, ap_bank_sel: 0, dp_bank_sel: 0 }
This MCU is from the same vendor as the one mentioned in this issue: https://github.com/probe-rs/probe-rs/issues/2563
About this issue
- Original URL
- State: open
- Created 2 years ago
- Comments: 19 (19 by maintainers)
I think I have made a bad assumption here. I believe this condition, which was meant to be an optimisation, is not compatible with the ARM IR commands. This
ifprevents repeated reads from completing, so that’s why the same value is read over and over and over again.I will submit a PR once I have a reliable reproducer connected to my tester setup.