Skip to content

Commit 96925ea

Browse files
committed
feat(esp_board_manager): Add esp_board_manager component
1 parent 7ef05aa commit 96925ea

File tree

190 files changed

+18702
-1
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

190 files changed

+18702
-1
lines changed

.github/workflows/upload_component.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ jobs:
2424
esp_audio_simple_player:./packages/esp_audio_simple_player
2525
esp_capture: ./packages/esp_capture
2626
gmf_app_utils: ./packages/gmf_app_utils
27+
esp_board_manager: ./packages/esp_board_manager
2728
gmf_examples: ./gmf_examples
2829
namespace: "espressif"
2930
api_token: ${{ secrets.IDF_COMPONENT_API_TOKEN }}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ GPATH
2828
**/managed_components
2929
**/dependencies.lock
3030
**/dist
31+
**/gen_bmgr_codes/
3132

3233
# Doc build artifacts
3334
gmf_core/docs/*/_build/

.gitlab/ci/.build_test_rules.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,12 @@
88
disable:
99
- if: TARGET_DIR_TYPE == "example"
1010

11+
.disable_test_apps_esp32: &disable_test_apps_esp32
12+
disable:
13+
- if: TARGET_DIR_TYPE == "test_apps" AND IDF_TARGET == "esp32"
14+
1115
gmf_core/test_apps:
1216
<<: *disable_example
17+
18+
packages/esp_board_manager:
19+
<<: *disable_test_apps_esp32

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ Advanced components are encapsulation modules in ESP-GMF that target specific ap
4444
| [gmf_loader](./packages/gmf_loader) | Set up the given GMF pool using the <br> configuration selected via `Kconfig` | - `gmf_core`<br>- `gmf_io`<br>- `gmf_audio`<br>- `gmf_misc`<br>- `gmf_video`<br>- `gmf_ai_audio`<br>- `esp_codec_dev`<br>- `esp_audio_codec`<br>- `esp_video_codec` |
4545
| [gmf_app_utils](./packages/gmf_app_utils) | Common peripheral configuration, unit <br>testing tools Memory leak detection tools | - `gmf_core`<br>- `protocol_examples_common`<br>- `codec_board`|
4646
| [esp_capture](./packages/esp_capture) | High-level multimedia capture module | - `gmf_core`<br>- `gmf-audio`<br>- `gmf-video`<br>- `esp_muxer`<br>- `esp_codec_dev`<br>- `esp-sr`<br>- `esp_video`<br>- `esp32-camera`|
47+
| [esp_board_manager](./packages/esp_board_manager) | Intelligent, automated board configuration and management utilities with YAML-based setup | Dependencies vary based on selected board |
4748

4849

4950
# ESP-GMF Usage Guide

README_CN.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ ESP-GMF 各个模块以组件的形式存在,组件又按功能分为**原子
4444
| [gmf_loader](./packages/gmf_loader) | 使用 `Kconfig` 选择的配置<br>设置给定的 GMF Pool | - `gmf_core`<br>- `gmf_io`<br>- `gmf_audio`<br>- `gmf_misc`<br>- `gmf_video`<br>- `gmf_ai_audio`<br>- `esp_codec_dev`<br>- `esp_audio_codec`<br>- `esp_video_codec` |
4545
| [gmf_app_utils](./packages/gmf_app_utils) | 常用外设配置,单元测试工具<br>内存泄漏检测工具 | - `gmf_core`<br>- `protocol_examples_common`<br>- `codec_board` |
4646
| [esp_capture](./packages/esp_capture) | 易用的音视频采集器 | - `gmf_core`<br>- `gmf-audio`<br>- `gmf-video`<br>- `esp_muxer`<br>- `esp_codec_dev`<br>- `esp-sr`<br>- `esp_video`<br>- `esp32-camera`|
47+
| [esp_board_manager](./packages/esp_board_manager) | 智能、自动化的板子配置和管理工具,支持基于 YAML 的设置 | 根据选择的板子变化依赖 |
4748

4849
# ESP-GMF 使用说明
4950

@@ -53,4 +54,4 @@ GMF-Core API 的简单示例代码请参考 [test_apps](./gmf_core/test_apps/mai
5354

5455
- **ESP-GMF 和 ESP-ADF 有什么区别?**
5556

56-
ESP-ADF 是一个包含很多模块的功能性仓库,比如 `audio_pipeline``services``peripherals``audio boards` 等,它常应用与比较复杂的项目中。ESP-GMF 是将 `audio_pipeline` 独立出来并进行功能扩展,使其支持音频、视频、图像等流式数据的应用场景。ESP-GMF 按功能分为不同的组件,灵活性优于 ESP-ADF 的 `audio_pipeline`,例如用于简单流式数据的处理,从 SD 卡/flash 播放一个音频,以及多个组件结合使用提供较复杂的功能模块(如音频播放器 `esp_audio_simple_player `)。ESP-ADF 的后期版本会使用 ESP-GMF 替代 `audio_pipeline` 模块。
57+
ESP-ADF 是一个包含很多模块的功能性仓库,比如 `audio_pipeline``services``peripherals``audio boards` 等,它常应用于比较复杂的项目中。ESP-GMF 是将 `audio_pipeline` 独立出来并进行功能扩展,使其支持音频、视频、图像等流式数据的应用场景。ESP-GMF 按功能分为不同的组件,灵活性优于 ESP-ADF 的 `audio_pipeline`,例如用于简单流式数据的处理,从 SD 卡/flash 播放一个音频,以及多个组件结合使用提供较复杂的功能模块(如音频播放器 `esp_audio_simple_player `)。ESP-ADF 的后期版本会使用 ESP-GMF 替代 `audio_pipeline` 模块。
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# Changelog
2+
3+
## v0.3.0 (Initial Release)
4+
5+
### Core Features
6+
- **ESP Board Manager**: Initial release of comprehensive board configuration management system
7+
- **YAML-based Configuration**: Support for `board_peripherals.yaml` and `board_devices.yaml` configuration files
8+
- **Automatic Code Generation**: Modular code generation system with 8-step streamlined process
9+
- **Multi-path Board Scanning**: Support for Default, Customer, and Components board paths
10+
- **Automatic Dependency Management**: Smart component dependency detection and `idf_component.yml` updates
11+
- **SDK Configuration Automation**: Automatic ESP-IDF feature enabling based on board requirements
12+
13+
### Supported Boards
14+
- **Echoear Core Board V1.0**: Full audio, LCD, touch, and SD card support
15+
- **ESP-BOX-3**: ESP32-S3 development board with I2C, I2S, SPI, LEDC, and GPIO support
16+
- **Dual Eyes Board V1.0**: Dual LCD display with touch support
17+
- **ESP32-S3 Korvo2 V3**: Full audio and SD card support
18+
- **ESP32-S3 Korvo2L**: Full audio and SD card support
19+
- **ESP32 Lyrat Mini V1.1**: YAML configurations support
20+
- **ESP32-C5 Spot**: YAML configurations support
21+
22+
### Peripheral Support
23+
- **I2C**: Full support with type safety
24+
- **I2S**: Complete audio interface support
25+
- **SPI**: Full peripheral and device support
26+
- **LEDC**: PWM and LED control support
27+
- **GPIO**: GPIO support
28+
29+
### Device Support
30+
- **Audio Codecs**: ES8311, ES7210, and other audio codec devices
31+
- **SD Cards**: FATFS filesystem support
32+
- **LCD Displays**: SPI LCD with LVGL integration
33+
- **Touch Input**: I2C touch controller support
34+
- **SPIFFS Filesystem**: Embedded filesystem support
35+
- **LEDC Control**: LED brightness and PWM control
36+
- **GPIO Control**: GPIO output control
37+
38+
### APP Interfaces
39+
- **Board Manager API**: `esp_board_manager_init()`, `esp_board_manager_deinit()`, `esp_board_manager_print()`
40+
- **Peripheral API**: `esp_board_manager_get_periph_config()`, `esp_board_manager_get_periph_handle()`
41+
- **Device API**: `esp_board_manager_get_device_config()`, `esp_board_manager_get_device_handle()`
42+
- **Error Handling**: Comprehensive error codes and macros (`ESP_BOARD_RETURN_ON_ERROR`)
43+
44+
### Documentation & Testing
45+
- **Comprehensive Documentation**: README, API documentation, and configuration guides
46+
- **Test Applications**: Complete test suite for all peripherals and devices
47+
- **Configuration Rules**: Detailed YAML configuration rules and best practices
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Include peripheral and device sources functions
2+
include(${CMAKE_CURRENT_LIST_DIR}/peripherals/CMakeLists.txt)
3+
include(${CMAKE_CURRENT_LIST_DIR}/devices/CMakeLists.txt)
4+
5+
# Get peripheral sources
6+
get_peripheral_sources(PERIPH_SRCS PERIPH_INCLUDES)
7+
8+
# Get device sources
9+
get_device_sources(DEVICE_SRCS DEVICE_INCLUDES)
10+
11+
set(BOARD_SETUP_SRCS
12+
)
13+
14+
idf_component_register(
15+
SRCS
16+
"src/esp_board_manager.c"
17+
"src/esp_board_periph.c"
18+
"src/esp_board_device.c"
19+
"src/esp_board_manager_err.c"
20+
${PERIPH_SRCS} # Add peripheral sources
21+
${DEVICE_SRCS} # Add device sources
22+
${BOARD_SETUP_SRCS} # Add board-specific sources
23+
INCLUDE_DIRS
24+
"."
25+
"include"
26+
${PERIPH_INCLUDES} # Add peripheral includes
27+
${DEVICE_INCLUDES} # Add device includes
28+
REQUIRES
29+
driver
30+
esp_common
31+
fatfs
32+
esp_lcd
33+
spiffs
34+
LDFRAGMENTS
35+
)
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
menu "ESP Board Manager Configuration"
2+
3+
menu "Board Manager Setting"
4+
config ESP_BOARD_MANAGER_AUTO_CONFIG_DEVICE_AND_PERIPHERAL
5+
bool "Enable automatic configure device and peripheral in sdkconfig"
6+
default y
7+
help
8+
When enabled, the board manager will automatically configure corresponding
9+
device and peripheral types in user's sdkconfig based on detected
10+
device and peripheral information from YAML configuration files.
11+
endmenu
12+
13+
orsource "./gen_codes/Kconfig.in"
14+
15+
endmenu

packages/esp_board_manager/LICENSE

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
Espressif Modified MIT License
2+
3+
Copyright (c) 2025 Espressif Systems (Shanghai) CO., LTD
4+
5+
Permission is hereby granted for use EXCLUSIVELY with Espressif Systems products.
6+
This includes the right to use, copy, modify, merge, publish, distribute, and sublicense
7+
the Software, subject to the following conditions:
8+
9+
1. This Software MUST BE USED IN CONJUNCTION WITH ESPRESSIF SYSTEMS PRODUCTS.
10+
2. The above copyright notice and this permission notice shall be included in all copies
11+
or substantial portions of the Software.
12+
3. Redistribution of the Software in source or binary form FOR USE WITH NON-ESPRESSIF PRODUCTS
13+
is strictly prohibited.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
16+
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
17+
PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
18+
FOR ANY CLAIM, DAMAGES, OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
19+
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20+
DEALINGS IN THE SOFTWARE.
21+
22+
SPDX-License-Identifier: LicenseRef-Espressif-Modified-MIT

0 commit comments

Comments
 (0)