Skip to content

Commit 891e126

Browse files
committed
feat(bsp_selector): Component for selection BSP in menuconfig
1 parent c610947 commit 891e126

File tree

123 files changed

+839
-80
lines changed

Some content is hidden

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

123 files changed

+839
-80
lines changed

.github/PULL_REQUEST_TEMPLATE/pr_template_bsp.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
- [ ] New BSP definitions added to [bsp_ext.py](../examples/bsp_ext.py)
1010
- [ ] BSP was added to [SquareLine](https://github.com/espressif/esp-bsp/tree/master/SquareLine/common)
1111
- [ ] BSP was added to [.pre-commit-config.yaml](.pre-commit-config.yaml) doxybook list
12+
- [ ] BSP was added to BSP Selector [Kconfig](components/bsp_selector/Kconfig) and [idf_component.yml](components/bsp_selector/idf_component.yml)
1213
- [ ] _Optional:_ Component contains unit tests
1314
- [ ] _Optional:_ BSP was added to Runner ([pytest.ini](pytest.ini), [conftest.py](conftest.py), [build-run-applications.yml](.github/workflows/build-run-applications.yml))
1415
- [ ] CI passing

.github/ci/bsp_example_update.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env python3
2-
# SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD
2+
# SPDX-FileCopyrightText: 2025-2026 Espressif Systems (Shanghai) CO LTD
33
# SPDX-License-Identifier: Apache-2.0
44

55
import os
@@ -90,6 +90,12 @@ def main():
9090

9191
manifest = load_yaml_file(example_main_yml)
9292

93+
# Try to remove BSP Selector
94+
try:
95+
del manifest['dependencies']["bsp_selector"]
96+
except KeyError:
97+
print("{}: could not remove bsp_selector".format(str(bsp_path)))
98+
9399
# Remove all BSPs
94100
for dep in list(manifest['dependencies']):
95101
if bsp_short_name(dep) in bsps:

.github/workflows/build-run-applications.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ concurrency:
3434
jobs:
3535
build:
3636
env:
37-
component_manager_ver: "2.2.*"
37+
component_manager_ver: "2.4.*"
3838
idf_build_apps_ver: "2.10.1"
3939
outputs:
4040
ignored_failure: ${{ steps.ignored-failure.outputs.failed }}

.github/workflows/upload_component.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ jobs:
6969
uses: espressif/upload-components-ci-action@v2
7070
with:
7171
components: |
72+
components/bsp_selector
7273
components/bh1750
7374
components/ds18b20
7475
components/es8311

.ignore_build_warnings.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ warning: unknown kconfig symbol 'TOUCH_SUPPRESS_DEPRECATE_WARN' assigned to*
33
warning: ignoring attribute 'section .+' because it conflicts with previous 'section .+
44
warning: #warning "This set of Touch APIs has been deprecated*
55
Warning: The smallest app partition is nearly full*
6+
warning: unknown kconfig symbol*
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
idf_component_register()

components/bsp_selector/Kconfig

Lines changed: 225 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,225 @@
1+
menu "BSP Selector"
2+
3+
# Hidden variables to drive Conditional Dependencies
4+
5+
config ESP_BSP_DEVKIT
6+
int
7+
default 1 if BSP_SELECT_ESP_BSP_DEVKIT
8+
default 0
9+
10+
config ESP_BSP_GENERIC
11+
int
12+
default 1 if BSP_SELECT_ESP_BSP_GENERIC
13+
default 0
14+
15+
config ESP_WROVER_KIT
16+
int
17+
default 1 if BSP_SELECT_ESP_WROVER_KIT
18+
default 0
19+
20+
config ESP32_AZURE_IOT_KIT
21+
int
22+
default 1 if BSP_SELECT_ESP32_AZURE_IOT_KIT
23+
default 0
24+
25+
config ESP32_C3_LCDKIT
26+
int
27+
default 1 if BSP_SELECT_ESP32_C3_LCDKIT
28+
default 0
29+
30+
config ESP32_LYRAT
31+
int
32+
default 1 if BSP_SELECT_ESP32_LYRAT
33+
default 0
34+
35+
config ESP32_P4_EYE
36+
int
37+
default 1 if BSP_SELECT_ESP32_P4_EYE
38+
default 0
39+
40+
config ESP32_P4_FUNCTION_EV_BOARD
41+
int
42+
default 1 if BSP_SELECT_ESP32_P4_FUNCTION_EV_BOARD
43+
default 0
44+
45+
config ESP32_S2_KALUGA_KIT
46+
int
47+
default 1 if BSP_SELECT_ESP32_S2_KALUGA_KIT
48+
default 0
49+
50+
config ESP32_S3_EYE
51+
int
52+
default 1 if BSP_SELECT_ESP32_S3_EYE
53+
default 0
54+
55+
config ESP32_S3_KORVO_1
56+
int
57+
default 1 if BSP_SELECT_ESP32_S3_KORVO_1
58+
default 0
59+
60+
config ESP32_S3_KORVO_2
61+
int
62+
default 1 if BSP_SELECT_ESP32_S3_KORVO_2
63+
default 0
64+
65+
config ESP32_S3_LCD_EV_BOARD
66+
int
67+
default 1 if BSP_SELECT_ESP32_S3_LCD_EV_BOARD
68+
default 0
69+
70+
config ESP32_S3_USB_OTG
71+
int
72+
default 1 if BSP_SELECT_ESP32_S3_USB_OTG
73+
default 0
74+
75+
config ESP_BOX
76+
int
77+
default 1 if BSP_SELECT_ESP_BOX
78+
default 0
79+
80+
config ESP_BOX_LITE
81+
int
82+
default 1 if BSP_SELECT_ESP_BOX_LITE
83+
default 0
84+
85+
config ESP_BOX_3
86+
int
87+
default 1 if BSP_SELECT_ESP_BOX_3
88+
default 0
89+
90+
config M5_ATOM_S3
91+
int
92+
default 1 if BSP_SELECT_M5_ATOM_S3
93+
default 0
94+
95+
config M5DIAL
96+
int
97+
default 1 if BSP_SELECT_M5DIAL
98+
default 0
99+
100+
config M5STACK_CORE
101+
int
102+
default 1 if BSP_SELECT_M5STACK_CORE
103+
default 0
104+
105+
config M5STACK_CORE_2
106+
int
107+
default 1 if BSP_SELECT_M5STACK_CORE_2
108+
default 0
109+
110+
config M5STACK_CORE_S3
111+
int
112+
default 1 if BSP_SELECT_M5STACK_CORE_S3
113+
default 0
114+
115+
config M5STACK_TAB5
116+
int
117+
default 1 if BSP_SELECT_M5STACK_TAB5
118+
default 0
119+
120+
121+
choice BSP_SELECT
122+
prompt "Select BSP"
123+
default BSP_SELECT_ESP_WROVER_KIT if IDF_TARGET_ESP32
124+
default BSP_SELECT_ESP_BOX_3 if IDF_TARGET_ESP32S3
125+
default BSP_SELECT_ESP32_P4_FUNCTION_EV_BOARD if IDF_TARGET_ESP32P4
126+
default BSP_SELECT_ESP32_C3_LCDKIT if IDF_TARGET_ESP32C3
127+
help
128+
Select which BSP will be used in project.
129+
130+
config BSP_SELECT_NONE
131+
bool "ESP_BSP_NONE"
132+
133+
config BSP_SELECT_ESP_BSP_DEVKIT
134+
bool "ESP_BSP_DEVKIT"
135+
136+
config BSP_SELECT_ESP_BSP_GENERIC
137+
bool "ESP_BSP_GENERIC"
138+
139+
config BSP_SELECT_ESP_WROVER_KIT
140+
depends on IDF_TARGET_ESP32
141+
bool "ESP_WROVER_KIT"
142+
143+
config BSP_SELECT_ESP32_AZURE_IOT_KIT
144+
depends on IDF_TARGET_ESP32
145+
bool "ESP32_AZURE_IOT_KIT"
146+
147+
config BSP_SELECT_ESP32_C3_LCDKIT
148+
depends on IDF_TARGET_ESP32C3
149+
bool "ESP32_C3_LCDKIT"
150+
151+
config BSP_SELECT_ESP32_LYRAT
152+
depends on IDF_TARGET_ESP32
153+
bool "ESP32_LYRAT"
154+
155+
config BSP_SELECT_ESP32_P4_EYE
156+
depends on IDF_TARGET_ESP32P4
157+
bool "ESP32_P4_EYE"
158+
159+
config BSP_SELECT_ESP32_P4_FUNCTION_EV_BOARD
160+
depends on IDF_TARGET_ESP32P4
161+
bool "ESP32_P4_FUNCTION_EV_BOARD"
162+
163+
config BSP_SELECT_ESP32_S2_KALUGA_KIT
164+
depends on IDF_TARGET_ESP32S2
165+
bool "ESP32_S2_KALUGA_KIT"
166+
167+
config BSP_SELECT_ESP32_S3_EYE
168+
depends on IDF_TARGET_ESP32S3
169+
bool "ESP32_S3_EYE"
170+
171+
config BSP_SELECT_ESP32_S3_KORVO_1
172+
depends on IDF_TARGET_ESP32S3
173+
bool "ESP32_S3_KORVO_1"
174+
175+
config BSP_SELECT_ESP32_S3_KORVO_2
176+
depends on IDF_TARGET_ESP32S3
177+
bool "ESP32_S3_KORVO_2"
178+
179+
config BSP_SELECT_ESP32_S3_LCD_EV_BOARD
180+
depends on IDF_TARGET_ESP32S3
181+
bool "ESP32_S3_LCD_EV_BOARD"
182+
183+
config BSP_SELECT_ESP32_S3_USB_OTG
184+
depends on IDF_TARGET_ESP32S3
185+
bool "ESP32_S3_USB_OTG"
186+
187+
config BSP_SELECT_ESP_BOX
188+
depends on IDF_TARGET_ESP32S3
189+
bool "ESP_BOX"
190+
191+
config BSP_SELECT_ESP_BOX_LITE
192+
depends on IDF_TARGET_ESP32S3
193+
bool "ESP_BOX_LITE"
194+
195+
config BSP_SELECT_ESP_BOX_3
196+
depends on IDF_TARGET_ESP32S3
197+
bool "ESP_BOX_3"
198+
199+
config BSP_SELECT_M5_ATOM_S3
200+
depends on IDF_TARGET_ESP32S3
201+
bool "M5_ATOM_S3"
202+
203+
config BSP_SELECT_M5DIAL
204+
depends on IDF_TARGET_ESP32S3
205+
bool "M5DIAL"
206+
207+
config BSP_SELECT_M5STACK_CORE
208+
depends on IDF_TARGET_ESP32
209+
bool "M5STACK_CORE"
210+
211+
config BSP_SELECT_M5STACK_CORE_2
212+
depends on IDF_TARGET_ESP32
213+
bool "M5STACK_CORE_2"
214+
215+
config BSP_SELECT_M5STACK_CORE_S3
216+
depends on IDF_TARGET_ESP32S3
217+
bool "M5STACK_CORE_S3"
218+
219+
config BSP_SELECT_M5STACK_TAB5
220+
depends on IDF_TARGET_ESP32P4
221+
bool "M5STACK_TAB5"
222+
223+
endchoice
224+
225+
endmenu

components/bsp_selector/README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# BSP Selector
2+
3+
This component alows to select BSP in project from `menuconfig`. It shows only available BSPs ber selected target.
4+
5+
## Usage
6+
7+
Add this component into your project `idf_component.yml` file like this:
8+
9+
```
10+
...
11+
dependencies:
12+
bsp_selector: "^1.0"
13+
14+
```

0 commit comments

Comments
 (0)