-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Add Zephyr RTOS support for WCH CH32V003 #73761
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
Add Zephyr RTOS support for WCH CH32V003 #73761
Conversation
|
Hello @kholia, and thank you very much for your first pull request to the Zephyr project! |
|
The following west manifest projects have changed revision in this Pull Request:
⛔ DNM label due to: 1 added project Note: This message is automatically posted and updated by the Manifest GitHub Action. |
26f6f3e to
ca12333
Compare
|
@kartben @fabiobaltieri Does the following patch look okay to you? diff --git a/boards/wch/ch32v003evt/ch32v003evt.dts b/boards/wch/ch32v003evt/ch32v003evt.dts
index 3f442754712..e369d82565e 100644
--- a/boards/wch/ch32v003evt/ch32v003evt.dts
+++ b/boards/wch/ch32v003evt/ch32v003evt.dts
@@ -32,6 +32,12 @@
};
};
+&red_led {
+ status = "disabled"; // Please connect the unconnected LED on the WCH
+ // CH32V003EVT board to a suitable GPIO pin (like PD4)
+ // and then change this status to "okay".
+};
+
&clk_hse {
clock-frequency = <DT_FREQ_M(24)>;
status = "okay"; |
No that does nothing, disable the whole |
This commit adds support for the CH32V003EVT board which features a 32-bit general-purpose RISC-V MCU. Signed-off-by: Michael Hope <[email protected]> Signed-off-by: Dhiru Kholia <[email protected]>
This commit adds a runner wrapper for the 'minichlink' program which offers a free, open mechanism to use the CH-LinkE programming dongle for the CH32V003. https://github.com/cnlohr/ch32v003fun/tree/master/minichlink Signed-off-by: Michael Hope <[email protected]> Signed-off-by: Dhiru Kholia <[email protected]>
ca12333 to
771c85c
Compare
kartben
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀
de19a13
into
zephyrproject-rtos:main
|
Hi @kholia! To celebrate this milestone and showcase your contribution, we'd love to award you the Zephyr Technical Contributor badge. If you're interested, please claim your badge by filling out this form: Claim Your Zephyr Badge. Thank you for your valuable input, and we look forward to seeing more of your contributions in the future! 🪁 |
|
@kholia and everyone, thanks for your patience and persistence with this. |
|
@nzmichaelh Hey - You can queue up rest of the drivers now - thank you! <3 |
|
Thanks everyone! I'll get going on the console, ADC, I2C, SPI, and WDT drivers... |
|
Also, if anyone is interested/curious, newer versions of 003fun support the ch32x033, x035, v203, v305 and v307. (With no-quite-complete support for the v103 and v208). But amazing work everyone. Thank you @kholia for driving this to ground. That was quite the 205 days! |
|
btw @nzmichaelh @kholia feel free to claim your Zephyr Maintainer badge here: forms.gle/oCw9iAPLhUsHTapc8 :) |
Hi @nzmichaelh |
|
If you're interested ch32v003fun is now ch32fun (main repo will soon be renamed) we have full support for the ch32v303 now. |
@miggazElquez sorry for the delay. Yip, I have drivers for the ADC, IWDT, console, and PWM at https://github.com/nzmichaelh/zephyr/commits/ch32v003/ Have a look in the ch32v-* branches as well. |
|
@nzmichaelh It is necessary to adapt the DMA operation of UART, because the CPU is too late to deal with the receive interruption at a high receive baud rate, and it is easy to lose data |
|
@Colt-Ma - this change was merged some time ago. At this point, it's best to file an issue / bug report https://github.com/zephyrproject-rtos/zephyr/issues/new/choose |
Details
This PR adds Zephyr RTOS support for WCH CH32V003 RISC-V MCU.
https://www.wch-ic.com/products/CH32V003.html
Usage
Run CI checks locally
Tested On
Bare CH32V003J4M6 SOP-8 chip
WCH CH32V003EVT board (CH32V003 Evaluation Kit)
Blinky Build
Build
Hello WorldIt is fun to see Zephyr RTOS running on a "10 cent" MCU.
Board Doc Preview (edit by cfriedt)