[bsp][ch32v003] add CH32V003F4P6-EVT support - #11838
Conversation
Default image keeps GPIO and UART1 so the console can reach msh.
|
👋 感谢您对 RT-Thread 的贡献!Thank you for your contribution to RT-Thread! 为确保代码符合 RT-Thread 的编码规范,请在你的仓库中执行以下步骤运行代码格式化工作流(如果格式化CI运行失败)。 🛠 操作步骤 | Steps
完成后,提交将自动更新至 如有问题欢迎联系我们,再次感谢您的贡献!💐 |
📌 Code Review Assignment🏷️ Tag: bsp_wchReviewers: @Maihuanyi Changed Files (Click to expand)
📊 Current Review Status (Last Updated: 2026-09-27 19:36 CST)
📝 Review Instructions
|
clang-format wants braces on short if statements. The WCH peripheral library stays ignored so the vendor copy is unchanged.
A change under bsp/wch selects every WCH board in CI. The vendor library ignore now sits next to this board.
|
111,这边也需要check一下 |
| _uart.close = _close; | ||
| _uart.read = _read; | ||
| _uart.write = _write; | ||
| rt_thread_idle_sethook(_wake); |
There was a problem hiding this comment.
因为这颗只有2KB的RAM、16KB的Flash,装不下 serial 框架,也没有余量再开接收线程。中断里只把字节放进 16 字节缓冲。msh 等输入时系统是空闲的,idle 钩子里再调 rx_indicate 唤醒它。
There was a problem hiding this comment.
其实还是相同的问题,这个板子的空间太小了。我已经在用gcc的c库了:
rt-thread/bsp/wch/risc-v/ch32v003f4p6-evt/rtconfig.py
Lines 38 to 42 in 9e2383c
但是有几个函数装不下:strtoul、strtod 和 malloc。所以这几个在换成了小的实现,其余函数仍用库里的。
UART1 is the only driver in the default image. The other on-chip blocks stay marked unsupported until they are exercised.
The shared weak trigger does nothing, and the weak clear spins. On this V2 core the interrupt is raised with SysTick control bit 31 and cleared after the context is saved.
Summary
Test plan
-march=rv32ec -mabi=ilp32e). The image is 15680 bytes of the 16KB flash.MCU: CH32V003F4P6, andmsh >.helplistshelpandbacktrace.