UFLASH(1)

πŸ“¦
version 1.2.4 Β· 3 versions
, in debian bookworm, ubuntu noble

✨ 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 file
  • source β€” the Python source file to flash or extract to
  • target β€” 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 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