ti-pote/apps/robot-hardware/platformio.ini
2026-04-09 02:47:53 +02:00

54 lines
1.4 KiB
INI

; Ti-Pote — Robot Hardware (ESP32 firmware)
; PlatformIO configuration
;
; Two envs are provided:
; - esp32dev : classic ESP32 (what the current OLED prototype uses)
; - esp32-s3 : target board per docs/hardware.md (Phase 2)
;
; Default is esp32dev because the current prototype wiring (VSPI pins
; CS=5, DC=16, RESET=17) targets the classic ESP32 module that Arthur
; currently has plugged into his laptop.
[platformio]
default_envs = esp32dev
src_dir = src
include_dir = include
lib_dir = lib
test_dir = test
[env]
framework = arduino
monitor_speed = 921600
upload_speed = 921600
lib_deps =
olikraus/U8g2@^2.35.30
build_flags =
-std=gnu++17
-Wall
-Wextra
; Protocol baud rate (matches docs/hardware.md)
-DHW_SERIAL_BAUD=921600
; Idle timeout before the eyes fall back to the default animation (ms)
-DHW_HEARTBEAT_TIMEOUT_MS=5000
; Hardware UART2 pins used to talk to the Raspberry Pi.
; The OLED eyes already claim GPIO 16/17 (UART2 default pins),
; so Serial2 is remapped to these two free pins instead.
-DHW_UART_RX_PIN=27
-DHW_UART_TX_PIN=13
build_unflags =
-std=gnu++11
[env:esp32dev]
platform = espressif32
board = esp32dev
board_build.f_cpu = 240000000L
[env:esp32-s3]
platform = espressif32
board = esp32-s3-devkitc-1
board_build.f_cpu = 240000000L
build_flags =
${env.build_flags}
-DARDUINO_USB_MODE=1
-DARDUINO_USB_CDC_ON_BOOT=1