Documentation / Shipping it

Flashing and configuration

From the zip to a running board, and the settings you will touch after the first boot.

You have a zip from the export dialog. This page takes it to a running board, on either PlatformIO or the Arduino IDE, and then covers the configuration you are most likely to have to touch afterwards: rotation, colour, touch calibration, the filesystem for images, and the handful of boards that need something extra.

Before you power anything. Check the wiring against your board's schematic, not just against the preset. Board pinouts change between revisions, and a wrong backlight or reset pin can damage a panel. The preset's verify note and the Configuration notes in the generated README.md say what to look at.

What you need

Route A: PlatformIO

  1. Unzip. Open the project folder (the one containing platformio.ini) in VS Code with the PlatformIO extension, or cd into it.
  2. Plug the board in. If it has a BOOT button and is not detected for upload, hold BOOT while pressing RESET, then release BOOT.
  3. Build and upload:
    pio run -t upload
    The first run downloads the platform, the core and every library in lib_deps, which takes a few minutes.
  4. If the project has image assets in data/, upload the filesystem as well:
    pio run -t uploadfs
  5. Open the monitor:
    pio device monitor
    at 115200 baud. You should see <Name> starting..., any device probe results, and UI ready.

platformio.ini already sets monitor_speed, the partition scheme (huge_app.csv on ESP32), the TFT_eSPI defines where that library is used, and -DLV_CONF_INCLUDE_SIMPLE -I . so the generated lv_conf.h is the one LVGL picks up. Nothing needs copying anywhere.

Route B: Arduino IDE

  1. Install the libraries. Open LIBRARIES.md; for each entry in Install these, search for the quoted name in Sketch > Include Library > Manage Libraries and install it. Match the LVGL major version - 9.x or 8.3.x - to the one in the file's Versions table.
  2. Place lv_conf.h. Copy it into your Arduino libraries/ folder, next to the lvgl folder (not inside it). LVGL looks there by default. If you already have one from another project, replace it or merge; the generated file enables only the fonts and widgets this design uses.
  3. Place the driver configuration. With TFT_eSPI, copy the generated User_Setup.h over libraries/TFT_eSPI/User_Setup.h - that library is configured by a file inside itself. With LovyanGFX, GFX Library for Arduino or esp_lcd there is nothing to copy; the configuration is in the sketch folder.
  4. Open the sketch. Double-click the .ino. The IDE opens the whole folder, including the ui/ subfolder, as one sketch.
  5. Choose the board under Tools > Board - the FQBN on the Board tab, and the Board core line in LIBRARIES.md, name it. Then the settings that matter:
    • Partition Scheme: Huge APP (3MB No OTA/1MB SPIFFS) on a 4 MB ESP32. LVGL builds are large, and this is what the asset budget assumes.
    • PSRAM: enabled where the board has it; OPI PSRAM on an ESP32-S3 with an RGB panel, which will not allocate its framebuffer otherwise.
    • Upload Speed: 921600 usually works; drop to 115200 if uploads fail.
    • USB CDC On Boot: enabled on S3 and C3 boards that expose native USB, or the serial monitor stays silent.
  6. Upload, then open the serial monitor at 115200.
  7. Upload the images, if there are any - see below.

Uploading image assets

Images stored on the filesystem are flashed separately from the sketch. The symptom of forgetting is every image drawing as an empty box, and ui_fs_init() printing a warning per missing file on the serial monitor. data/README.md in the export lists each file, the total against the partition, and the exact steps:

FilesystemPlatformIOArduino IDE
SPIFFSpio run -t uploadfsThe ESP32 Sketch Data Upload plugin (Arduino IDE 1.x), Tools > ESP32 Sketch Data Upload. On IDE 2.x the maintained plugin uploads LittleFS instead - switch the filesystem in Assets > Filesystem to match.
LittleFSpio run -t uploadfsThe arduino-littlefs-upload plugin, then Ctrl+Shift+P > Upload LittleFS to Pico/ESP8266/ESP32.
FFatpio run -t uploadfsA FAT upload plugin, or write the image with esptool.py write_flash.
SD cardCopy the files to the card's rootCopy the files to the card's root.

Whichever tool you use, the files must sit in a folder named data/ next to the .ino - which is where the export puts them - and Tools > Partition Scheme must leave room for the filesystem.

First boot

A good boot prints the project name, then a line per device the hardware layer probed, then UI ready, and the panel shows the first screen. If the screen is blank or wrong, the serial output narrows it down fast:

The troubleshooting page has the full symptom table.

Configuration after the first boot

Almost everything is a setting in the designer, and the right fix is to change it there and re-export - the generated files are meant to be replaced, and ui_events.c survives. The ones you are most likely to need:

SymptomSetting
The image is rotated or mirroredHardware > Display > Rotation. Touch follows the display rotation on capacitive controllers; resistive ones may then need the axis switches.
Colours are a negativeHardware > Display > Invert.
Red and blue are swappedHardware > Display > Colour order, RGB or BGR.
Touch lands in the wrong placeHardware > Touch: Swap X/Y, Invert X, Invert Y. Try Swap first if a horizontal drag moves vertically.
Touch is offset at the edges (resistive)Hardware > Touch > Calibration: the raw minimum and maximum per axis. Print raw values from the serial monitor at each corner and enter them.
Flicker, tearing, noise on the panelLower the SPI clock on the Display tab, or shorten the wires. RGB panels: check the PSRAM speed and the pixel clock.
Backlight off, or on when it should be offHardware > Display > Backlight: the pin and its active level.
The board reboots as the UI startsExport settings > Buffer height, lower. Or enable PSRAM in the IDE to match the project.
A sensor reads its initial value foreverIt was not found at boot: check its address on the Devices tab and the bus pins on the Buses tab against the serial output.

For a quick experiment you can edit lcd_pins.h directly - every one of these is a #define there - but carry the change back into the designer before the next export or it will be lost.

Board-specific notes

Re-exporting

Change the design, export again, unzip over the old folder. Everything is replaced except ui/ui_events.c; if the new export declares a new Call function stub, add its body to your existing file from the fresh ui_events.h. A changed LVGL version also means re-installing the matching library and re-uploading any image assets, whose binary format differs between 8 and 9.