144 lines
5.9 KiB
INI
144 lines
5.9 KiB
INI
; ============================================================================
|
|
; PlatformIO Configuration for Waveshare ESP32-S3-Touch-LCD-5B
|
|
; Project: ESP32-S3-LCD-5B (Automotive Display Controller)
|
|
; ============================================================================
|
|
|
|
[platformio]
|
|
default_envs = waveshare_esp32_s3_lcd_5b
|
|
|
|
; ============================================================================
|
|
; Environment Configuration
|
|
; ============================================================================
|
|
[env:waveshare_esp32_s3_lcd_5b]
|
|
|
|
; ----------------------------------------------------------------------------
|
|
; Platform & Framework
|
|
; ----------------------------------------------------------------------------
|
|
; Using pioarduino platform for Arduino core 3.3.3 (ESP-IDF v5.5.1)
|
|
; Official PlatformIO only supports Arduino core 2.x
|
|
platform = https://github.com/pioarduino/platform-espressif32/releases/download/55.03.33/platform-espressif32.zip
|
|
framework = arduino
|
|
|
|
; ----------------------------------------------------------------------------
|
|
; Board Configuration
|
|
; ----------------------------------------------------------------------------
|
|
; Custom board definition for Waveshare ESP32-S3-Touch-LCD-5B
|
|
; Hardware: ESP32-S3-WROOM-1-N16R8 (16MB Flash + 8MB OPI PSRAM)
|
|
; Board definition is in boards/esp32-s3-wroom-1-n16r8.json
|
|
board = esp32-s3-wroom-1-n16r8
|
|
|
|
; ----------------------------------------------------------------------------
|
|
; Upload & Monitor Settings
|
|
; ----------------------------------------------------------------------------
|
|
upload_speed = 921600
|
|
; 921600 for the fallback-UART case; ignored (nominal) when Serial = native USB
|
|
; CDC, where throughput is USB Full-Speed (~1 MB/s) and gates nothing.
|
|
monitor_speed = 921600
|
|
monitor_filters = esp32_exception_decoder
|
|
|
|
; ----------------------------------------------------------------------------
|
|
; Library Dependencies
|
|
; ----------------------------------------------------------------------------
|
|
lib_deps =
|
|
; Display and UI libraries (from GitHub - not yet in PlatformIO registry)
|
|
https://github.com/esp-arduino-libs/ESP32_Display_Panel.git#v1.0.4
|
|
https://github.com/esp-arduino-libs/ESP32_IO_Expander.git#v1.1.1
|
|
esp-arduino-libs/esp-lib-utils@^0.2.0
|
|
lvgl/lvgl@^8.4.0
|
|
|
|
; ----------------------------------------------------------------------------
|
|
; Build Flags & Source Directories
|
|
; ----------------------------------------------------------------------------
|
|
; Also compile the LVGL port that lives under include/display
|
|
build_src_filter = +<*> +<modules/*> +<../include/display/*>
|
|
|
|
; ---- Display experiment (branch display-xip, wiki open-questions #13 step 3) ----
|
|
; Rebuilds the Arduino core with these sdkconfig changes (pioarduino custom_sdkconfig):
|
|
; - XIP_FROM_PSRAM: code + rodata execute from PSRAM, so flash writes (NVS, OTA)
|
|
; no longer stall everything that touches PSRAM (the LCD framebuffer refill).
|
|
; - LCD_RGB_ISR_IRAM_SAFE: the bounce-buffer refill interrupt keeps running while
|
|
; the flash cache is disabled.
|
|
; Components not used by this firmware, dropped from the core rebuild. RainMaker /
|
|
; Insights also try to embed a https_server.crt that only exists in their own
|
|
; projects, which broke the first custom_sdkconfig build (2026-09-27).
|
|
custom_component_remove =
|
|
espressif/esp_rainmaker
|
|
espressif/rmaker_common
|
|
espressif/esp_insights
|
|
espressif/esp_diag_data_store
|
|
espressif/esp_diagnostics
|
|
espressif/cbor
|
|
espressif/qrcode
|
|
espressif/network_provisioning
|
|
espressif/esp-zboss-lib
|
|
espressif/esp-zigbee-lib
|
|
espressif/esp_hosted
|
|
espressif/esp_wifi_remote
|
|
espressif/esp-sr
|
|
espressif/esp-dsp
|
|
espressif/esp-modbus
|
|
espressif/libsodium
|
|
chmorgan/esp-libhelix-mp3
|
|
espressif/esp32-camera
|
|
|
|
custom_sdkconfig =
|
|
CONFIG_SPIRAM_XIP_FROM_PSRAM=y
|
|
CONFIG_SPIRAM_FETCH_INSTRUCTIONS=y
|
|
CONFIG_SPIRAM_RODATA=y
|
|
CONFIG_LCD_RGB_ISR_IRAM_SAFE=y
|
|
|
|
build_flags =
|
|
; C++ standard (required for ESP32_Display_Panel)
|
|
-std=gnu++17
|
|
|
|
; Arduino Core debug level (0=None, 1=Error, 3=Info, 5=Verbose)
|
|
-DCORE_DEBUG_LEVEL=3
|
|
|
|
; USB / Serial routing (deterministic — do not rely on core defaults)
|
|
; USB_MODE=1 -> Hardware CDC + JTAG (built-in USB-Serial-JTAG, the
|
|
; 303A:1001 port this board enumerates as)
|
|
; CDC_ON_BOOT=1 -> `Serial` maps to that native USB CDC, NOT UART0 pins.
|
|
; Gives ~1 MB/s throughput so the CANRAW frame dump
|
|
; keeps up with a busy bus (UART0 @115200 would drop
|
|
; frames), and keeps GPIO43/44 free for the RS485 UART1.
|
|
-DARDUINO_USB_MODE=1
|
|
-DARDUINO_USB_CDC_ON_BOOT=1
|
|
|
|
; LVGL configuration
|
|
-DLV_CONF_INCLUDE_SIMPLE
|
|
-DLV_LVGL_H_INCLUDE_SIMPLE
|
|
|
|
; PSRAM support
|
|
-DBOARD_HAS_PSRAM
|
|
-mfix-esp32-psram-cache-issue
|
|
|
|
; RGB LCD Framebuffer Configuration for large displays
|
|
; Force RGB LCD to use PSRAM for framebuffers (1024x600 requires ~2.4MB)
|
|
; NOTE: the RGB panel settings (21 MHz pixel clock, 10-line bounce buffers,
|
|
; porches, pins) come from ESP32_Display_Panel's board header
|
|
; BOARD_WAVESHARE_ESP32_S3_TOUCH_LCD_5_B.h (ESP_PANEL_BOARD_LCD_RGB_*).
|
|
; The old -DESP_PANEL_LCD_RGB_{BUFFER_NUMS,BOUNCE_BUF_SIZE,REFRESH_MODE}
|
|
; flags here were never read by the v1.x library and were removed 2026-09-27.
|
|
|
|
; FreeRTOS configuration
|
|
-DARDUINO_RUNNING_CORE=1 ; LVGL runs on Core 1
|
|
|
|
; Include paths (order matters - local overrides come first!)
|
|
-I include
|
|
-I include/config
|
|
-I include/display
|
|
-I include/protocol
|
|
-I src
|
|
|
|
; ----------------------------------------------------------------------------
|
|
; Advanced Options
|
|
; ----------------------------------------------------------------------------
|
|
build_unflags =
|
|
-std=gnu++11
|
|
|
|
; Pre-build workaround: put the nested Xtensa toolchain bin on PATH.
|
|
; See tools/fix_toolchain_path.py for the full explanation.
|
|
extra_scripts = pre:tools/fix_toolchain_path.py
|
|
|
|
build_type = release
|