Commit e295322
committed
ESP32: Modernize Build System Infrastructure (Step 1)
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 #307091 parent 46ae785 commit e295322
File tree
3 files changed
+433
-664
lines changed- libraries/AP_HAL_ESP32
- hwdef/scripts
3 files changed
+433
-664
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
0 commit comments