Name | chprog JSON |
Version |
2.5.0
JSON |
| download |
home_page | https://github.com/wagiminator/MCU-Flash-Tools |
Summary | USB Programming Tool for WCH Microcontrollers |
upload_time | 2024-08-08 15:11:13 |
maintainer | None |
docs_url | None |
author | Stefan Wagner |
requires_python | >=3.8 |
license | MIT License Copyright (c) 2022 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
microcontroller
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# chprog - USB Programming Tool for WCH Microcontrollers
## Description
With this tool, almost all WCH microcontrollers (CH5xx, CH6xx, CH32Fxxx, CH32Vxxx, CH32Xxxx, and CH32Lxxx) which have a factory-builtin bootloader (v2.x.x) can be flashed via USB.
## Preparations
On Linux you do not need to install a driver for the USB bootloader. However, by default Linux will not expose enough permission to upload your code. In order to fix this, open a terminal and run the following commands:
```
echo 'SUBSYSTEM=="usb", ATTR{idVendor}=="4348", ATTR{idProduct}=="55e0", MODE="666"' | sudo tee /etc/udev/rules.d/99-ch55x.rules
echo 'SUBSYSTEM=="usb", ATTR{idVendor}=="1a86", ATTR{idProduct}=="55e0", MODE="666"' | sudo tee -a /etc/udev/rules.d/99-ch55x.rules
sudo udevadm control --reload-rules
```
For Windows, you need the [CH372 driver](http://www.wch-ic.com/downloads/CH372DRV_EXE.html). Alternatively, you can also use the [Zadig](https://zadig.akeo.ie/) tool to install the correct driver. Here, click "Options" -> "List All Devices" and select the USB module. Then install the libusb-win32 driver. To do this, the board must be connected and the microcontroller must be in bootloader mode.
## 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 chprog
```
## Usage
The bootloader must be started manually for new uploads. To do this, the board must first be disconnected from the USB port and all voltage sources. Now press the BOOT button and keep it pressed while reconnecting the board to the USB port of your PC. The chip now starts in bootloader mode, the BOOT button can be released and new firmware can be uploaded via USB. Alternatively, you can leave the board connected to the USB port, press and hold the BOOT button, press and release the RESET button and then release the BOOT button to enter the bootloader mode. If there is no BOOT button on the board, look at the datasheet to find out which pin needs to be pulled to which voltage level for the microcontroller to go into boot mode.
Now run the following command (example):
```
chprog 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": "https://github.com/wagiminator/MCU-Flash-Tools",
"name": "chprog",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": "Stefan Wagner <wagiminator@web.de>",
"keywords": "WCH, CH552, CH32V003, CH32X035, microcontroller",
"author": "Stefan Wagner",
"author_email": "Stefan Wagner <wagiminator@web.de>",
"download_url": "https://files.pythonhosted.org/packages/ea/79/71b58c18c935a69dcc0b4bcc2c72918dc115d1acdf10002ff91250a6f423/chprog-2.5.0.tar.gz",
"platform": null,
"description": "# chprog - USB Programming Tool for WCH Microcontrollers\n## Description\nWith this tool, almost all WCH microcontrollers (CH5xx, CH6xx, CH32Fxxx, CH32Vxxx, CH32Xxxx, and CH32Lxxx) which have a factory-builtin bootloader (v2.x.x) can be flashed via USB.\n\n## Preparations\nOn Linux you do not need to install a driver for the USB bootloader. However, by default Linux will not expose enough permission to upload your code. In order to fix this, open a terminal and run the following commands:\n\n```\necho 'SUBSYSTEM==\"usb\", ATTR{idVendor}==\"4348\", ATTR{idProduct}==\"55e0\", MODE=\"666\"' | sudo tee /etc/udev/rules.d/99-ch55x.rules\necho 'SUBSYSTEM==\"usb\", ATTR{idVendor}==\"1a86\", ATTR{idProduct}==\"55e0\", MODE=\"666\"' | sudo tee -a /etc/udev/rules.d/99-ch55x.rules\nsudo udevadm control --reload-rules\n```\n\nFor Windows, you need the [CH372 driver](http://www.wch-ic.com/downloads/CH372DRV_EXE.html). Alternatively, you can also use the [Zadig](https://zadig.akeo.ie/) tool to install the correct driver. Here, click \"Options\" -> \"List All Devices\" and select the USB module. Then install the libusb-win32 driver. To do this, the board must be connected and the microcontroller must be in bootloader mode.\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 chprog\n```\n\n## Usage\nThe bootloader must be started manually for new uploads. To do this, the board must first be disconnected from the USB port and all voltage sources. Now press the BOOT button and keep it pressed while reconnecting the board to the USB port of your PC. The chip now starts in bootloader mode, the BOOT button can be released and new firmware can be uploaded via USB. Alternatively, you can leave the board connected to the USB port, press and hold the BOOT button, press and release the RESET button and then release the BOOT button to enter the bootloader mode. If there is no BOOT button on the board, look at the datasheet to find out which pin needs to be pulled to which voltage level for the microcontroller to go into boot mode.\n\nNow run the following command (example):\n```\nchprog 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) 2022 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": "USB Programming Tool for WCH Microcontrollers",
"version": "2.5.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",
" microcontroller"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "cd77b5dd2dcb1c7bdf3c82b81ac75f5e41a3d860c3f4296c4e1028b2d071f527",
"md5": "5d454c6f42b7b4a42ae38155385126f4",
"sha256": "76eb8e8b1def454cf264389dfca5e7b11056a9e30b748ccbf0a4a7b16c7662a1"
},
"downloads": -1,
"filename": "chprog-2.5.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "5d454c6f42b7b4a42ae38155385126f4",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 8610,
"upload_time": "2024-08-08T15:11:11",
"upload_time_iso_8601": "2024-08-08T15:11:11.993460Z",
"url": "https://files.pythonhosted.org/packages/cd/77/b5dd2dcb1c7bdf3c82b81ac75f5e41a3d860c3f4296c4e1028b2d071f527/chprog-2.5.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "ea7971b58c18c935a69dcc0b4bcc2c72918dc115d1acdf10002ff91250a6f423",
"md5": "85c597dffa304571fb75b9ec7123392e",
"sha256": "5849894856ce9f3645ae837b069dc7c6f89d1eea7f78da899f8f0cb6cbf5c08e"
},
"downloads": -1,
"filename": "chprog-2.5.0.tar.gz",
"has_sig": false,
"md5_digest": "85c597dffa304571fb75b9ec7123392e",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 8771,
"upload_time": "2024-08-08T15:11:13",
"upload_time_iso_8601": "2024-08-08T15:11:13.453419Z",
"url": "https://files.pythonhosted.org/packages/ea/79/71b58c18c935a69dcc0b4bcc2c72918dc115d1acdf10002ff91250a6f423/chprog-2.5.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-08-08 15:11:13",
"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": "chprog"
}