kprasadvnsi / riscv-openocd-wch

OpenOCD source code for CH32V series MCUs released by Mounriver IDE
Other
49 stars 15 forks source link

Update for MRS v182 #4

Open Seneral opened 1 year ago

Seneral commented 1 year ago

I've updated my WCH Link firmware with MRS v182 and this OpenOCD version stopped working. So I requested the newest version. How do we want to integrate this? I suspect some people will still need the older version, I do not know what firmware version is currently in retail WCH Links. So either I make a PR to this branch, or we make a new branch. Would also not mind if we got the source version as a basis so changes are immediately obvious. I suggest we make a new branch that contains the source as found in #2 , then the first version, then the v182 version for easy viewing, and then perhaps make that branch the default.

a-v-s commented 1 year ago

It seems https://github.com/xu7wong/openocd_wchlink works with firmware 2.5 and 2.7

Seneral commented 1 year ago

Thanks, didn't test it but ran a diff and seems since the 5 months it was uploaded quite a few more changes were made. So mine is an even newer version. I'm tempted to make a new repository with all known version (including base versions) just to make seeing these changes more clear, since none of the previous uploaders seem to be interested.

a-v-s commented 1 year ago

With all these individual uploaders its hard to track which is the latest indeed. So one repo with different versions would be appreciated. I have not used MRS. The firmware 2.7 I mentioned was flashed by the WCH-LinkUtility as found on https://www.wch.cn/downloads/WCH-LinkUtility_ZIP.html as some WCH-Links I've bought came in ARM mode, and the said tool flashed it to a RISCV firmware. Does MRS flash an even newer firmware?

It seems the original version only worked with Firmware 2.3, and only debugged CH32V103. It showed some issues (breakpoints not working) when attempting to debug a CH32V203. Which all seem to work with the link I've posted. However, it needs to be configured with --disable-jlink --disable-werror to make it build.

Seneral commented 1 year ago

I had to use MRS 1.82 once while setting up my custom build & flash system and it updated it for me, yes. OpenOCD-wch says it is on revision 2.7, so the repo you linked might have been fine. Btw my WCH-Link is the integrated one in the CH32V307 dev board, so it must have been above 2.3 before the flash.

a-v-s commented 1 year ago

I have received my WCH-LinkE. Now it seems the xu7wong version does not support this MCU yet.

Seneral commented 1 year ago

Alright will setup said repo when I get home in a few hours. Remind me if its not up tomorrow

a-v-s commented 1 year ago

I'm off to visit my family tomorrow, won't be back until after christmas.

Seneral commented 1 year ago

Alright got around to set it up. If you know any more recent snapshots, I can update (or accept PRs). Kept the previous riscv-openocd history intact for the records https://github.com/Seneral/riscv-openocd-wch

a-v-s commented 1 year ago

Thanks