Name | rvprog JSON |
Version |
1.10.0
JSON |
| download |
home_page | None |
Summary | Programming Tool for WCH RISC-V Microcontrollers using WCH-Link |
upload_time | 2025-01-01 11:01:56 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.6 |
license | MIT License Copyright (c) 2023 Stefan Wagner Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
keywords |
wch
ch552
ch32v003
ch32x035
risc-v
microcontroller
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# Programming Tool for WCH RISC-V Microcontrollers using WCH-Link
## Description
With this open-source platform-independant command-line tool, WCH RISC-V microcontrollers can be programmed using a RISC-V compatible [WCH-Link](http://www.wch-ic.com/products/WCH-Link.html) via their serial debug interface.
The tool currently supports the following microcontrollers:
- CH32V002, CH32V003, CH32V004, CH32V005, CH32V006, CH32V007,
- CH32V103, CH32V203, CH32V208, CH32V303, CH32V305, CH32V307,
- CH32X033, CH32X035,
- CH32L103,
- CH571, CH573, CH581, CH582, CH583, CH591, CH592.
The tool currently supports the following programmers:
- WCH-LinkB,
- WCH-LinkE,
- WCH-LinkW,
- other compatible programmers.
## Preparations
To use the WCH-Link on Linux, you need to grant access permissions beforehand by executing the following commands:
```
echo 'SUBSYSTEM=="usb", ATTR{idVendor}=="1a86", ATTR{idProduct}=="8010", MODE="666"' | sudo tee /etc/udev/rules.d/99-WCH-LinkE.rules
echo 'SUBSYSTEM=="usb", ATTR{idVendor}=="1a86", ATTR{idProduct}=="8012", MODE="666"' | sudo tee -a /etc/udev/rules.d/99-WCH-LinkE.rules
sudo udevadm control --reload-rules
```
On Windows, if you need to you can install the WinUSB driver over the WCH interface 1 using the [Zadig](https://zadig.akeo.ie/) tool.
## Installation
Ensure that the [prerequisites](https://packaging.python.org/en/latest/tutorials/installing-packages/) for installing Python packages are met. Then execute the following command in the command line:
```
pip install rvprog
```
## Usage
To upload firmware, you should make the following connections to the WCH-Link (SWCLK is not present on CH32V00x and therefore does not need to be connected):
```
WCH-Link RISC-V MCU
+------+ +--------+
| SWCLK| ---> |SWCLK |
| SWDIO| <--> |SWDIO |
| GND| ---> |GND |
| 3V3| ---> |VDD |
+------+ +--------+
```
If the blue LED on the WCH-Link remains illuminated once it is connected to the USB port, it means that the device is currently in ARM mode and must be switched to RISC-V mode initially. There are a few ways to accomplish this:
- You can utilize the rvprog tool with the -v option (see below).
- Alternatively, you can select "WCH-LinkRV" in the software provided by WCH, such as MounRiver Studio or WCH-LinkUtility.
- Another option is to hold down the ModeS button on the device while plugging it into the USB port.
More information can be found in the [WCH-Link User Manual](http://www.wch-ic.com/downloads/WCH-LinkUserManual_PDF.html).
```
Usage: rvprog [-h] [-a] [-v] [-b] [-u] [-l] [-e] [-G] [-R] [-f FLASH]
Optional arguments:
-h, --help show help message and exit
-a, --armmode switch WCH-Link to ARM mode
-v, --rvmode switch WCH-Link to RISC-V mode
-b, --unbrick unbrick chip (power cycle erase)
-u, --unlock unlock chip (remove read protection)
-l, --lock lock chip (set read protection)
-e, --erase perform a whole chip erase
-G, --pingpio make PD7 a GPIO pin (CH32V00x only)
-R, --pinreset make PD7 a reset pin (CH32V00x only)
-f FLASH, --flash FLASH write BIN file to flash
Example:
rvprog -f firmware.bin
```
## Links
- [MCU Flash Tools](https://github.com/wagiminator/MCU-Flash-Tools)
- [MCU Templates](https://github.com/wagiminator/MCU-Templates)
- [MCU Development Boards](https://github.com/wagiminator/Development-Boards)
- [AVR Development Boards](https://github.com/wagiminator/AVR-Development-Boards)
- [AVR Programmers](https://github.com/wagiminator/AVR-Programmer)
- [SAMD Development Boards](https://github.com/wagiminator/SAMD-Development-Boards)
Raw data
{
"_id": null,
"home_page": null,
"name": "rvprog",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": "Stefan Wagner <wagiminator@web.de>",
"keywords": "WCH, CH552, CH32V003, CH32X035, RISC-V, microcontroller",
"author": null,
"author_email": "Stefan Wagner <wagiminator@web.de>",
"download_url": "https://files.pythonhosted.org/packages/0f/c8/9ed6a359451b8df0d21cbfba68244d387ddf60f38f70f2cf594c41b0f8dc/rvprog-1.10.0.tar.gz",
"platform": null,
"description": "# Programming Tool for WCH RISC-V Microcontrollers using WCH-Link\n## Description\nWith this open-source platform-independant command-line tool, WCH RISC-V microcontrollers can be programmed using a RISC-V compatible [WCH-Link](http://www.wch-ic.com/products/WCH-Link.html) via their serial debug interface.\n\nThe tool currently supports the following microcontrollers:\n- CH32V002, CH32V003, CH32V004, CH32V005, CH32V006, CH32V007,\n- CH32V103, CH32V203, CH32V208, CH32V303, CH32V305, CH32V307,\n- CH32X033, CH32X035,\n- CH32L103,\n- CH571, CH573, CH581, CH582, CH583, CH591, CH592.\n\nThe tool currently supports the following programmers:\n- WCH-LinkB,\n- WCH-LinkE,\n- WCH-LinkW,\n- other compatible programmers.\n\n## Preparations\nTo use the WCH-Link on Linux, you need to grant access permissions beforehand by executing the following commands:\n```\necho 'SUBSYSTEM==\"usb\", ATTR{idVendor}==\"1a86\", ATTR{idProduct}==\"8010\", MODE=\"666\"' | sudo tee /etc/udev/rules.d/99-WCH-LinkE.rules\necho 'SUBSYSTEM==\"usb\", ATTR{idVendor}==\"1a86\", ATTR{idProduct}==\"8012\", MODE=\"666\"' | sudo tee -a /etc/udev/rules.d/99-WCH-LinkE.rules\nsudo udevadm control --reload-rules\n```\n\nOn Windows, if you need to you can install the WinUSB driver over the WCH interface 1 using the [Zadig](https://zadig.akeo.ie/) tool.\n\n## Installation\nEnsure that the [prerequisites](https://packaging.python.org/en/latest/tutorials/installing-packages/) for installing Python packages are met. Then execute the following command in the command line:\n\n```\npip install rvprog\n```\n\n## Usage\nTo upload firmware, you should make the following connections to the WCH-Link (SWCLK is not present on CH32V00x and therefore does not need to be connected):\n\n```\nWCH-Link RISC-V MCU\n+------+ +--------+\n| SWCLK| ---> |SWCLK |\n| SWDIO| <--> |SWDIO |\n| GND| ---> |GND |\n| 3V3| ---> |VDD |\n+------+ +--------+\n```\n\nIf the blue LED on the WCH-Link remains illuminated once it is connected to the USB port, it means that the device is currently in ARM mode and must be switched to RISC-V mode initially. There are a few ways to accomplish this:\n- You can utilize the rvprog tool with the -v option (see below).\n- Alternatively, you can select \"WCH-LinkRV\" in the software provided by WCH, such as MounRiver Studio or WCH-LinkUtility.\n- Another option is to hold down the ModeS button on the device while plugging it into the USB port.\n\nMore information can be found in the [WCH-Link User Manual](http://www.wch-ic.com/downloads/WCH-LinkUserManual_PDF.html).\n\n```\nUsage: rvprog [-h] [-a] [-v] [-b] [-u] [-l] [-e] [-G] [-R] [-f FLASH]\n\nOptional arguments:\n -h, --help show help message and exit\n -a, --armmode switch WCH-Link to ARM mode\n -v, --rvmode switch WCH-Link to RISC-V mode\n -b, --unbrick unbrick chip (power cycle erase)\n -u, --unlock unlock chip (remove read protection)\n -l, --lock lock chip (set read protection)\n -e, --erase perform a whole chip erase\n -G, --pingpio make PD7 a GPIO pin (CH32V00x only)\n -R, --pinreset make PD7 a reset pin (CH32V00x only)\n -f FLASH, --flash FLASH write BIN file to flash\n\nExample:\nrvprog -f firmware.bin\n```\n\n## Links\n- [MCU Flash Tools](https://github.com/wagiminator/MCU-Flash-Tools)\n- [MCU Templates](https://github.com/wagiminator/MCU-Templates)\n- [MCU Development Boards](https://github.com/wagiminator/Development-Boards)\n- [AVR Development Boards](https://github.com/wagiminator/AVR-Development-Boards)\n- [AVR Programmers](https://github.com/wagiminator/AVR-Programmer)\n- [SAMD Development Boards](https://github.com/wagiminator/SAMD-Development-Boards)\n",
"bugtrack_url": null,
"license": "MIT License Copyright (c) 2023 Stefan Wagner Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.",
"summary": "Programming Tool for WCH RISC-V Microcontrollers using WCH-Link",
"version": "1.10.0",
"project_urls": {
"Homepage": "https://wagiminator.github.io/",
"Issues": "https://github.com/wagiminator/MCU-Flash-Tools/issues",
"Repository": "https://github.com/wagiminator/MCU-Flash-Tools"
},
"split_keywords": [
"wch",
" ch552",
" ch32v003",
" ch32x035",
" risc-v",
" microcontroller"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "f21fb165671c8cd56322ef8f2014c5fade9820f60836fe7c42df10b57faba3fe",
"md5": "9fb6873299f0689fc579cd96f1bf104a",
"sha256": "561d356bfdf50f9c84c73c3e5ca8646c746d0dbf5e90382a0b2990ead072b44b"
},
"downloads": -1,
"filename": "rvprog-1.10.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "9fb6873299f0689fc579cd96f1bf104a",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 14548,
"upload_time": "2025-01-01T11:01:55",
"upload_time_iso_8601": "2025-01-01T11:01:55.187184Z",
"url": "https://files.pythonhosted.org/packages/f2/1f/b165671c8cd56322ef8f2014c5fade9820f60836fe7c42df10b57faba3fe/rvprog-1.10.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "0fc89ed6a359451b8df0d21cbfba68244d387ddf60f38f70f2cf594c41b0f8dc",
"md5": "a8f5359f2f662d5429f6cb83819aabbb",
"sha256": "936348bcc34d6d8d680d2eafae22d963c379854bcd5e83c17041cff33fa482cc"
},
"downloads": -1,
"filename": "rvprog-1.10.0.tar.gz",
"has_sig": false,
"md5_digest": "a8f5359f2f662d5429f6cb83819aabbb",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 16299,
"upload_time": "2025-01-01T11:01:56",
"upload_time_iso_8601": "2025-01-01T11:01:56.336193Z",
"url": "https://files.pythonhosted.org/packages/0f/c8/9ed6a359451b8df0d21cbfba68244d387ddf60f38f70f2cf594c41b0f8dc/rvprog-1.10.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-01-01 11:01:56",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "wagiminator",
"github_project": "MCU-Flash-Tools",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "rvprog"
}