If you're familiar with our other products and chipsets you may be famliar with our drag-n-drop bootloader, a.k.a UF2. We have a UF2 bootloader for the ESP32-S2, that will let you drag firmware on/off a USB disk drive

Unlike the M0 (SAMD21) and M4 (SAMD51) boards, there is no bootloader protection for the UF2 bootloader. That means it is possible to erase or damage the bootloader, especially if you upload Arduino sketches to ESP32S2 boards that doesn't "know" there's a bootloader it should not overwrite!

However, thanks to the ROM bootloader, you don't have to worry about it if the UF2 bootloader is damaged. You can simply re-load the UF2 bootloader (USB-disk-style) with the ROM bootloader (non-USB-drive)

Installing a new bootloader will erase your MagTag! Be sure to back up your data first.

Step 1. Get into the ROM bootloader and install esptool.py

See the previous page on how to do that!

Step 2. Download the tinyuf2_combo.bin file here

Note that this file is 3MB but that's because the bootloader is near the end of the available flash. It's not actually 3MB large, most of the file is empty but its easier to program if we give you one combined 'swiss cheese' file. Save this file to your desktop or wherever you plan to run esptool from

For MagTag:

For Metro ESP32-S2:

Step 3. Option A) Use esptool.py to upload

  • Put the board into bootloader mode (hold down BOOT0/DFU and click reset)
  • Determine the serial or COM port of the board

Run this command and replace the serial port name with your matching port and the file you just downloaded

esptool.py -p COM88 write_flash 0x0 tinyuf2_combo.bin

There might be a bit of a 'wait' when programming, where it doesn't seem like its working. Give it a minute, it has to erase the old flash code which can cause it to seem like its not running.

You'll finally get an output like this:

Click RESET button to launch the bootloader. You'll see a new disk drive on your computer with the name MAGTAGBOOT or similar

Step 3 Option B. Use the Web Serial ESPTool to upload

Another option if you are having trouble getting ESPTool running, is to use the Web Serial ESPTool in this guide. This tool uses Web Serial to erase or upload firmware to your board.

This guide was first published on Nov 10, 2020. It was last updated on Nov 10, 2020.

This page (Install UF2 Bootloader) was last updated on Apr 13, 2021.

Text editor powered by tinymce.