probe-rs / rusty-probe-firmware

41 stars 15 forks source link

Doesn't support CH32 with probe-rs #28

Open jonathanherbstgrapple opened 3 weeks ago

jonathanherbstgrapple commented 3 weeks ago

I've been playing around with a WCH32 board. It has an onboard debugger which works with probe-rs, but when I try to run with the rusty probe I get this.

probe-rs run --chip CH32V307 target/riscv32imafc-unknown-none-elf/debug/blinky
Error: Connecting to the chip was unsuccessful.

Caused by:
    0: An error with the usage of the probe occurred
    1: The selected probe does not support the 'RISC-V' interface.
korken89 commented 2 weeks ago

It has not implemented that interface, only SWD / JTAG is supported by hardware. If you know how to implement the debug protocol used by the WCH32 series I'd welcome a PR to implement support!

jonathanherbstgrapple commented 2 weeks ago

It looks like their protocol is SWD, that's why I made a ticket here. Now, I'm not sure if it's a different brand of SWD than ARM SWD, but I wonder if probe-rs doesn't try because of some configuration that's communicated to it.

korken89 commented 2 weeks ago

Ah alright! I can't find if it's ADI v5 they implement, probably needs more looking.