{"id":15011945,"url":"https://github.com/community-pio-ch32v/platform-ch32v","last_synced_at":"2025-05-16T14:08:02.749Z","repository":{"id":83395164,"uuid":"603543027","full_name":"Community-PIO-CH32V/platform-ch32v","owner":"Community-PIO-CH32V","description":"PlatformIO platform for CH32V RISC-V chips (CH32V003, CH32V103, CH32V20x, CH32V30x, CH32X035) and CH56x, CH57x, CH58x, CH59x","archived":false,"fork":false,"pushed_at":"2025-04-09T17:43:24.000Z","size":8788,"stargazers_count":293,"open_issues_count":13,"forks_count":45,"subscribers_count":12,"default_branch":"develop","last_synced_at":"2025-05-16T14:07:56.344Z","etag":null,"topics":["ble","ch32v","firmware","microcontroller","platformio","platformio-platform","risc-v"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Community-PIO-CH32V.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-02-18T20:37:26.000Z","updated_at":"2025-05-15T00:47:39.000Z","dependencies_parsed_at":null,"dependency_job_id":"64245ee4-af78-48e1-ad81-8319b664d67a","html_url":"https://github.com/Community-PIO-CH32V/platform-ch32v","commit_stats":{"total_commits":175,"total_committers":5,"mean_commits":35.0,"dds":"0.17142857142857137","last_synced_commit":"18e295efcb1fee51f2b3855a9cccf886df251d88"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Community-PIO-CH32V%2Fplatform-ch32v","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Community-PIO-CH32V%2Fplatform-ch32v/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Community-PIO-CH32V%2Fplatform-ch32v/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Community-PIO-CH32V%2Fplatform-ch32v/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Community-PIO-CH32V","download_url":"https://codeload.github.com/Community-PIO-CH32V/platform-ch32v/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254544146,"owners_count":22088807,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ble","ch32v","firmware","microcontroller","platformio","platformio-platform","risc-v"],"created_at":"2024-09-24T19:41:55.479Z","updated_at":"2025-05-16T14:07:57.732Z","avatar_url":"https://github.com/Community-PIO-CH32V.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CH32V: development platform for [PlatformIO](https://platformio.org)\n\n[![Build Status](https://github.com/Community-PIO-CH32V/platform-ch32v/workflows/Examples/badge.svg)](https://github.com/Community-PIO-CH32V/platform-ch32v/actions) [![Documentation Status](https://readthedocs.org/projects/pio-ch32v/badge/?version=latest)](https://pio-ch32v.readthedocs.io/en/latest/?badge=latest)\n\nThe CH32V series offers industrial-grade, general-purpose microcontrollers based on a range of QingKe 32-bit RISC-V cores. All devices feature a DMA and a hardware stack area, which greatly improves interrupt latency. The family ranges from ultra-cheap, low-end CH32V003 with 2kB RAM / 16kB flash, up to high speed, ultra-connected CH32V307 with 64kB RAM / 256kB flash, hardware FPU, USB, CAN, Ethernet, etc.. For a list of available devices see the [CH32V product selector](http://www.wch-ic.com/products/categories/47.html?pid=5) page.\n\nNote: [WCH](http://www.wch-ic.com) also offers the CH32**F** family with identical peripherals, which is based on ARM Cortex-M.\n\nThis repository is a PlatformIO platform. Just like [platform-ststm32](https://github.com/platformio/platform-ststm32/) etc., it enables the PlatformIO core to work with W.CH CH32V chips. This means in all the IDEs that PlatformIO supports ([VSCode, CLion, etc.](https://docs.platformio.org/en/latest/integration/ide/index.html)), developing and debugging firmwares for CH32V chips is easily possible.\n\nHead over to https://github.com/Community-PIO-CH32V/ch32-pio-projects to see more example projects and detailed starting instructions.\n\n# Documentation\n\nPlease visit https://pio-ch32v.readthedocs.io/ for the most recent documention.\n\n**This page is a work in progress at the moment.**\n\n# Important notices\n\nThe newest used version of OpenOCD **requires** the firmware of the WCH-Link(E) probe to be the latest (2.10 and 2.11 respectively). Otherwise you **will** be seeing flash programming errors like\n\n```\nInfo : WCH-LinkE  mode:RV version 2.9 \n..\n** Programming Started **\nInfo : device id = 0xabc8abcd\nError: error writing to flash at address 0x00000000 at offset 0x00000000\nembedded:startup.tcl:1162: Error: ** Programming Failed **\n```\n\nPlease update the WCH-Link(E) firmware using\n* https://www.wch.cn/downloads/WCH-LinkUtility_ZIP.html (Windows only, Target --\u003e Query Chip Info)\n* http://www.mounriver.com/download (MounRiver Studio, Windows and Linux Eclipse GUI)\n\nIf you use Mac, the usage of a Linux virtual machine may be required to run these tools.\n\n# Media\n![vscode debugging](docs/debugging_ch32v003.png)\n\n![platform](docs/platform.png)\n\n\n# Support\n- chips\n    - [x] CH32V003 (QingKe V2A)\n    - [x] CH32V103 (QingKe V3A)\n    - [x] CH32V203 (QingKe V4B)\n    - [x] CH32V208 (QingKe V4C)\n    - [x] CH32V303 (QingKe V4F)\n    - [x] CH32V305 (QingKe V4F)\n    - [x] CH32V307 (QingKe V4F)\n    - [x] CH32X035 (QingKe V4C)\n    - [x] CH32L103 (QingKe V4C)\n    - [x] CH56x (QingKe V3A)\n    - [x] CH57x (QingKe V3A)\n    - [x] CH58x (QingKe V4A)\n    - [x] CH59x (QingKe V4C)\n- development boards\n    - [x] CH32V003F4P6-EVT-R0 (official by W.CH)\n    - [x] CH32V203C8T6-EVT-R0 (official by W.CH)\n    - [x] CH32V307 EVT (by SCDZ, close to official W.CH board)\n    - [x] CH32X035C8T6-EVT-R0, CH32X035G8U6-EVT-R0, CH32X035F8U6-EVT-R0 (official by W.CH)\n    - [x] CH32L103C8T6-EVT-R0 (official by W.CH)\n- frameworks\n    - [x] None OS (\"Simple Peripheral Library\" / native SDK)\n    - [ ] Arduino\n      - [x] for CH32V003 ([thanks to arduino-wch32v003](https://github.com/AlexanderMandera/arduino-wch32v003))\n      - [x] for CH32V003, CH32V10x, CH32V20x, CH32V30x, CH32X035, CH32L103 ([thanks to openwch/arduino_core_ch32](https://github.com/openwch/arduino_core_ch32/))\n      - [ ] for all else\n    - [x] ch32v003fun by CNLohr\n    - [x] FreeRTOS\n    - [x] (Huawei) Harmony LiteOS\n    - [x] RT-Thread\n    - [x] TencentOS Lite-M\n- debuggers (also implicitly uploaders)\n    - [x] WCH-Link(E)\n    - [ ] ST-Link\n    - [ ] J-Link\n    - [ ] GDB-UART stub for debug-probe-less debugging?\n- uploaders (no debugging)\n  - [x] USB ISP bootloader (supported via [wchisp](https://github.com/ch32-rs/wchisp))\n# Installation (see [docs](https://pio-ch32v.readthedocs.io/en/latest/installation.html))\n\n1. [Install PlatformIO](https://platformio.org)\n2. Install platform-ch32v via [PIO Core CLI](https://docs.platformio.org/en/latest/integration/ide/vscode.html#platformio-core-cli) --\u003e `pio pkg install -g -p https://github.com/Community-PIO-CH32V/platform-ch32v.git`\n3. Create PlatformIO project and configure a platform option in [platformio.ini](https://docs.platformio.org/page/projectconf.html) file:\n4. For Linux, add PlatformIO per [documentation](https://docs.platformio.org/en/latest/core/installation/udev-rules.html#platformio-udev-rules). Then, add WCH udev rules by appending the following content to `etc/udev/rules.d/99-platformio-udev.rules`.\n\n```\nSUBSYSTEM==\"usb\", ATTR{idVendor}=\"1a86\", ATTR{idProduct}==\"8010\", GROUP=\"plugdev\"\nSUBSYSTEM==\"usb\", ATTR{idVendor}=\"4348\", ATTR{idProduct}==\"55e0\", GROUP=\"plugdev\"\nSUBSYSTEM==\"usb\", ATTR{idVendor}=\"1a86\", ATTR{idProduct}==\"8012\", GROUP=\"plugdev\"\n```\n\n**Without these udev rules or the missing group membership of the user in the plugdev group, accessing the WCH-Link(E) via OpenOCD or wchisp will not work!!**\n\n# Updating\n\nIn case you are not seeing the latest features (e.g., available frameworks), please make sure that your platform version is up to date by either:\n1. [PIO Core CLI](https://docs.platformio.org/en/latest/integration/ide/vscode.html#platformio-core-cli) -\u003e `pio pkg update -g -p \"ch32v\"`\n2. or, simply delete these folders and build your project again\n `C:\\Users\\\u003cuser\u003e\\.platformio\\platforms\\ch32v*`\n `C:\\Users\\\u003cuser\u003e\\.platformio\\packages\\framework-*ch*`\n `C:\\Users\\\u003cuser\u003e\\.platformio\\.cache`\n\n\n## Development version\n\n```ini\n[env:development]\nplatform = https://github.com/Community-PIO-CH32V/platform-ch32v.git\nboard = ...\n...\n```\n\n# Configuration\n\nThe configuration in regards to the builder scripts etc. are still in progress. See the above mentioned projects repository for now.\n\n# Media Supported Development Boards\n\n![ch32v307 evt board](docs/ch307_evt.jpg)\n![ch32v003 evt board](docs/ch32v003_evt.jpg)\n![ch32v203 evt board](docs/ch32v203_evt.jpg)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcommunity-pio-ch32v%2Fplatform-ch32v","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcommunity-pio-ch32v%2Fplatform-ch32v","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcommunity-pio-ch32v%2Fplatform-ch32v/lists"}