fix: use compiler.cpp.extra_flags to avoid clobbering platform defines

build.extra_flags replaces the esp32 core's platform-level flags,
which include CONFIG_IDF_TARGET_ESP32S3 — required by Arduino_GFX
for RGB panel support. compiler.cpp.extra_flags appends safely.
This commit is contained in:
2026-02-16 15:23:03 -08:00
parent 02d13ae30b
commit 7a9a4bd56f

View File

@@ -1,15 +1,10 @@
[tools]
arduino-cli = "latest"
lazygit = "latest"
python = "latest"
ruby = "latest"
# ═══════════════════════════════════════════════════════════════════
# Default target — override with: BOARD_TARGET=waveshare_s3 mise run compile
# ═══════════════════════════════════════════════════════════════════
[env]
BOARD_TARGET = "e32r35t"
[tasks.install-core]
run = "arduino-cli core update-index && arduino-cli core install esp32:esp32"
@@ -62,7 +57,7 @@ echo "║ FQBN: $FQBN"
echo " Flags: $BUILD_FLAGS"
echo ""
arduino-cli compile --fqbn "$FQBN" \
--build-property "build.extra_flags=$BUILD_FLAGS" .
--build-property "compiler.cpp.extra_flags=$BUILD_FLAGS" .
"""
[tasks.upload]
@@ -105,9 +100,9 @@ case "${BOARD_TARGET:-e32r35t}" in
esac
PORT=$(arduino-cli board list | grep -iE "$PORT_PATTERN" | head -1 | awk '{print $1}')
if [ -z "$PORT" ]; then
echo "No matching port for pattern: $PORT_PATTERN"
arduino-cli board list
exit 1
echo "No matching port for pattern: $PORT_PATTERN"
arduino-cli board list
exit 1
fi
arduino-cli monitor -p "$PORT" -c baudrate=115200
"""