{"id":18683016,"url":"https://github.com/bessman/mcbootflash","last_synced_at":"2026-02-23T02:32:10.999Z","repository":{"id":45465026,"uuid":"497111602","full_name":"bessman/mcbootflash","owner":"bessman","description":"Flash firmware to 16-bit Microchip devices running MCC bootloader","archived":false,"fork":false,"pushed_at":"2025-05-09T11:55:45.000Z","size":3974,"stargazers_count":19,"open_issues_count":0,"forks_count":6,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-08-27T09:57:35.701Z","etag":null,"topics":["dspic33","firmware","flashing","microchip-pic","pic24"],"latest_commit_sha":null,"homepage":"https://bessman.github.io/mcbootflash/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bessman.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","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":"2022-05-27T19:15:56.000Z","updated_at":"2025-06-10T11:13:17.000Z","dependencies_parsed_at":"2024-01-30T09:46:31.242Z","dependency_job_id":"808d113e-c51d-43f2-a668-154bb3033b9c","html_url":"https://github.com/bessman/mcbootflash","commit_stats":{"total_commits":307,"total_committers":1,"mean_commits":307.0,"dds":0.0,"last_synced_commit":"e6473c0dfb624c5e7cd5028c1d245aae9375cb23"},"previous_names":[],"tags_count":31,"template":false,"template_full_name":null,"purl":"pkg:github/bessman/mcbootflash","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bessman%2Fmcbootflash","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bessman%2Fmcbootflash/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bessman%2Fmcbootflash/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bessman%2Fmcbootflash/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bessman","download_url":"https://codeload.github.com/bessman/mcbootflash/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bessman%2Fmcbootflash/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29735759,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-23T02:24:00.660Z","status":"ssl_error","status_checked_at":"2026-02-23T02:22:56.087Z","response_time":90,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["dspic33","firmware","flashing","microchip-pic","pic24"],"created_at":"2024-11-07T10:13:30.523Z","updated_at":"2026-02-23T02:32:10.983Z","avatar_url":"https://github.com/bessman.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mcbootflash\n\n![build](https://github.com/bessman/mcbootflash/actions/workflows/build.yml/badge.svg)\n[![Documentation](https://img.shields.io/badge/doc-latest-blue.svg)](https://bessman.github.io/mcbootflash/)\n[![PyPI](https://img.shields.io/pypi/v/mcbootflash.svg)](https://pypi.org/project/mcbootflash/)\n[![License](https://img.shields.io/pypi/l/mcbootflash)](https://mit-license.org/)\n\n## What\n\nMcbootflash is a tool for flashing firmware to 16-bit Microchip MCUs and DSCs\nfrom the PIC24 and dsPIC33 device families, which are running a\n[bootloader](https://www.microchip.com/en-us/software-library/16-bit-bootloader)\ngenerated by the MPLAB Code Configurator tool.\n\nMcbootflash is intended to be a drop-in replacement for Microchip's official tool, the\nUnified Bootloader Host Application (UBHA).\n\n## Why\n\nMcbootflash is:\n\n### Scriptable\n\nAs a command-line application, mcbootflash is easily scriptable.\n\n### Extensible\n\nIn addition to its command-line interface, mcbootflash can be used as a library by\napplications wanting to implement firmware flashing as part of a larger suite of\nfeatures.\n\n### Free and Open Source\n\nMcbootflash is distributed under the MIT license.\n\n## Installation\n\nStand-alone executables for Linux, Mac, and Windows are available from the Github\n[release page](https://github.com/bessman/mcbootflash/releases/latest).\n\nMcbootflash can also be installed from PyPI:\n\n`pip install mcbootflash`\n\n## Usage\n\nMcbootflash can be used as both a command-line application and a library.\n\n### Command-line\n\n```shellsession\n$ mcbootflash --help\nusage: mcbootflash [-h] -p PORT -b BAUDRATE [--timeout TIMEOUT] [--checksum] [--reset] [--debug] [--quiet] [--version] hexfile\n\nmcbootflash is a tool for flashing firmware to 16-bit Microchip MCUs and DSCs from the PIC24 and dsPIC33 device families, which are running a bootloader generated by the MPLAB Code Configurator tool.\n\npositional arguments:\n  hexfile               an Intel HEX file containing application firmware\n\noptions:\n  -h, --help            show this help message and exit\n  -p, --port PORT       serial port connected to the device you want to flash\n  -b, --baudrate BAUDRATE\n                        symbol rate of device's serial bus\n  --timeout TIMEOUT     try to read data from the bus for this many seconds before giving up\n  --checksum            verify flashed data by checksumming after write\n  --reset               reset device after flashing is complete\n  --debug               print debug messages\n  --quiet               suppress output\n  --version             show program's version number and exit\n```\n\n#### Example\n\n```shellsession\n$ mcbootflash --port /dev/ttyUSB0 --baudrate 460800 firmware.hex\nConnecting to bootloader...\nErasing program area...\n100%  162.0 KiB  |######################################|  Elapsed Time: 0:00:01\nFlashing firmware.hex...\n100%  98.8 KiB  |#######################################|  Elapsed Time: 0:00:06\nSelf verify OK\n```\n\n### Library\n\nWhen using mcbootflash as a library, typical workflow looks something like this:\n\n``` py\nimport mcbootflash as bf\nimport serial\n\n\n# Connect to a device in bootloader mode.\nconnection = serial.Serial(port=\u003cPORT\u003e, baudrate=\u003cBAUDRATE\u003e, timeout=\u003cTIMEOUT\u003e)\n# Query its attributes.\nbootattrs = bf.get_boot_attrs(connection)\n# Load the firmware image and split it into chunks.\ntotal_bytes, chunks = bf.chunked(hexfile=\u003cHEXFILE_PATH_STRING\u003e, bootattrs)\n# Erase the device's program memory area.\nbf.erase_flash(connection, bootattrs.memory_range, bootattrs.erase_size)\n\n# Write the firmware chunks to the bootloader in a loop.\nfor chunk in chunks:\n    bf.write_flash(connection, chunk)\n\n    # Optionally, check that the write is OK by checksumming.\n    bf.checksum(connection, chunk)\n\n    # At this point, you may want to give an indication of the flashing progress,\n    # like updating a progress bar.\n\n# Verify that the new application is detected.\nbf.self_verify(connection)\n```\n\nSee also the [API Reference](https://bessman.github.io/mcbootflash/api/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbessman%2Fmcbootflash","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbessman%2Fmcbootflash","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbessman%2Fmcbootflash/lists"}