ESP32: Modernize Build System Infrastructure (Step 1)#32245
Draft
Bwooce wants to merge 1 commit intoArduPilot:masterfrom
Draft
ESP32: Modernize Build System Infrastructure (Step 1)#32245Bwooce wants to merge 1 commit intoArduPilot:masterfrom
Bwooce wants to merge 1 commit intoArduPilot:masterfrom
Conversation
e295322 to
d30dfca
Compare
This PR introduces the core infrastructure for a data-driven build system for ESP32, aligning it further with the standard ArduPilot hwdef.dat approach while maintaining strict compatibility with existing board syntax. Key Infrastructure Changes: - Generalized esp32_hwdef.py: Supports multiple chip variants (ESP32, S2, S3, C3, C6, P4) through a data-driven capability database. - Auto-detection: The advanced engine is automatically activated by the presence of the 'MCU' directive in hwdef.dat. - Backward Compatibility: Full support for current master 'ESP32_...' syntax ensures zero breakage for existing boards. - Dynamic sdkconfig: Added support for generating board-specific settings (FLASH_SIZE_MB, PSRAM_SIZE) into a generated 'sdkconfig.board' file, reducing reliance on shared templates. - Partition Table Support: Automated copying of custom partition tables from board directories. - RISC-V Support: Integrated toolchain selection logic for ESP32-C3, C6, and P4 variants in boards.py. - Feature Flags: Introduced C++ capability defines (e.g., HAL_ESP32_HAS_MCPWM) triggered by the hardware database. - Documentation: Added MIGRATION.md detailing the 'MCU' upgrade path. Relates to ArduPilot#30709
d30dfca to
7854789
Compare
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 PR introduces the core infrastructure for a data-driven build system for ESP32, aligning it further with the standard ArduPilot hwdef.dat approach while maintaining strict compatibility with existing board syntax.
Key Changes
esp32_hwdef.pyto support multiple chip variants (ESP32, S2, S3, C3, C6, P4) through a data-driven capability database.MCUdirective to ahwdef.dat.FLASH_SIZE_MB,PSRAM_SIZE) into a generatedsdkconfig.boardfile.ESP32_SERIAL,ESP32_RCOUT, etc.) are fully supported and validated by the new engine.boards.py.HAL_ESP32_HAS_MCPWM) to replace target-specific ifdefs.MIGRATION.mddetailing the one-stepMCUupgrade path.Staging Strategy
This is Step 1 of a multi-stage refactor:
hwdef.datengine by adding theMCUdirective and moving board-specific settings from shared templates to board files.Relates to #30709