Firmware¶
Building from source¶
Prerequisites¶
Build steps¶
- Open the
RC_TOOLBOXfolder in VS Code - PlatformIO will automatically download dependencies (ESP32 toolchain, LVGL, TFT_eSPI, etc.)
- Click Build (✓ checkmark) in the PlatformIO toolbar
Upload to device¶
- Connect your ESP32-S3 via USB
- Click Upload (→ arrow) in the PlatformIO toolbar
- Wait for the upload to complete
- The device will reboot automatically
Alternatively, use the terminal:
pio run --target upload
Monitor serial output¶
To see debug messages:
pio device monitor
Or click the Serial Monitor icon in PlatformIO.
Pre-built binaries¶
Pre-built firmware is available in the binaries/ folder:
| File | Description |
|---|---|
firmware.bin |
ESP32-S3 firmware |
Flashing with esptool¶
If you don't want to build from source, flash the pre-built binary:
pip install esptool
esptool.py --chip esp32s3 --port /dev/ttyUSB0 write_flash 0x10000 binaries/firmware.bin
Replace /dev/ttyUSB0 with your serial port:
- macOS: /dev/cu.usbmodem* or /dev/cu.SLAB_USBtoUART
- Windows: COM3 (check Device Manager)
- Linux: /dev/ttyUSB0 or /dev/ttyACM0
macOS Simulator¶
For GUI development without hardware, a macOS simulator is included:
./simulator/build_sim.sh # Release build
./simulator/build_sim_debug.sh # Debug build
Pre-built simulator binaries are in binaries/:
- lvgl_simulator_macOS – Release
- lvgl_simulator_macOS_debug – Debug
Run the simulator:
./binaries/lvgl_simulator_macOS
Touch calibration¶
If touch input is offset, run the calibration environment:
- Edit
platformio.iniby switching from the default environment to the touch environment:
[platformio]
; default_envs = esp32-s3-devkitc-1
; src_dir = src
default_envs = touch-calibration
src_dir = touch_calibration
- Build and upload
- Follow on-screen instructions to tap calibration points
- Note the calibration values shown on screen
-
Update
src/main.cppwith your calibration data:cpp uint16_t calData[5] = {403, 3387, 375, 3250, 7}; // Your values tft.setTouch(calData); -
Switch back to main environment and re-upload