Repository navigation
Getting Started
This project uses arduino-cli to handle dependencies, compiling, and flashing, and esptool v5.x for reliable firmware uploads.
On macOS (Using Homebrew)
brew update
brew install arduino-cliOn Windows (Manual Installation)
- Download: Get the latest release from the Arduino CLI Releases page.
-
Install/Extract:
- If using the MSI, run it and follow the prompts.
- If using the Zip, extract
arduino-cli.exeto a permanent folder (e.g.,C:\Arduino-CLI).
-
Add to PATH:
- Search Windows for "Edit the system environment variables".
- Click Environment Variables > Select Path in 'System variables' > Edit.
- Click New and add the folder path where
arduino-cli.exeis located.
-
Verify: Open a new PowerShell window and run
arduino-cli version. -
Initialise: Run
arduino-cli config initto create the default configuration.
The project requires esptool v5.x installed via pipx (see Troubleshooting for why the Arduino-bundled v4.6 was replaced).
On macOS
brew install pipx && pipx install esptoolOn Windows (Using PowerShell)
- Install Python: If you don't have Python, install it from the Microsoft Store or python.org.
-
Bootstrap pipx: Run the following to install
pipxand add it to your PATH:(Note: You must restart your terminal or VS Code after running these commands for the changes to take effect.)py -m pip install --user pipx py -m pipx ensurepath
-
Install esptool:
pipx install esptool
Before configuring your board details, you must install the global 3rd-party libraries required for the project (ArduinoJson, ESPAsyncWebServer, Bounce2, etc.).
Simply run the dependency script which handles the installation of the ESP32 core and all library dependencies:
On macOS (Terminal)
./bin/all_libs.shOn Windows (Command Prompt or PowerShell)
bin\all_libs.batNote: The
ESPAsyncWebServerlibrary is installed from mathieucarbou's fork which natively supports ESP32 Core 3.x. The originalme-no-devversion crashes on Core 3.x with atcp_allocTCPIP lock assertion error.
Before you run any of the compiler and flasher scripts in the bin/ directory, you must configure the machine-specific properties.
On macOS: Edit bin/config.sh
On Windows: Edit bin/config.bat
For each file:
- Update the
PORTvariable to point to your connected ESP32-S3 (e.g./dev/cu.usbmodem1101on macOS orCOM14on Windows). - Ensure the
MKLITTLEFSpath correctly points to themklittlefsbinary downloaded by the ESP32 core.-
macOS: Usually at
~/Library/Arduino15/packages/esp32/tools/mklittlefs/.../mklittlefs -
Windows: Usually at
%LOCALAPPDATA%\Arduino15\packages\esp32\tools\mklittlefs\...\mklittlefs.exe
-
macOS: Usually at
After updating the config, you can compile and flash the firmware:
On macOS
./bin/app.sh # Uploads just the application firmware
./bin/all.sh # Wipes and uploads the full firmware + sys & user data partitions
./bin/data_sys.sh # Uploads only the system data partition (/sys)
./bin/data_user.sh # Uploads only the user data partition (/user) — overwrites existing user data!On Windows
bin\app.bat
bin\all.bat
bin\data_sys.bat
bin\data_user.bat Note: Both
all.shandall.batcontain a commented-out "Erase flash memory" step that performs a full chip erase (erase_flash). During the initial setup, you might want to wipe the entire flash memory for a fresh start — including the user data partition. You must also uncomment thedata_user.sh/data_user.batstep in the same script to re-upload baseline user files, otherwise the device will boot with a missing user filesystem. Keep them commented-out after initial setup.
| Script | macOS | Windows | Description |
|---|---|---|---|
| Config | bin/config.sh |
bin\config.bat |
Machine-specific settings (port, paths, baud rate) |
| Install Libs | bin/all_libs.sh |
bin\all_libs.bat |
Install ESP32 core and all library dependencies |
| App Only | bin/app.sh |
bin\app.bat |
Compile & upload application firmware only |
| Full Flash | bin/all.sh |
bin\all.bat |
Full compile + upload firmware, sys data, and user data |
| Sys Data | bin/data_sys.sh |
bin\data_sys.bat |
Build & upload the system LittleFS partition (/sys) |
| User Data | bin/data_user.sh |
bin\data_user.bat |
Build & upload the user LittleFS partition (/user) |
Note: data_user scripts will override the existing user data on the ESP32. Use with caution!
The ESP32 uses a custom partition scheme (defined in src/partitions.csv) to maximise space across standard code updates and LittleFS directories:
-
0x9000 (
nvs, 16KB): Non-Volatile Storage (Stores WiFi credentials and simple state logic). -
0x10000 (
ota_0, 2.18MB): The primary executable factory firmware (.bin). -
0x240000 (
ota_1, 2.18MB): The secondary executable firmware slot used for over-the-air (OTA) remote updates. -
0x470000 (
app_fs, 1.5MB): Mounts as/sysusing LittleFS to store read-only system UI assets. -
0x5F0000 (
user_fs, 1.12MB): Mounts as/userusing LittleFS for dynamic JSON settings, stats, and rotating log files. -
0x710000 (
coredump, 64KB): Dedicated partition space to assist in caching crash logs if the ESP32 panics.
The device requires an external microSD card for storage. The SD card MUST be formatted in MS-DOS (FAT32) to be readable by the ESP32.
For macOS Users:
- Open Disk Utility.
- Select your SD card from the sidebar.
- Click Erase.
- Set the Format to MS-DOS (FAT) and the Scheme to Master Boot Record.
For Windows Users:
- Open This PC.
- Right-click your SD card and select Format....
- Select FAT32 under File System.