0

Loading Custom ESP32 firmware on Metro M4 Express AirLift (W
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Loading Custom ESP32 firmware on Metro M4 Express AirLift (W

by User_UMjT7KxnxP8YN8 on Sun Feb 28, 2021 11:55 pm

Is there anything preventing me from installing my own custom firmware on the ESP32 process on the Metro M4 Express AirLift (WiFi) - Lite?

I realize I would be giving up compatibility with any existing libraries that depend on Adafruit's firmware being installed, but I want to use the AirLift I have as a development platform for a Feather M4 Express/ESP32 Featherwing project I'm working on so I can use the AirLift's JTAG connector for debugging.

Any words of wisdom or caution regarding this course of action are most welcome.

User_UMjT7KxnxP8YN8
 
Posts: 235
Joined: Tue Jul 17, 2018 1:28 pm

Re: Loading Custom ESP32 firmware on Metro M4 Express AirLif

by mikeysklar on Mon Mar 01, 2021 6:33 pm

Seems like a cool idea to me. Were you going to start with the Adafruit fork of the NINA-W102 or use the Arduino chain?

# adafruit fork NINA-W102
https://github.com/adafruit/nina-fw

# Arduino NINA-W102
https://github.com/arduino/nina-fw

There isn't much in the way of github issues to follow on the Adafruit archive, but the Arduino one has some you will want to look at:

https://github.com/arduino/nina-fw/issues

mikeysklar
 
Posts: 4930
Joined: Mon Aug 01, 2016 8:10 pm

Re: Loading Custom ESP32 firmware on Metro M4 Express AirLif

by User_UMjT7KxnxP8YN8 on Mon Mar 01, 2021 8:02 pm

I was thinking of starting with this: https://github.com/espressif/arduino-esp32.

I've written a bunch of ESP8266 code I'd like to reuse and suspect this approach will help.

I've implemented a very nice NTP client for the ESP8266 using 64-bit math. It corrects for processing time and filters NTP responses by round-trip delay time to reduce volatility.

When I'm satisfied I've debugged it properly I'll post it on github.

I ran a test over the weekend to see how it works, and it performed pretty well. After a few hours I put an ESD bag and a towel over the board to insulate it from temperature variations and it did even better. In the attached chart, the top table shows results with no insulation, with signed numbers in the left column and absolute values in the right. The bottom table shows results with insulation. You'll notice a discontinuity in the chart where I made the change, and results are visibly noticeable.

ESP8266_NTP_Test_Table.jpg
ESP8266_NTP_Test_Table.jpg (50.29 KiB) Viewed 95 times


ESP8266_NTP_Test_Chart.jpg
ESP8266_NTP_Test_Chart.jpg (71.13 KiB) Viewed 95 times

User_UMjT7KxnxP8YN8
 
Posts: 235
Joined: Tue Jul 17, 2018 1:28 pm

Re: Loading Custom ESP32 firmware on Metro M4 Express AirLif

by User_UMjT7KxnxP8YN8 on Tue Mar 02, 2021 2:50 am

Do you have any recommendations for uploading custom ESP32 firmware using the Arduino IDE? I'd prefer to avoid making UF2 files to upload via the "serial pass-thru" described at https://learn.adafruit.com/upgrading-esp32-firmware/upgrade-an-airlift-all-in-one-board, if possible.

For instance, could I use the serial pass-thru UF2 file to get into a mode that allowed me to upload to the ESP32 from the Arduino IDE?

I also have a J-Link Plus I could use with Segger products if the board is wired in a way that supports that.

User_UMjT7KxnxP8YN8
 
Posts: 235
Joined: Tue Jul 17, 2018 1:28 pm

Re: Loading Custom ESP32 firmware on Metro M4 Express AirLif

by User_UMjT7KxnxP8YN8 on Wed Mar 03, 2021 1:12 am

Believe I've found an answer to my question. Looks like I can create ESP32 firmware in .bin format and load it using esptool.py

Website bug report: the navigation bar link to Upgrade All-in-One ESP32 AirLift Firmware at https://learn.adafruit.com/upgrading-es ... -one-board is dead, apparently because no bookmark was inserted at that point in the page.

User_UMjT7KxnxP8YN8
 
Posts: 235
Joined: Tue Jul 17, 2018 1:28 pm

Please be positive and constructive with your questions and comments.