-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Trouble Debugging CH32V203C8T6 Using Arduino #150
Comments
In the past months I've been able to use the debugger within Arduino 2.3.2 IDE (in Windows 11) to debug the CH32V003 quite successfully. Break, step into, watch, etc. all work fine. All I needed to do was to compile with debug symbols and debug optimization. Unfortunately at the moment I don't have the CH32V203, but coincidentally earlier today I ordered some of these chips (the F8P6 model). Hopefully within a few weeks I can upload some code and then let you know my experience. In the mean time: |
I'm running Arduino 2.3.3 on Windows 11. I just hooked up a CH32V003F4P6.
I followed the instructions found at GitHub - openwch/arduino_core_ch32:
Core library for CH32duino <https://github.com/openwch/arduino_core_ch32>.
While I can build and flash sketches, Arduino tells me that debugging is
not supported:
[image: image.png]
…On Sat, Sep 28, 2024 at 4:59 PM Maxint R&D ***@***.***> wrote:
In the past months I've been able to use the debugger within Arduino 2.3.2
IDE (in Windows 11) to debug the CH32V003 quite successfully.
At the moment I don't have the CH32V203, but coincidentally earlier today
I ordered some of these chips. Hopefully within a few weeks I can upload
some code and then let you know my experience.
In the mean time:
What is your environment?
Do you perhaps also have the V003 to try first?
—
Reply to this email directly, view it on GitHub
<#150 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAUQ2UDM7AKDU4PDJNU7SADZY4KDDAVCNFSM6AAAAABPA5EZX6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGOBQHA4TGMZRGU>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
If debugging isn't working for the CH32V003 either, you may not have the latest version of the CH32 Arduino core installed. Please note that the latest published release is 1.0.4 (dated december 2023), but many new features that have been added are not in that release. For those features you need the code in the main branche. Debugging was merged in PR #68 "Add debug feature" in february 2024. In the last comment of that PR you can read what someone else did to get debugging working. (BTW. This core is maintained by @TianpeiLee in his spare time. Although it would be nice to have the latest code published into a proper release, this is the better than no support at all). |
Ah, makes sense now. Could you possibly point me to instructions on how to
build and use the latest CH32 Arduino core?
…On Sun, Sep 29, 2024 at 11:15 AM Maxint R&D ***@***.***> wrote:
If debugging isn't working for the CH32V003 either, you may not have the
latest version of the CH32 Arduino core installed.
Please note that the latest published release is 1.0.4 (dated december
2023), but many new features that have been added are not in that release.
For those features you need the code in the main branche.
Debugging was merged in PR #68
<#68> "Add debug
feature" in february 2024. In the last comment
<#68 (comment)>
of that PR you can read what someone else did to get debugging working.
(BTW. This core is maintained by @TianpeiLee
<https://github.com/TianpeiLee> in his spare time. Although it would be
nice to have the latest code published into a proper release, this is the
better than no support at all).
—
Reply to this email directly, view it on GitHub
<#150 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAUQ2UFMXAAXUHURKNBRPTLZZAKRBAVCNFSM6AAAAABPA5EZX6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGOBRGM4TINJVG4>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
I installed release 1.0.4 using the library manager and then copied over the newer sources. Read this post for more details. In my version I've also made some other changes, for instance to have interrupt driven Serial1 and be able to read VCC. For my CH32V003 projects I also modified the board.txt to allow enabling modules in the IDE. For using watchdog and sleep I modified Adafruit_SleepyDog. |
That did the trick! I'm now successfully debugging my CH32V board.
I did run into the issue where the IDE hangs while downloading index
files. However, after finding that others have encountered this and
reading the comment chain, I found by unplugging and replugging the board
that issue disappeared.
Thanks for your help! I really appreciate it!
…On Sun, Sep 29, 2024 at 6:56 PM Maxint R&D ***@***.***> wrote:
Could you possibly point me to instructions on how to build and use the
latest CH32 Arduino core?
I installed release 1.0.4 using the library manager and then copied over
the newer sources. Read this post
<#68 (comment)>
for more details.
In my version I've also made some other changes, for instance to have interrupt
driven Serial1 <#145>
and be able to read VCC
<https://github.com/maxint-rd/arduino_core_ch32/tree/Fix-reading-PADC_VREF>.
For my CH32V003 projects I also modified the board.txt to allow enabling
modules in the IDE. For using watchdog and sleep I modified
Adafruit_SleepyDog <https://github.com/maxint-rd/Adafruit_SleepyDog>.
—
Reply to this email directly, view it on GitHub
<#150 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAUQ2UHFK5COT54UC5ORARTZZCASJAVCNFSM6AAAAABPA5EZX6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGOBRGY2DCNZYGU>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Good to see you got it working! When I got debugging working I was very pleased. Congratulations and happy debugging! |
The marked sentence in the below image leads me to think that Arduino should be able to debug code on CH32V boards, but Arduino seems to not be able to do this.
Am I misunderstanding this sentence? If so, could you please direct me to a description of how to debug code on these chips?
Thank you!
The text was updated successfully, but these errors were encountered: