{"id":13423242,"url":"https://github.com/sajattack/uf2conv-rs","last_synced_at":"2025-05-12T13:27:59.824Z","repository":{"id":147183659,"uuid":"152381052","full_name":"sajattack/uf2conv-rs","owner":"sajattack","description":"Converts binary files to Microsoft's UF2 format https://github.com/Microsoft/uf2","archived":false,"fork":false,"pushed_at":"2021-12-17T19:25:53.000Z","size":15,"stargazers_count":28,"open_issues_count":0,"forks_count":4,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-05-08T02:57:17.716Z","etag":null,"topics":["bootloader","embedded","rust","uf2"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/sajattack.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}},"created_at":"2018-10-10T07:28:15.000Z","updated_at":"2024-10-12T21:02:26.000Z","dependencies_parsed_at":null,"dependency_job_id":"b67c6380-aa81-4419-9147-c8c068b5567e","html_url":"https://github.com/sajattack/uf2conv-rs","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sajattack%2Fuf2conv-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sajattack%2Fuf2conv-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sajattack%2Fuf2conv-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sajattack%2Fuf2conv-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sajattack","download_url":"https://codeload.github.com/sajattack/uf2conv-rs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253747254,"owners_count":21957727,"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":["bootloader","embedded","rust","uf2"],"created_at":"2024-07-31T00:00:25.875Z","updated_at":"2025-05-12T13:27:59.778Z","avatar_url":"https://github.com/sajattack.png","language":"Rust","funding_links":[],"categories":["Tools"],"sub_categories":["Community Chat Rooms","Paid and commercially available materials"],"readme":"# uf2conv\n\nAdds a uf2 header [Microsofts HID Flashing Format (UF2)](https://github.com/microsoft/uf2/blob/86e101e3a282553756161fe12206c7a609975e70/README.md) for copying over to UF2 bootloader mass storage devices. UF2 is factory programmed extensively by [Microsoft MakeCode](https://www.microsoft.com/en-us/makecode) and [Adafruit](https://www.adafruit.com/) hardware.\n\n## Install\n`cargo install uf2conv`\n\n## Usage\n```bash\n $ uf2conv\nerror: The following required arguments were not provided:\n    \u003cINPUT\u003e\n\nUSAGE:\n    uf2conv \u003cINPUT\u003e --base \u003cbase\u003e --family \u003cfamily\u003e --output \u003coutput\u003e\n\nFor more information try --help\n```\n\nBase usage you'll want to give the --base memory address for your chip. This is where the code starts after the bootloader. In the case of embedded rust, thats found in your memory.x where you'll find  `FLASH (rx) : ORIGIN = 0x00000000+0x4000` or `FLASH (rx) : ORIGIN = 0x00000000 + 16K` Where 16K in bytes is 16384 decimal or 0x4000 hex base.\n\n```bash\n$ uf2conv pygamer_blinky_basic.bin --base 0x4000 --output pygamer_blinky_basic.uf2\n```\n\nAnd you can copy that uf2 file to your embedded device's drive that appears when you enter bootloader mode.\n\n## Rust: How to get a bin file\n\nUse [cargo-binutils](https://github.com/rust-embedded/cargo-binutils) which replaces the `cargo build` command to find and convert elf files into binary. \n\nInstall the dependencies\n```bash\n$ rustup component add llvm-tools-preview\n$ cargo install uf2conv cargo-binutils\n```\n\nThen in your embedded project, say [PyGamer](https://github.com/atsamd-rs/atsamd/tree/master/boards/pygamer)\n```bash\n$ cargo objcopy --example blinky_basic --features unproven --release -- -O binary pygamer_blinky_basic.bin\n$ uf2conv pygamer_blinky_basic.bin --base 0x4000 --output pygamer_blinky_basic.uf2\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsajattack%2Fuf2conv-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsajattack%2Fuf2conv-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsajattack%2Fuf2conv-rs/lists"}