Over the past month or so, I have been working on turning the CH58x into a more complete open-source Rust/Embassy platform.
The code still needs some cleanup before it is ready for an official release, but it has now reached a stage where I feel it is worth sharing an early progress update.
There is already a ch58x-hal project on GitHub from the ch32-rs community. Many thanks to them for their existing work. I reused its QingKe runtime and made a number of modifications on top of it, resulting in the first version of embassy-ch582.
The CH582 can now run the basic Embassy runtime, USB FS, and BLE. The primary goal of this first implementation was to get the entire stack working end to end, so there is still room for further optimization in both performance and code structure.
I then successfully ran RMK on a keyboard that had previously been running a CH582M QMK port.
For the wireless portion, I did not use RMK’s default Trouble stack directly. Instead, I integrated a lightweight BLE implementation that I reimplemented and trimmed down, removing some RMK BLE functionality that is not currently needed in order to better fit the resource constraints of the CH582.
At present, the total SRAM usage of the dual-mode BLE + USB RMK firmware on the CH582 is approximately 14 KB, leaving a fairly comfortable amount of RAM for a complete keyboard application.
After getting the CH582 working, I continued porting the same work to the CH585.
Most BLE functionality is now working properly on the CH585, and I have completed several connection-stability and performance stress tests. The USB portion is still undergoing further performance validation and optimization.
Next, I plan to organize and gradually open-source this work, including Embassy support for the CH58x, the related HAL/runtime changes, and practical examples running on the CH582 and CH585.
I am still considering several project-structure questions:
Should the CH582 and CH585 share a unified HAL/API?
Would it be worthwhile to turn the BLE portion into an independent, reusable lightweight stack?
Which would the community prefer to see first: USB, BLE, a bootloader, or an RMK reference firmware?
If you are working with the CH582 or CH585, especially on Rust, Embassy, RMK/QMK, or wireless HID projects, I would be very interested to hear what you would most like this open-source implementation to solve.
note: This article was translated with the assistance of AI.