User Manual

Updating ESP32 Firmware
There may come a time when you want to update the firmware on the ESP32 itself. This isn't something we expect
you'll do often if at all, but its good to know how if you need to.
There are two ways to do it. The first uses the SAMD51 main chip as a USB->Serial converter, then you can use any
computer and esptool (https://adafru.it/E9p) to update the ESP32. This is recommended because esptool is very
powerful and fast.
Turn your PyPortal or Metro M4 AirLift into a USB-Serial converter
Make a backup of whatever code and files you have - you will lose your CircuitPython/Arduino code (we overwrite it)
for sure. You should not end up losing any files on the QSPI flash but its a good idea to back em up anyways!
Double click to enter bootloader mode. Then drag over this UF2
https://adafru.it/Ep1
https://adafru.it/Ep1
https://adafru.it/END
https://adafru.it/END
https://adafru.it/F98
https://adafru.it/F98
It should re-enumerate USB and appear as a COM or Serial port on your computer. Make a note of the serial port by
checking the Device Manager (windows) or typing in ls /dev/cu* or /dev/tty* (Mac or Linux) in a terminal
Click here to find and download the latest NINA.bin file (https://adafru.it/E7Q)
Then save it to your desktop or something, and in a terminal, run:
esptool.py --port /dev/ttyS6 --before no_reset --baud 115200 write_flash 0 NINA_W102.bin
or
esptool.py --port COM7 --before no_reset --baud 115200 write_flash 0 NINA_W102.bin
Replace /dev/ttyS6 or COM7 with the correct serial/COM port to match what the PyPortal/Metro M4 AirLift appears as.
After it's done, you can re-load CircuitPython or your Arduino code and keep going!
Source Code
For the curious, you can find the source code here (https://adafru.it/EiN)
It is compiled in Arduino so you will need all that set up!
© Adafruit Industries https://learn.adafruit.com/adafruit-metro-m4-express-airlift-wifi Page 184 of 187