Files
esp32-debug-dongle/platformio.ini
T
2026-06-16 13:25:45 +10:00

106 lines
3.5 KiB
INI

; PlatformIO Project Configuration File
; ESP32 Debug Dongle - Web Serial Terminal with Bluetooth
;
; Build and upload:
; pio run -t upload
;
; Upload filesystem (LittleFS with web files):
; pio run -t uploadfs
;
; Monitor serial output:
; pio device monitor
[env:esp32dev]
platform = espressif32
board = esp32dev
framework = arduino
monitor_speed = 115200
monitor_filters = esp32_exception_decoder
board_build.filesystem = littlefs
; Use a larger app partition (pick ONE):
board_build.partitions = huge_app.csv ; 3MB app, 1MB FS, no OTA
; board_build.partitions = no_ota.csv ; 2MB app, 2MB FS, no OTA
; board_build.partitions = min_spiffs.csv ; 1.9MB app + OTA, 190KB FS
build_flags =
-DCORE_DEBUG_LEVEL=3
-DCONFIG_BT_ENABLED=1
-DCONFIG_BLUEDROID_ENABLED=1
-DHAS_BT_CLASSIC=1 ; classic SPP exists on the original ESP32
-DSTA_SSID="${sysenv.STA_SSID}"
-DSTA_PASSWORD="${sysenv.STA_PASSWORD}"
; Libraries
lib_deps =
; Async Web Server and dependencies
https://github.com/ESP32Async/ESPAsyncWebServer
https://github.com/ESP32Async/AsyncTCP
; ArduinoJson for configuration/commands
ArduinoJson
; Upload settings (adjust port as needed)
; upload_port = /dev/ttyUSB0
; upload_speed = 921600
; Extra scripts for LittleFS
extra_scripts =
pre:scripts/download_xterm.py
; ============================================================================
; LilyGo T3-S3 -- ESP32-S3 + SX127x LoRa + SSD1306 128x64 OLED + microSD.
; The remote debug bridge: UART <-> telnet(:23)/WebSocket, GPIO reset/wake,
; SD logging (NTP-dated), OLED status. NOTE: ESP32-S3 has NO Bluetooth Classic,
; so HAS_BT_CLASSIC is NOT set here (telnet + WebSocket replace SerialBT).
; Pins marked CONFIRM must be checked against your actual board wiring.
; ============================================================================
[env:t3s3]
platform = espressif32
board = esp32-s3-devkitc-1
framework = arduino
monitor_speed = 115200
monitor_filters = esp32_exception_decoder
board_build.mcu = esp32s3
board_build.flash_size = 4MB
board_upload.flash_size = 4MB
board_build.filesystem = littlefs
board_build.partitions = huge_app.csv
build_flags =
-DCORE_DEBUG_LEVEL=3
-DARDUINO_USB_CDC_ON_BOOT=1 ; console on USB CDC -> frees UART0 (43/44)
;-DSTA_SSID="${sysenv.STA_SSID}"
;-DSTA_PASSWORD="${sysenv.STA_PASSWORD}"
-DSTA_SSID="MeridenRainbow5G"
-DSTA_PASSWORD="4z8bcw5vfrs3n7dm"
-DBOARD_T3S3=1
; --- OLED (SSD1306 128x64) ---
-DT3S3_OLED_SDA=18
-DT3S3_OLED_SCL=17
-DT3S3_OLED_RST=21
-DT3S3_OLED_ADDR=0x3C
; --- target UART bridge (wire to the sensor's debug UART) ---
-DTARGET_RX_PIN=44 ; CONFIRM: dongle RX <- sensor TX
-DTARGET_TX_PIN=43 ; CONFIRM: dongle TX -> sensor RX
; --- GPIO control lines to the target (reset / wake) ---
-DGPIO_RESET_PIN=2 ; CONFIRM: -> sensor RST
-DGPIO_WAKE_PIN=1 ; CONFIRM: -> sensor control/wake pin
-DGPIO_CTRL_ACTIVE_LOW=1
; --- microSD on FSPI/SPI2 (separate bus from LoRa, which uses HSPI/SPI3) ---
-DT3S3_SD_SCK=14
-DT3S3_SD_MISO=2
-DT3S3_SD_MOSI=11
-DT3S3_SD_CS=13
-DT3S3_SD_FREQ_HZ=20000000UL
; --- timezone for NTP-dated logs (Australia/Victoria) ---
-DNTP_TZ='"AEST-10AEDT,M10.1.0,M4.1.0/3"'
lib_deps =
https://github.com/ESP32Async/ESPAsyncWebServer
https://github.com/ESP32Async/AsyncTCP
ArduinoJson
adafruit/Adafruit SSD1306
adafruit/Adafruit GFX Library
extra_scripts =
pre:scripts/download_xterm.py