Author Topic: ch32v307, risc-v minicore with ethernet  (Read 39449 times)

0 Members and 1 Guest are viewing this topic.

Online brucehoult

  • Super Contributor
  • ***
  • Posts: 4087
  • Country: nz
Re: ch32v307, risc-v minicore with ethernet
« Reply #200 on: May 12, 2024, 09:29:27 am »
In my knowledge, the only documented protocol is SDI 1-wire used on ch32v003 series, not the SWD-alike (CK+DIO) used by others chips of this series...

oops, my mistake.
 

Offline mean00

  • Newbie
  • Posts: 4
  • Country: fr
Re: ch32v307, risc-v minicore with ethernet
« Reply #201 on: May 12, 2024, 01:10:45 pm »
Hi,
The RVswd is not fully documented and has not been completely reverse engineered.
Perigoso on github did a part of the job, and i replayed a capture of a wchlink until it worked.
What has been RE is the protocol to talk to the WCH link, and then the WCH link converts to RVSWD.

My RE is not 100% correct/complete, but "good enougth", i.e. it works.


and yes, swindle works on a RP2040, GD32F303 and CH32F3XX so you can use a CH32F30x to debug another one
There is a small kicad PCB in the kicad folder to do just that (use a  CH32V303RCT6 to debug CH32V3xx)

I like a lot the  CH32V3XX family (especially the CH32F303RCT6) . It is fast, the FPU & fast interrupt helps a lot, mostly compatible with STM32F103 and cheap.
 It has a couple of annoying quirks :
There is no watchpoint (i.e. break on read/write/access) (no breakpoint at all on the CH32V2xx, unusable)
The RVSWD protocol is a bit slow. If you deal with huge executable uploading them through DFU then debugging it is faster.





 

Offline mean00

  • Newbie
  • Posts: 4
  • Country: fr
Re: ch32v307, risc-v minicore with ethernet
« Reply #202 on: May 12, 2024, 01:30:48 pm »
If it is of interest i can upload the swindle binary for CH32V3xx
You'll have to upload the bootloader through wchlink and then you can upload the main app over USB ( USB DFU)

BTW, one of the thing i didnt like about the openocd/wchlink port, is that it erases the whole flash, so that raises problem when you use a custom bootloader.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf