UFLASH(1)
β¨ UFLASH β the uflash manual page, bestie edition β¨
okay so like. this is the man page for uflash, a User Commands situation, and it is the utility for flashing the BBC micro:bit with Python scripts and the MicroPython runtime. π¦ yes THE micro:bit. the cute little board. let's get into it.
πΈ NAME πΈ
uflash β utility for flashing the BBC micro:bit with Python scripts and the MicroPython runtime π
π SYNOPSIS π
uflash [--runtime RUNTIME] [--watch] [--minify] [source] [target [target...]]
uflash --extract HEXFILE [source]
uflash --version
uflash --help
π DESCRIPTION π
so here's the tea, bestie: uflash flashes Python onto a BBC micro:bit, or it extracts Python source from a .hex file. two moods. both iconic. π
If no path to the micro:bit is provided, uflash will attempt to autodetect the correct path to the device. it just knows. main character energy fr fr. π₯
And if no path to the Python script is provided? uflash will flash an unmodified MicroPython firmware onto the device. no script, no notes, just vibes. β¨
π OPTIONS π
uflash supports the following options:
-r,--runtime RUNTIMEβ use the specified MicroPython runtime file-w,--watchβ watch the source file for changes π-m,--minifyβ minify the source (shrink it, make it tiny, slay)-e,--extract HEXFILEβ extract Python source from given hex filesourceβ the Python source file to flash or extract totargetβ path to one or more mounted micro:bit devices π«Ά-h,--helpβ display usage information and exit--versionβ display current version and exit
π EXAMPLES π
If you type the command on its own then uflash will attempt to find a connected BBC micro:bit and flash an unmodified default version of the MicroPython runtime onto it:
$ uflash
Flashing Python to: /media/ntoll/MICROBIT/micropython.hex
To flash a version of the MicroPython runtime with a specified script embedded within it (so that script is run when the BBC micro:bit boots up) then pass the path to the Python script in as the first argument to the command:
$ uflash my_script.py
Flashing Python to: /media/ntoll/MICROBIT/micropython.hex
You can let uflash watch for changes of your script. It will be flashed automatically every time you save it:
$ uflash --watch my_script.py
At this point uflash will try to automatically detect the path to the device. However, if you have several devices plugged in and/or know what the path on the filesystem to the BBC micro:bit already is, you can specify this as a second argument to the command:
$ uflash myscript.py /media/ntoll/MICROBIT
Flashing Python to: /media/ntoll/MICROBIT/micropython.hex
You can even flash multiple devices at once:
$ uflash myscript.py /media/ntoll/MICROBIT /media/ntoll/MICROBIT1
Flashing Python to: /media/ntoll/MICROBIT/micropython.hex
Flashing Python to: /media/ntoll/MICROBIT1/micropython.hex
To extract a Python script from a hex file use the ββextractβ flag like this:
$ uflash --extract something.hex myscript.py
This will save the Python script recovered from βsomething.hexβ into the file βmyscript.pyβ. If you donβt supply a target the recovered script will emit to STDOUT.
If youβre developing MicroPython and have a custom runtime hex file you can specify that uflash use it instead of the default version of MicroPython in the following way:
$ uflash --runtime=firmware.hex
π§ FILES π§
The default MicroPython firmware file is located in /usr/share/firmware-microbit-micropython/firmware.hex. πΎ
π REPORTING BUGS π
Upstream bug tracker: https://github.com/ntoll/uflash/issues
not me telling you to file the bug instead of just yelling about it in the group chat π
π COPYRIGHT π
Copyright 2015-2018 Nicholas H.Tollervey and others.
π AUTHOR π
This manual page is based on the uflash documentation. It was created by Nick Morrott <nickm@debian.org> for the Debian GNU/Linux system, but may be used by others
β SEE ALSO β
and that's the whole page bestie, iykyk π«Ά this was version 1.2.4+dfsg, dated December 2018, and it literally says UFLASH(1) at the bottom so you know it's official. periodt. π
π¦ where this page comes from
- debian bookworm: python3-uflash 1.2.4+dfsg-10 Β· MIT
- ubuntu noble: python3-uflash 1.2.4+dfsg-10 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms