Download Print this page

Advertisement

Quick Links

Upgrading ESP32 Firmware
Created by Brent Rubell
Last updated on 2021-03-29 01:04:43 PM EDT

Advertisement

loading
Need help?

Need help?

Do you have a question about the ESP32 and is the answer not in the manual?

Questions and answers

Summary of Contents for adafruit learning system ESP32

  • Page 1 Upgrading ESP32 Firmware Created by Brent Rubell Last updated on 2021-03-29 01:04:43 PM EDT...
  • Page 2 Guide Contents Guide Contents Overview Why would I update my ESP32's firmware? Parts External ESP32 Co-Processors ESP32 Co-Processor All-in-One Boards Materials Upgrade All-in-One ESP32 AirLift Firmware Uploading Serial Passthrough Code Install esptool.py Uploading nina-fw with esptool Verifying the Upgraded Firmware Version...
  • Page 3 (https://adafru.it/FWj). This firmware is programmed to the ESP32 at the Adafruit factory. If you wish to update to a newer version of nina-fw, you'll need to program it to the ESP32. BLE is supported on the ESP32 co-processor only with version NINA_W102-1.7.1.bin or later of the firmware (released in October 2020).
  • Page 4 Adafruit AirLift – ESP32 WiFi Co-Processor Breakout Board Give your plain ol' microcontroller project a lift with the Adafruit AirLift - a breakout board that lets you use the powerful ESP32 as a WiFi co-processor. You probably... $9.95 In Stock Add to Cart ©...
  • Page 5 ESP32 as a WiFi co-processor. You probably have your... Out of Stock Out of Stock ESP32 Co-Processor All-in-One Boards Don't want to add extra hardware to your project? Consider grabbing a board which has an ESP32 WiFi co-processor built-in. © Adafruit Industries https://learn.adafruit.com/upgrading-esp32-firmware Page 5 of 25...
  • Page 6 PyPortal, our easy-to-use IoT device that allows you to create all the things for the “Internet of Things” in minutes. Make custom touch screen interface... Out of Stock Out of Stock Adafruit Metro M4 Express AirLift (WiFi) - Lite © Adafruit Industries https://learn.adafruit.com/upgrading-esp32-firmware Page 6 of 25...
  • Page 7 Give your next project a lift with AirLift - our witty name for the ESP32 co-processor that graces this Metro M4. You already know about the Adafruit Metro... $34.95 In Stock Add to Cart Materials USB Cable USB cable - USB A to Micro-B - 3 foot long Add to Cart ©...
  • Page 8 Upgrade All-in-One ESP32 AirLift Firmware To support BLE on the ESP32 AirLift, you'll need NINA_W102-1.7.1.bin or later. Uploading Serial Passthrough Code First, back up any code and files you have on your CIRCUITPY drive . It will be overwritten by the code you're going to upload to your board.
  • Page 9 (https://www.python.org/downloads) and install the latest release. Install esptool.py Esptool is an application which can communicate with the ROM bootloader (https://adafru.it/LKe) Espressif chips. To install esptool, run the following in your terminal : pip3 install esptool © Adafruit Industries https://learn.adafruit.com/upgrading-esp32-firmware Page 9 of 25...
  • Page 10 --port COM7 --before no_reset --baud 115200 write_flash 0 NINA_W102-1.6.0.bin The command should detect the ESP32 and will take a minute or two to upload the firmware. The NeoPixel on your board will flicker and flash as the firmware uploads.
  • Page 11 If you were previously using your ESP32 with Arduino, you should load up an Arduino sketch to verify everything is working properly and the version of the nina-fw correlates with the version the sketch reads. Open up File->Examples->WiFiNINA->ScanNetworks and upload the sketch. Then, open the Serial Monitor.
  • Page 12 Upgrade External ESP32 Airlift Firmware To support BLE on the ESP32 AirLift, you'll need NINA_W102-1.7.1.bin or later. External AirLift FeatherWing, Shield, or ItsyWing External AirLift boards have three optional ESP32 control pins which are not connected by default: ESPGPIO0 ESPRX ESPTX Make sure to solder each of these pads together.
  • Page 13 TRINKETBOOT BOOT The board is now in bootloader mode. Now find the UF2 file you downloaded. Drag that file to the BOOT drive on your computer in your operating system file manager/finder. © Adafruit Industries https://learn.adafruit.com/upgrading-esp32-firmware Page 13 of 25...
  • Page 14 Adafruit Metro M4. You will also need to make the following connections between the board and the AirLift Breakout: Board Pin 12 to ESP32_ResetN Board Pin 10 to ESP32 GPIO0 Board TX to RXI Board RX to TX0 Click Download: Project ZIP to download the code below.
  • Page 15 ESP32 NINA_W102-1.6.0 esptool.py --port COM7 --before no_reset --baud 115200 write_flash 0 NINA_W102-1.6.0.bin The command should detect the ESP32 and will take a minute or two to upload the firmware. © Adafruit Industries https://learn.adafruit.com/upgrading-esp32-firmware...
  • Page 16 If ESPTool doesn't detect the ESP32 , make sure you've uploaded the correct .UF2 file to the bootloader and are using the correct serial port. Once the firmware is fully uploaded, the ESP32 will reset. Verifying the Upgraded Firmware Version To verify everything is working correctly, we'll load up either an Arduino sketch or CircuitPython code.
  • Page 17 © Adafruit Industries https://learn.adafruit.com/upgrading-esp32-firmware Page 17 of 25...
  • Page 18 You will see a new disk drive appear called RPI-RP2. The board is now in bootloader mode. Find the UF2 file you downloaded. Drag that file to the drive on your computer in your operating RPI-RP2 system file manager/finder. © Adafruit Industries https://learn.adafruit.com/upgrading-esp32-firmware Page 18 of 25...
  • Page 19 Next, you'll need to flash the firmware to your ESP32 AirLift module. If you're using the Google Chrome browser, you may follow the instructions below for programming using our web-based ESPTool. Otherwise, scroll down and follow the instructions for flashing using the Python esptool.py program.
  • Page 20 You will get a pop-up asking you to select the Pico's COM or Serial port. You may want to remove all other USB devices so only the ESP32-S2 board is attached, that way there's no confusion over multiple ports! Click Connect.
  • Page 21 Once you have successfully connected, a command toolbar will appear. Verify that the offset is 0x0 and choose the nina-fw .bin file you downloaded above. Click the program button to flash the firmware to your ESP32. © Adafruit Industries https://learn.adafruit.com/upgrading-esp32-firmware Page 21 of 25...
  • Page 22 To install esptool, run the following in your terminal : pip3 install esptool This guide assumes you have Python3 installed. If you have not installed it, navigate to the Python downloads page (https://www.python.org/downloads) and install the latest release. © Adafruit Industries https://learn.adafruit.com/upgrading-esp32-firmware Page 22 of 25...
  • Page 23 The command should detect the ESP32 and will take a minute or two to upload the firmware. If ESPTool doesn't detect the ESP32 , make sure you've uploaded the correct .UF2 file to the bootloader and are using the correct serial port.
  • Page 24 If you were previously using your ESP32 project with CircuitPython , you'll need to first reinstall CircuitPython firmware for your board. The QSPI flash should have retained its contents. If you don't see anything on the volume, copy files from the backup you made earlier to...
  • Page 25 © Adafruit Industries Last Updated: 2021-03-29 01:04:43 PM EDT Page 25 of 25...