0 ESP32 Arduino build & required libaries
Ray Jones edited this page 2019-07-01 10:45:13 +00:00

ESP32 build settings

PlatformIO under VScode

After putting up with the Arduino IDE interface under VScode for far too long I switched to using PlatformIO with VScode.
The performance change is remarkable, build take a fraction of the time the Arduino IDE takes.

It is strongly recommended to use this VScode + PlatformIO combination.

The reason for change?
PlatformIO supports inline debugging using JTAG via an ESP-PROG device WINNER WINNER, CHICKEN DINNER!
I have still yet to receive my ESP-PROG, but the performance improvement just in building the app is worth it alone.

You still need to select minimal-spiffs, but that is already defined in the platformio.ini file in the repository :-)

Arduino Board Configuration

There are quite a few ESP32 boards to select from within the Arduino IDE.
This make it more confusing than is really required.
The ESP32 processor we are targeting in this design is housed within a ESP-WROOM-32 module.
The de facto standard ESP32 Dev kit used this design, and it highly recommend to just pick this board configuration, even if you use a different brand; eg: DoIt.

By doing so, you get a wider choice of partitions to use, which is important.

Minimal SPIFFS Partition Scheme

When the compiled binary size with WiFi code approaches 1Mbyte, for some weird obtuse reason the Default Partition Scheme produces weird behaviour (despite 1.4MB being available); eg:

  • Watchdog timeouts during reboot, causing a constant reboot cycle (visible via serial port debug)
  • Web pages not being served
  • TelnetSpy not responding to telnet connections

For reliable operation, you must use the Minimal SPIFFS Partition Scheme in the Arduino board configuration options.

Enable SPIFFS upload in Arduino IDE

Install the Arduino ESP32 filesystem uploader: https://github.com/me-no-dev/arduino-esp32fs-plugin

Required libraries

ESP32

The ESP environment must be added to the Arduino environment.

https://github.com/espressif/arduino-esp32 or
https://dl.espressif.com/dl/package_esp32_index.json (V1.0.1)

Libraries - now included in /src/Afterburner/src/Libraries

DO NOT ADD TO ARDUINO IDE