ARM Programming

Pages
Contributors: M-Short, Ell C
Favorited Favorite 13

Bootloaders

A bootloader is a small piece of code that looks at the programming port (in this case USB) to see if there is new code coming in. If there is, then it takes the code and puts it in a predetermined location. If there isn't, then it runs the code currently at that location.

Most Arduino boards have a bootloader that allows us to upload code over a USB port (or UART Serial connection). This way, once the bootloader is installed, we can program the board much easier. But sometimes we want to change the function of the bootloader, install a bootloader on a brand new board, or just skip the bootloader and install our code directly (makes it harder for other people to change the code on, say, a commercial product).

The bootloader we recommend using is the UF2 bootloader. You can go here for more information on UF2 bootloaders, or click on the button below to go to SparkFun's SAMD Bootloaders GitHub Repo:


UF2 is a file format designed by Microsoft that stands for USB Flashing Format. This format was designed for PXT (also known as Microsoft MakeCode) and allows for programming boards over the Mass Storage Class (removable drive). The bootloader is also compatible with BOSSA which is what the Arduino IDE uses. In other words, UF2 lets you write MakeCode, use Circuit Python, and use the Arduino IDE, all in one bootloader.

Whether you use the UF2 bootloader or another bootloader, you're going to have to download the file. Make sure the file you download is compatible with the board/configuration you are using. Check out our GitHub Respository for the SAMD bootloaders; the Turbo bootloader should work with these boards (you want the *.bin file).