Add CI and fix compile error#182
Merged
lovyan03 merged 11 commits intom5stack:developfrom Feb 6, 2026
Merged
Conversation
compilation across ESP32/S3/C3/C6/H2/P4 targets with Arduino-ESP32 v2/v3 and ESP-IDF v5.1/v5.3.
…d manager - Remove M5Stack-specific board definitions (m5stack_core, m5stack_core2, m5stack_cores3) from Espressif package since M5GFX uses runtime detection - Simplify matrix to SoC types only (ESP32, ESP32-S3, ESP32-C3, C6, P4, H2) - Add M5Stack official board manager tests (M5Core, M5CoreS3) for compatibility verification with both v2.x and v3.x releases - Make board_manager_url a matrix variable for flexibility Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Use correct board IDs from boards.txt (m5stack_core, m5stack_cores3) instead of display names from package index (M5Core, M5CoreS3). Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…Panel_EPD Synced from LovyanGFX develop (c13b7a5). Adds -fomit-frame-pointer to the optimize attribute of blit_dmabuf() to prevent "a7 cannot be used in asm here" error in ESP-IDF builds. See LovyanGFX#820. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…upport Replace version-based preprocessor detection (LGFX_GPIO_IN_SEL_CFG_REG) with SFINAE type traits for GPIO func_in_sel_cfg/func_out_sel_cfg field access. ESP-IDF renamed the struct fields from func_sel to in_sel/out_sel in different patch versions per release branch (v5.1.7, v5.2.6, v5.3.4, v5.4.2), making version-based detection unreliable. SFINAE detects the actual struct layout at compile time, ensuring correct behavior across all ESP-IDF versions and SoC targets. Apply the same SFINAE approach for I2C bus_busy detection in Bus_I2C.cpp, replacing chip-specific conditionals and i2c_ll dependency with compile- time detection of status_reg vs sr member. Add CONFIG_IDF_TARGET_ESP32H2 to GPIO single-bank access (common.hpp) and I2C register access conditions (common.cpp). Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…upport Replace version-based preprocessor detection (LGFX_GPIO_IN_SEL_CFG_REG) with SFINAE type traits for GPIO func_in_sel_cfg/func_out_sel_cfg field access. ESP-IDF renamed the struct fields from func_sel to in_sel/out_sel in different patch versions per release branch (v5.1.7, v5.2.6, v5.3.4, v5.4.2), making version-based detection unreliable. SFINAE detects the actual struct layout at compile time, ensuring correct behavior across all ESP-IDF versions and SoC targets. Apply the same SFINAE approach for I2C bus_busy detection in Bus_I2C.cpp, replacing chip-specific conditionals with compile-time detection of status_reg vs sr member. Add CONFIG_IDF_TARGET_ESP32H2 to GPIO single-bank access (common.hpp) and I2C register access conditions (common.cpp). Add explicit ESP32-H2 branch in device.hpp to exclude Bus_Parallel8 (requires I2S, not available on H2). Guard soc/i2s_reg.h include with __has_include in common.hpp for H2 compatibility. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
ESP32-H2's spi_reg.h defines SPI register macros (SPI_CMD_REG, SPI_W0_REG, etc.) without parameters using undefined DR_REG_SPI_BASE, while the codebase uses them with a port parameter like SPI_W0_REG(spi_port). Redefine the 7 affected macros as parameterized versions using REG_SPI_BASE(i) to resolve compilation errors. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces comprehensive improvements to the build system and enhances compatibility across various ESP32 chip variants, including the new ESP32-H2. The main changes include the addition of CI workflows for Arduino and ESP-IDF builds, the introduction of a new build test example, and significant refactoring to support multiple ESP32 targets more robustly and maintainably.
Build System Enhancements:
.github/workflows/ArduinoBuild.ymlto automatically build Arduino examples across a wide matrix of ESP32 and M5Stack boards and versions..github/workflows/IDFBuild.ymlto build ESP-IDF-based examples for multiple ESP32 targets and IDF versions.New Example for Build Testing:
examples/Test/build_testdirectory with CMake and source files for both Arduino and ESP-IDF. This includes a comprehensive test sketch (main.cpp) that exercises a wide range ofM5GFXdrawing and display features, as well as relevant CMake configuration and SDK defaults. [1] [2] [3] [4] [5]Platform Compatibility and Refactoring:
-fomit-frame-pointerto the function's optimization flags.