Tinyuf2
An open source cross-platform UF2 bootloader based on the TinyUSB library
Install / Use
/learn @arturo182/Tinyuf2README
TinyUF2
TinyUF2 is an open source cross-platform UF2 bootloader based on the TinyUSB library.
Building
Checkout the code and sync submodules:
$ git clone https://github.com/arturo182/tinyuf2.git
$ cd tinyuf2
$ git submodule update --init --recursive
Specify the board you want to build for:
$ make BOARD=mimxrt1010_evk
Filesystem Structure
The filesystem is structured as follows;
tinyuf2
|
+----hw Hardware specific files
| |
| +---bsp Board specific files
| |
| +---chip Chip specific (multiple boards)
|
+----lib External supporting libraries
|
+----src tinyUF2 specific code
A board is selected by means of the BOARD option on the makefile command line. This references a particular hw/bsp/<BOARD> directory which then links to a specific chip and variant in the hw/chip/ directories. A new board is added under /hw/bsp/<BOARD>. It may optionally need a new chip or variant under the hw/chip directories or, more normally, it might need new pin options in hw/chip/<FAMILY>/<GROUP>/pinning_options.h.
Adding a new Board
You can add a new board by copying an existing one that is closest to it in the hw/ directory with something like cp -a hw/bsp/mimxrt1010_evk hw/bsp/newboard. Edit hw/bsp/newboard/board.mk to reference the appropriate hw/chip directory and the board_config.h file to adjust settings for the new board.
In general entries in hw/bsp/newboard/board.mk should reference existing pinning definitions in the relavent hw/chip directory rather than being created afresh.
Non-standard options
In general non-standard options are frowned upon because it changes the user experience of tinyUF2. However, on occasion these may be needed for specific reasons. The supported options are specified in hw/bsp/<BOARD>/board_config.h for a specific board. Not defining any of these options means sensible defaults will be applied;
-
USB_VID: Vendor ID for the board. Default is 0x239A, courtesy of Adafruit Industries. -
USB_PID: PID for the board. Default is 0x0058 which is specifically defined as a generic tinyUF2 boot device. Do not select something else unless you've been allocated a new number by Adafruit. -
VOLUME_LABEL: Volume Label for the tinyUF2 drive. Default isUF2BOOT. -
BOARD_TAP_WAIT: How long to wait for double-tap entry into bootloader before performing regular boot. Default is 500mS. -
BOARD_BLINK_INTERVAL: Blinking interval while in tinyUF2. Default is 500uS on/off. -
BOARD_LED_ON_UF2_START: Should the LED be on or off at UF2 boot? Default is off.
Related Skills
node-connect
342.5kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
85.3kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
342.5kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
342.5kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
