Skip to content

Building

The Man edited this page Jan 25, 2022 · 2 revisions

Notes

Development was exclusively done on a Windows computer using VSCode only.
I don't know if macOS, Linux and/or other IDEs require additional or different steps.

Requirements

To build the project, you'll need an IDE with PlatformIO support.
Personally, I use VSCode with the PIO extension.

The repo already contains a platformio.ini file with all necessary information.

Filesystem

This project employs "LittleFS" as a filesystem to store configuration data.
The internal flash must first be partitioned accordingly, otherwise I/O operations will fail:

  1. In VSCode, under the PlatformIO extension menu, select 'Build Filesystem Image'.
  • This operation requires the use of mklittlefs.
    • A python script exists that will replace the env variable MKSPIFFSTOOL with this executable, but it was built for Windows only!
  1. If successful, the filesystem will be built and can now be uploaded using 'Upload Filesystem Image' or esptool.py.

Compiling

Compiling doesn't require much effort, just hit 'Build' and then upload the resulting .bin file to the MCU. PlatformIO will automatically download all libraries (and their dependencies) if not found.
To program an ESP, its BOOT pin (GPIO0) must be pulled to ground during startup.

Uploading

If uploading code to the ESP32 whilst it's already mounted on the board, the following pins may be used:

Clone this wiki locally