{"id":15213210,"url":"https://github.com/adafruit/tinyuf2","last_synced_at":"2025-05-15T10:07:24.782Z","repository":{"id":37045805,"uuid":"268989022","full_name":"adafruit/tinyuf2","owner":"adafruit","description":"UF2 bootloader based on TinyUSB for embedded devices such as ESP32S2, STM32F4 and iMX RT10xx","archived":false,"fork":false,"pushed_at":"2025-05-15T06:26:20.000Z","size":37266,"stargazers_count":376,"open_issues_count":18,"forks_count":202,"subscribers_count":20,"default_branch":"master","last_synced_at":"2025-05-15T06:32:41.599Z","etag":null,"topics":["tinyusb","uf2-bootloader"],"latest_commit_sha":null,"homepage":"","language":"C","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/adafruit.png","metadata":{"files":{"readme":"README.md","changelog":"changelog.md","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,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-06-03T04:27:51.000Z","updated_at":"2025-05-12T05:55:59.000Z","dependencies_parsed_at":"2023-10-04T21:34:08.194Z","dependency_job_id":"f894f207-087d-47f7-b283-116d82ba44cc","html_url":"https://github.com/adafruit/tinyuf2","commit_stats":{"total_commits":1040,"total_committers":69,"mean_commits":"15.072463768115941","dds":0.4076923076923077,"last_synced_commit":"23362cd960a4a4df81bd0b619061122cfa712170"},"previous_names":[],"tags_count":37,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adafruit%2Ftinyuf2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adafruit%2Ftinyuf2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adafruit%2Ftinyuf2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adafruit%2Ftinyuf2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/adafruit","download_url":"https://codeload.github.com/adafruit/tinyuf2/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254319720,"owners_count":22051073,"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":["tinyusb","uf2-bootloader"],"created_at":"2024-09-28T09:23:54.945Z","updated_at":"2025-05-15T10:07:19.766Z","avatar_url":"https://github.com/adafruit.png","language":"C","readme":"# TinyUF2 Bootloader\n\n[![Build Status](https://github.com/adafruit/tinyuf2/workflows/Build/badge.svg)](https://github.com/adafruit/tinyuf2/actions)[![License](https://img.shields.io/badge/license-MIT-brightgreen.svg)](https://opensource.org/licenses/MIT)\n\nThis repo is cross-platform UF2 Bootloader projects for MCUs based on [TinyUSB](https://github.com/hathach/tinyusb)\n\n```\n.\n├── apps              # Useful applications such as self-update, erase firmware\n├── lib               # Sources from 3rd party such as tinyusb, mcu drivers ...\n├── ports             # Port/family specific sources\n│   ├── espressif\n│   │   └── boards/   # Board specific sources\n│   │   └── Makefile  # Makefile for this port\n│   └── mimxrt10xx\n├── src               # Cross-platform bootloader sources files\n```\n\n## Features\n\nSupported features are\n\n- Double tap to enter DFU, reboot to DFU and quick reboot from application\n- DFU with MassStorage (MSC)\n- Self update with uf2 file\n- Indicator: LED, RGB, TFT\n- Debug log with uart/swd\n\nNot all features are implemented for all MCUs, following is supported MCUs and its feature\n\n| MCU         | MSC  | Double Reset | Self-update | Write Protection | Neopixel | TFT  |\n|:------------| :--: | :----------: |:-----------:| :--------------: |:--------:| :--: |\n| ESP32 S2/S3 |  ✔   |   Need RC    |      ✔      |                  |    ✔     |  ✔   |\n| K32L2       |  ✔   |      ✔       |             |                  |          |      |\n| LPC55       |  ✔   |      ✔       |             |                  |    ✔     |      |\n| iMXRT       |  ✔   |      ✔       |      ✔      |                  |    ✔     |      |\n| STM32F3     |  ✔   |      ✔       |      ✔      |        ✔         |    ✔     |      |\n| STM32F4     |  ✔   |      ✔       |      ✔      |        ✔         |    ✔     |      |\n| STM32H5     |  ✔   |      ✔       |      ✔      |        ✔         |          |      |\n\n## Build and Flash\n\nFollowing is generic compiling information. Each port may require extra set-up and slight different process e.g esp32s2 require setup IDF.\n\n### Clone\n\nClone this repo with its submodule\n\n```\n$ git clone git@github.com:adafruit/tinyuf2.git tinyuf2\n$ cd tinyuf2\n$ git submodule update --init\n```\n\n### Compile\n\nTo build this for a specific board, we need to change current directory to its port folder\n\n```\n$ cd ports/stm32f4\n```\n\nFirstly we need to get all submodule dependency for our board using `tools/get_deps.py` script with either family input or using --board option. You only need to do this once for each family\n\n```\npython tools/get_deps.py stm32f4\npython tools/get_deps.py --board feather_stm32f405_express\n```\n\nThen compile with `all` target:\n\n```\nmake BOARD=feather_stm32f405_express all\n```\n\n### Flash\n\n`flash` target will use the default on-board debugger (jlink/cmsisdap/stlink/dfu) to flash the binary, please install those support software in advance. Some board use bootloader/DFU via serial which is required to pass to make command\n\n```\n$ make BOARD=feather_stm32f405_express flash\n```\n\nIf you use an external debugger, there is `flash-jlink`, `flash-stlink`, `flash-pyocd` which are mostly like to work out of the box for most of the supported board.\n\n### Debug\n\nTo compile for debugging add `DEBUG=1`, this will mostly change the compiler optimization\n\n```\n$ make BOARD=feather_stm32f405_express DEBUG=1 all\n```\n\n#### Log\n\nShould you have an issue running example and/or submitting an bug report. You could enable TinyUSB built-in debug logging with optional `LOG=`.\n- **LOG=1** will print message from bootloader and error if any from TinyUSB stack.\n- **LOG=2** and **LOG=3** will print more information with TinyUSB stack events\n\n```\n$ make BOARD=feather_stm32f405_express LOG=1 all\n```\n\n#### Logger\n\nBy default log message is printed via on-board UART which is slow and take lots of CPU time comparing to USB speed. If your board support on-board/external debugger, it would be more efficient to use it for logging. There are 2 protocols:\n\n- `LOGGER=rtt`: use [Segger RTT protocol](https://www.segger.com/products/debug-probes/j-link/technology/about-real-time-transfer/)\n  - Cons: requires jlink as the debugger.\n  - Pros: work with most if not all MCUs\n  - Software viewer is JLink RTT Viewer/Client/Logger which is bundled with JLink driver package.\n\n```\n$ make BOARD=feather_stm32f405_express LOG=2 LOGGER=rtt all\n```\n","funding_links":[],"categories":["C","Others"],"sub_categories":["Bootloaders"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadafruit%2Ftinyuf2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadafruit%2Ftinyuf2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadafruit%2Ftinyuf2/lists"}