User Manual

UF2 Bootloader Details
Adafruit SAMD21 (M0) and SAMD51 (M4) boards feature an improved bootloader that makes it easier than ever to flash
different code onto the microcontroller. This bootloader makes it easy to switch between Microsoft MakeCode,
CircuitPython and Arduino.
Instead of needing drivers or a separate program for flashing (say, bossac , jlink or avrdude ), one can simply
drag a
file onto a removable drive
.
The format of the file is a little special. Due to 'operating system woes' you cannot just drag a binary or hex file (trust
us, we tried it, it isn't cross-platform compatible). Instead, the format of the file has extra information to help the
bootloader know where the data goes. The format is called UF2 (USB Flashing Format). Microsoft MakeCode
generates UF2s for flashing and CircuitPython releases are also available as UF2. You can also create your own UF2s
from binary files using uf2tool, available here. (https://adafru.it/vPE)
The bootloader is
also BOSSA compatible
, so it can be used with the Arduino IDE which expects a BOSSA bootloader
on ATSAMD-based boards
For more information about UF2, you can read a bunch more at the MakeCode blog (https://adafru.it/w5A), then check
out the UF2 file format specification. (https://adafru.it/vPE)
Visit Adafruit's fork of the Microsoft UF2-samd bootloader GitHub repository (https://adafru.it/Beu) for source code
and releases of pre-built bootloaders on CircuitPython.org (https://adafru.it/Em8).
This is an information page for advanced users who are curious how we get code from your computer into
your Express board!
The bootloader is not needed when changing your CircuitPython code. Its only needed when upgrading the
CircuitPython core or changing between CircuitPython, Arduino and Microsoft MakeCode.
© Adafruit Industries https://learn.adafruit.com/adafruit-metro-m4-express-airlift-wifi Page 18 of 187