{"id":19696491,"url":"https://github.com/marstechhan/ch552tool","last_synced_at":"2025-04-06T11:08:31.980Z","repository":{"id":39800465,"uuid":"232869152","full_name":"MarsTechHAN/ch552tool","owner":"MarsTechHAN","description":"An open sourced python tool for flashing WCH CH55x series USB microcontroller with bootloader v2.30, v2.31 \u0026 v2.40.","archived":false,"fork":false,"pushed_at":"2024-01-01T05:48:04.000Z","size":80,"stargazers_count":160,"open_issues_count":12,"forks_count":24,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-03-30T09:09:50.771Z","etag":null,"topics":["ch551","ch552","ch553","ch554","ch559","flashtool","microcontroller","usb","wch","winchiphead"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MarsTechHAN.png","metadata":{"files":{"readme":"README.rst","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}},"created_at":"2020-01-09T17:45:20.000Z","updated_at":"2024-11-26T02:51:57.000Z","dependencies_parsed_at":"2024-01-01T06:48:14.501Z","dependency_job_id":null,"html_url":"https://github.com/MarsTechHAN/ch552tool","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MarsTechHAN%2Fch552tool","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MarsTechHAN%2Fch552tool/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MarsTechHAN%2Fch552tool/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MarsTechHAN%2Fch552tool/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MarsTechHAN","download_url":"https://codeload.github.com/MarsTechHAN/ch552tool/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247471520,"owners_count":20944158,"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":["ch551","ch552","ch553","ch554","ch559","flashtool","microcontroller","usb","wch","winchiphead"],"created_at":"2024-11-11T19:35:21.899Z","updated_at":"2025-04-06T11:08:31.953Z","avatar_url":"https://github.com/MarsTechHAN.png","language":"Python","readme":"ch55xtool\n=========\n\nNow available on pypi\n---------------------\n\nAn open sourced python command line flash tool for flashing WinChipHead\nCH55x series 8051 USB micro controllers, including CH551, CH552, CH553,\nCH554, CH559, CH569 (including CH56x), etc. with bootloader version(BTV)\nabove 2.30 (including 2.30, 2.31, 2.40, 2.71), etc.\n(You can check the verision by using the official CH55x Tool.)\n\nUsage\n-----\n\n-  **-f/–flash \u003cfilename\u003e** Erase the whole chip, and flash the bin file\n   to the CH55x.\n-  **-e/–erase_flash** Erase the whole program flash.\n-  **–verify_flash** [filename] Verify program flash contend with given\n   file, if filename ommited verifying with flashed data. No verifying\n   perormed without this flag.\n-  **-r/–reset_at_end** Issue reset and run after all.\n-  **-d/–data \u003cfilename\u003e** Erase the whole data flash and write the bin\n   file to the CH55x.\n-  **-c/–erase_dataflash** Erase the whole data flash.\n-  **–verify_data** [filename] Verify data flash contend with given\n   file, if filename ommited verifying with written data. No verifying\n   perormed without this flag.\n-  **-g/–read_dataflash** Read content of data flash to file.\n-  **-p/–print_chip_cfg** Read and print chip configuration bits 3 x 32\n   bit values.\n\n.. code:: bash\n\n   python3 -m ch55xtool -f THE_BINARY_FILE.bin\n\nTool Setup\n----------\n\n-  Linux Distros \u003e Most Linux distros come with libusb, so you only need\n   to install the pyusb packge.\n\n.. code:: bash\n\n   python3 -mpip install ch55xtool\n\n-  Mac OS\n\n..\n\n   For Mac OS, you need to install both libusb and pyusb.\n\n.. code:: bash\n\n   # If you dont have brew installed.\n   # /usr/bin/ruby -e \"$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)\"\n   brew install libusb\n   python3 -mpip install ch55xtool\n\n-  As for Windows, oh no… :(\n\n      1. First, you need to download the\n         `Zadig \u003chttps://zadig.akeo.ie/\u003e`__ for replacing the CH375\n         driver from WCH to libusb.\n      2. Click the Options-\u003eList all devices, to show all devices\n      3. Find the device marked with **USB Module**, which presented\n         driver is **CH375_balabala**\n      4. Replace the driver with libusb-win32.\n      5. Install the pyusb package with ``python -mpip install pyusb``.\n         Since for windows, they dont use python3, but you have to make\n         sure you have the pythono3 in the PATH\n      6. If you want to use the WCH Toolchain, open the device manager,\n         find the device marked with **libusb-win32 deives**, right\n         clicked on it, and Uninstall the driver and delete the driver.\n         You can also check the FAQ of Zadig\n         `HERE \u003chttps://github.com/pbatard/libwdi/wiki/Zadig\u003e`__.\n\nFAQ\n---\n\n-  Why I got a **Error: No backend available** ?\n\n..\n\n   On windows, this means you dont a valid libusb device, see the guide\n   above. For other system, you might dont have the libusb installed,\n   follow the guide above.\n\n-  Why it said **NO_DEV_FOUND** ?\n\n..\n\n   Pyusb unable to fine the device with given PID\u0026VID. Maybe you dont\n   power on your device, or it is not in DFU mode.\n\n-  I got a **USB_ERROR_CANNOT_SET_CONFIG** error.\n\n..\n\n   This high probability is a permission issue. Add\n   ``SUBSYSTEM==\"usb\", ATTRS{idVendor}==\"4348\", MODE=\"0666\"`` to\n   ``/etc/udev/rules.d/50-ch55x.rules``, and re-plug your device.\n   Otherwise you need sudo.\n\n-  I got a **USB_ERROR_CANNOT_DETACH_KERNEL_DRIVER**, or\n   **USB_ERROR_CANNOT_CLAIM_INTERFACE** error.\n\n..\n\n   I never met with those problems on a working CH552. Checking the\n   power, the previliage, and praying may help.\n\n-  What if it return **Bootloader version not supported**?\n\n..\n\n   The program dont support BTVER lower than 2.30(welcome PR, but since\n   they are too old, I dont have plan to support them). Or maybe they\n   have a newer verison, for this situlation, it is welcome for you to\n   open an issue.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarstechhan%2Fch552tool","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarstechhan%2Fch552tool","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarstechhan%2Fch552tool/lists"}