; ============================================================================= ; Marine Navigation Display — PlatformIO Configuration ; Target: Waveshare ESP32-S3-Zero + 4.2" E-Ink (400x300) ; ============================================================================= [platformio] default_envs = esp32s3_marine_display ; ----------------------------------------------------------------------------- ; Common settings shared across environments ; ----------------------------------------------------------------------------- [env] platform = espressif32 @ ^6.9.0 framework = arduino monitor_speed = 115200 monitor_filters = esp32_exception_decoder, time ; ----------------------------------------------------------------------------- ; Production environment ; ----------------------------------------------------------------------------- [env:esp32s3_marine_display] board = esp32-s3-devkitm-1 ; Custom partition table enabling: ; - OTA_0 / OTA_1 (each 1.5 MB) ; - LittleFS (1 MB) for config + web assets board_build.partitions = partitions/custom_ota.csv ; Flash mode: QIO for speed, 80 MHz board_build.flash_mode = qio board_build.f_flash = 80000000L ; Enable PSRAM if available on the S3-Zero variant build_flags = -D ARDUINO_USB_MODE=1 -D ARDUINO_USB_CDC_ON_BOOT=1 -D CONFIG_SPIRAM_USE_MALLOC=1 ; ── Application build flags ────────────────────────────────────────── -D APP_VERSION=\"1.0.0\" ; ── Display ────────────────────────────────────────────────────────── -D DISPLAY_WIDTH=400 -D DISPLAY_HEIGHT=300 ; ── BLE UUIDs (Marine Gateway protocol) ────────────────────────────── -D BLE_DEVICE_NAME=\"MarineGateway\" ; ── Touch pins (ESP32-S3 native capacitive touch) ──────────────────── -D TOUCH_PIN_NEXT=1 -D TOUCH_PIN_PREV=2 -D TOUCH_PIN_ACTION=3 ; ── NeoPixel status LED ─────────────────────────────────────────────── -D STATUS_LED_PIN=21 -D STATUS_LED_COUNT=1 ; ── Misc ────────────────────────────────────────────────────────────── -D CORE_DEBUG_LEVEL=3 -DCONFIG_NIMBLE_ENABLED=1 ; LittleFS filesystem image (contains web UI assets) board_build.filesystem = littlefs ; Upload filesystem image: pio run -t uploadfs extra_scripts = pre:scripts/gen_littlefs.py ; ── Libraries ──────────────────────────────────────────────────────────────── lib_deps = ; E-Ink display driver (GxEPD2) — latest stable zinggjm/GxEPD2 @ ^1.6.3 ; Adafruit GFX (required by GxEPD2) adafruit/Adafruit GFX Library @ ^1.11.11 ; JSON parsing/serialisation bblanchon/ArduinoJson @ ^7.3.1 ; BLE stack — NimBLE (much lighter than Bluedroid) h2zero/NimBLE-Arduino @ ^2.3.2 ; Async HTTP server for the web UI + OTA ESP32Async/ESPAsyncWebServer @ ^3.7.4 ESP32Async/AsyncTCP @ ^3.3.7 ; NeoPixel status LED adafruit/Adafruit NeoPixel @ ^1.12.3 ; ── Upload / Debug ─────────────────────────────────────────────────────────── upload_speed = 921600 ; OTA upload (uncomment and set IP when device is on the network): ; upload_protocol = espota ; upload_port = 192.168.4.1 ; ----------------------------------------------------------------------------- ; Development / verbose environment (same board, extra logging) ; ----------------------------------------------------------------------------- [env:esp32s3_marine_display_dev] extends = env:esp32s3_marine_display build_flags = ${env:esp32s3_marine_display.build_flags} -D CORE_DEBUG_LEVEL=5 -D DEBUG_BLE=1 -D DEBUG_DISPLAY=1