feat(boards): add ESP32-32E-4 (4" ST7796) board support
This commit is contained in:
54
mise.toml
54
mise.toml
@@ -26,6 +26,22 @@ cp boards/esp32-32e/tft_user_setup.h vendor/esp32-32e/TFT_eSPI/User_Setup.h
|
||||
echo "[OK] TFT_eSPI 2.5.43 vendored + configured"
|
||||
"""
|
||||
|
||||
[tasks.install-libs-32e-4]
|
||||
description = "Vendor TFT_eSPI into vendor/esp32-32e-4 (ST7796 320x480)"
|
||||
run = """
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
if [ ! -d "vendor/esp32-32e-4/TFT_eSPI" ]; then
|
||||
echo "Cloning TFT_eSPI..."
|
||||
git clone --depth 1 --branch V2.5.43 \
|
||||
https://github.com/Bodmer/TFT_eSPI.git \
|
||||
vendor/esp32-32e-4/TFT_eSPI
|
||||
fi
|
||||
echo "Copying board-specific User_Setup.h..."
|
||||
cp boards/esp32-32e-4/tft_user_setup.h vendor/esp32-32e-4/TFT_eSPI/User_Setup.h
|
||||
echo "[OK] TFT_eSPI 2.5.43 vendored + configured for 4 inch"
|
||||
"""
|
||||
|
||||
[tasks.install-libs-s3-43]
|
||||
description = "Vendor LovyanGFX into vendor/esp32-s3-lcd-43"
|
||||
run = """
|
||||
@@ -68,7 +84,7 @@ echo "[OK] LovyanGFX vendored"
|
||||
|
||||
[tasks.install-libs]
|
||||
description = "Install all libraries (shared + vendored)"
|
||||
depends = ["install-libs-shared", "install-libs-32e", "install-libs-s3-43"]
|
||||
depends = ["install-libs-shared", "install-libs-32e", "install-libs-32e-4", "install-libs-s3-43"]
|
||||
|
||||
# ── ESP32-32E ────────────────────────────────────────────
|
||||
|
||||
@@ -77,7 +93,7 @@ description = "Compile ESP32-32E sketch"
|
||||
depends = ["install-libs"]
|
||||
run = """
|
||||
arduino-cli compile \
|
||||
--fqbn "esp32:esp32@2.0.11:esp32:FlashSize=4M,PartitionScheme=default" \
|
||||
--fqbn "esp32:esp32:esp32:FlashSize=4M,PartitionScheme=default" \
|
||||
--libraries ./libraries \
|
||||
--libraries ./vendor/esp32-32e/TFT_eSPI \
|
||||
--build-property "compiler.cpp.extra_flags=-DDEBUG_MODE -DBOARD_HAS_PSRAM" \
|
||||
@@ -100,6 +116,36 @@ run = """
|
||||
arduino-cli monitor --port "${PORT:-/dev/ttyUSB0}" --config baudrate=115200
|
||||
"""
|
||||
|
||||
# ── ESP32-32E-4 inch ─────────────────────────────────────────
|
||||
|
||||
[tasks.compile-32e-4]
|
||||
description = "Compile ESP32-32E-4 inch sketch (ST7796 320x480)"
|
||||
depends = ["install-libs-32e-4"]
|
||||
run = """
|
||||
arduino-cli compile \
|
||||
--fqbn "esp32:esp32:esp32:FlashSize=4M,PartitionScheme=default" \
|
||||
--libraries ./libraries \
|
||||
--libraries ./vendor/esp32-32e-4/TFT_eSPI \
|
||||
--build-property "compiler.cpp.extra_flags=-DDEBUG_MODE -DBOARD_HAS_PSRAM" \
|
||||
--warnings default \
|
||||
./boards/esp32-32e-4
|
||||
"""
|
||||
|
||||
[tasks.upload-32e-4]
|
||||
description = "Upload to ESP32-32E-4\""
|
||||
run = """
|
||||
arduino-cli upload \
|
||||
--fqbn "esp32:esp32:esp32:FlashSize=4M,PartitionScheme=default" \
|
||||
--port "${PORT:-/dev/ttyUSB0}" \
|
||||
./boards/esp32-32e-4
|
||||
"""
|
||||
|
||||
[tasks.monitor-32e-4]
|
||||
description = "Serial monitor for ESP32-32E-4\""
|
||||
run = """
|
||||
arduino-cli monitor --port "${PORT:-/dev/ttyUSB0}" --config baudrate=115200
|
||||
"""
|
||||
|
||||
# ── ESP32-S3-LCD-4.3 ────────────────────────────────────
|
||||
|
||||
[tasks.compile-s3-43]
|
||||
@@ -137,6 +183,7 @@ description = "Remove build artifacts"
|
||||
run = """
|
||||
rm -rf vendor/
|
||||
rm -rf boards/esp32-32e/build
|
||||
rm -rf boards/esp32-32e-4/build
|
||||
rm -rf boards/esp32-s3-lcd-43/build
|
||||
echo "[OK] Build artifacts cleaned"
|
||||
"""
|
||||
@@ -147,6 +194,9 @@ clang-format -i --style=file \
|
||||
boards/esp32-32e/*.cpp \
|
||||
boards/esp32-32e/*.h \
|
||||
boards/esp32-32e/*.ino \
|
||||
boards/esp32-32e-4/*.cpp \
|
||||
boards/esp32-32e-4/*.h \
|
||||
boards/esp32-32e-4/*.ino \
|
||||
boards/esp32-s3-lcd-43/*.cpp \
|
||||
boards/esp32-s3-lcd-43/*.h \
|
||||
boards/esp32-s3-lcd-43/*.ino \
|
||||
|
||||
Reference in New Issue
Block a user