Skip to content

# ESP32-S3 Support + Upstream v10.2.dev Merge#3

Merged
Luca-Timo merged 2 commits into
mainfrom
dev/dev
Mar 2, 2026
Merged

# ESP32-S3 Support + Upstream v10.2.dev Merge#3
Luca-Timo merged 2 commits into
mainfrom
dev/dev

Conversation

@Luca-Timo

Copy link
Copy Markdown
Owner

Summary

This PR adds full ESP32-S3 support to the Battery Emulator and merges the latest upstream changes from v10.2.dev (761 commits ahead). The implementation supports ESP32-S3 DevKit boards with MCP2515 CAN add-on and includes automated build/release workflows.

Changes

Hardware Support

  • ✅ ESP32-S3 DevKit board support (esp32s3box environment)
  • ✅ MCP2515 SPI CAN controller integration
  • ✅ GPIO configuration via USER_SETTINGS_ESP32S3.h
  • ✅ 4MB flash partition support
  • ✅ OTA update capability via web interface

Build System

  • Updated PlatformIO espressif32 platform from 6.12.0 to 6.13.0
  • Added ESP32-S3 DevKit to GitHub Actions release workflow
  • Automated factory and OTA binary generation for releases
  • Fixed unit test compilation to support all platforms

ESP-IDF 5.x API Updates

Fixed ESP32-S3 API compatibility issues discovered during merge:

Watchdog API (Software.cpp):

  • All platforms now use ESP-IDF 5.x config struct API
  • Removed unnecessary conditional compilation

LEDC PWM API (comm_contactorcontrol.cpp, precharge_control.cpp):

  • All platforms now use ledcAttachChannel() (ESP-IDF 5.x)
  • Removed legacy ledcSetup() / ledcAttachPin() conditionals

MQTT Configuration (mqtt.cpp):

  • All platforms now use nested config structure (ESP-IDF 5.x)
  • Fixed mqtt_cfg.broker.address.* and mqtt_cfg.credentials.*

I2C Display (display.cpp):

  • Disabled for ESP32-S3 (requires ESP-IDF 5.x i2c_master API)
  • Stub implementation provided

Unit Tests (hal.h):

  • Wrapped ESP32-specific headers with #ifndef UNIT_TEST
  • Fixed CMake test builds

Testing

Verified Builds

  • esp32s3box - ESP32-S3 DevKit (NEW)
  • lilygo_330 - LilyGo T-CAN485
  • lilygo_2CAN_330 - LilyGo T-2CAN
  • stark_330 - Stark CMR
  • compiler_warning_check - Strict warnings check
  • ✅ Unit tests (CMake)

Hardware Tested

  • ESP32-S3 DevKit with MCP2515 @ 25MHz crystal
  • Tesla Model 3 Long Range battery communication
  • CAN bus with 120Ω termination resistors

Upstream Merge

Merged 761 commits from upstream v10.2.dev including:

  • New battery support (Geely SEA, Volvo SPA updates, etc.)
  • Inverter protocol improvements
  • Bug fixes and stability improvements
  • Enhanced web interface features

Release Automation

GitHub Actions now automatically builds ESP32-S3 binaries on release:

  • BE_<version>_ESP32-S3-DevKit.ota.bin - OTA update file
  • BE_<version>_ESP32-S3-DevKit.factory.bin - Full flash image

Breaking Changes

None - all existing boards remain fully compatible.

Notes

  • ESP32-S3 uses ESP-IDF 5.x APIs (same as ESP32 with pioarduino platform)
  • OTA updates available via http://<device-ip>/update
  • Display support requires future ESP-IDF 5.x update
  • All API conditionals simplified as both ESP32 and ESP32-S3 use same IDF version

Related Issues

  • Fixes compilation with ESP32-S3
  • Adds ESP32-S3 to automated releases
  • Brings fork up to date with upstream v10.2.dev

Luca-Timo and others added 2 commits March 2, 2026 13:51
This adds automated build steps for the ESP32-S3 DevKit (esp32s3box environment) to the release workflow. When a release is published, it will now also build:

- BE_<version>_ESP32-S3-DevKit.ota.bin (for OTA updates via web interface)
- BE_<version>_ESP32-S3-DevKit.factory.bin (for initial flashing)

The ESP32-S3 build uses:
- 4MB flash size
- esp32s3 chip
- Same partition scheme as other environments (min_spiffs.csv)

Users can download the .ota.bin file from GitHub releases and upload it via the web interface at http://<device-ip>/update

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
The hal.h file was including <driver/gpio.h> unconditionally, which
caused unit test compilation to fail since this ESP32-specific header
doesn't exist in the test emulation environment.

Wrapped the include with #ifndef UNIT_TEST to exclude it during tests.
The CMakeLists.txt already defines UNIT_TEST for test builds.

Fixes GitHub Actions unit test failures:
- fatal error: driver/gpio.h: No such file or directory

Verified builds still work:
- esp32s3box: SUCCESS
- lilygo_330: SUCCESS
- compiler_warning_check: SUCCESS

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@Luca-Timo Luca-Timo merged commit 739ab18 into main Mar 2, 2026
16 of 18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant