forked from espressif/esp-bsp
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request espressif#142 from espressif/examples/mutli-bsp
Build examples for multiple BSPs
- Loading branch information
Showing
47 changed files
with
455 additions
and
51 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Checklist for new Board Support package or Component | ||
|
||
- [ ] Component contains License | ||
- [ ] Component contains README.md | ||
- [ ] Project [README.md](../README.md) updated | ||
- [ ] Component contains idf_component.yml file with `url` field defined | ||
- [ ] Component was added to CI [upload job](https://github.com/espressif/esp-bsp/blob/master/.github/workflows/upload_component.yml#L17) | ||
- [ ] New files were added to CI build job | ||
- [ ] New BSP definitions added to [bsp_ext.py](../examples/bsp_ext.py) | ||
- [ ] _Optional:_ Component contains unit tests | ||
- [ ] CI passing | ||
|
||
# Change description | ||
_Please describe your change here_ |
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
build | ||
build* | ||
sdkconfig | ||
sdkconfig.old | ||
managed_components | ||
|
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
import os | ||
from re import match, compile | ||
from pathlib import Path | ||
from click.core import Context | ||
from typing import List | ||
from idf_py_actions.tools import PropertyDict, red_print | ||
|
||
|
||
def action_extensions(base_actions, project_path=os.getcwd()): | ||
""" Describes extension for Board Support Packages. """ | ||
|
||
try: | ||
import ruamel.yaml | ||
except ImportError: | ||
red_print('ruamel.yaml package is not installed. No BSP extension is added!') | ||
return {} | ||
|
||
bsp_sdkconfig_regex = compile('^SDKCONFIG_DEFAULTS=.*sdkconfig\.bsp\.') | ||
|
||
def global_callback(ctx: Context, global_args: PropertyDict, tasks: List) -> None: | ||
# In case the user has defined his own BSP configuration, run set-bsp action before anything else | ||
for entry in global_args['define_cache_entry']: | ||
if match(bsp_sdkconfig_regex, entry): | ||
tasks.insert(0, ctx.invoke(ctx.command.get_command(ctx, 'set-bsp'))) | ||
return | ||
|
||
def bsp_short_name(bsp): | ||
return bsp.split('/')[-1] | ||
|
||
def set_bsp_callback(action: str, ctx: Context, args: PropertyDict, **kwargs: str) -> None: | ||
# Find configuration name | ||
bsp = '' | ||
for entry in args['define_cache_entry']: | ||
if match(bsp_sdkconfig_regex, entry): | ||
bsp = entry.split('.')[-1] | ||
break | ||
|
||
# List of supported BSPs | ||
bsps = { | ||
'esp_wrover_kit', | ||
'esp32_azure_iot_kit', | ||
'esp32_s2_kaluga_kit', | ||
'esp32_s3_eye', | ||
'esp32_s3_lcd_ev_board', | ||
'esp32_s3_usb_otg', | ||
'esp-box', | ||
'esp32_s3_korvo_2', | ||
} | ||
|
||
if bsp == '': return | ||
if bsp not in bsps: | ||
print("Invalid BSP configuration " + bsp) | ||
return | ||
|
||
print('Setting project for BSP: ' + bsp) | ||
manifest_path = Path(args['project_dir']) / 'main' / 'idf_component.yml' | ||
yaml = ruamel.yaml.YAML() | ||
manifest = yaml.load(manifest_path) | ||
|
||
# Remove all BSPs | ||
for dep in list(manifest['dependencies']): | ||
if bsp_short_name(dep) in bsps: | ||
del manifest['dependencies'][dep] | ||
|
||
# Add the one we need | ||
manifest['dependencies'].insert(0, bsp, {'version': '*', 'override_path': ('../../../' + bsp_short_name(bsp))}) | ||
yaml.dump(manifest, manifest_path) | ||
|
||
extensions = { | ||
'global_action_callbacks': [global_callback], | ||
'actions': { | ||
'set-bsp': { | ||
'callback': set_bsp_callback, | ||
'help': 'Utility to set Board Support Package for a project.', | ||
'hidden': True, | ||
'options': [], | ||
'order_dependencies': [], | ||
'arguments': [], | ||
}, | ||
}, | ||
} | ||
|
||
return extensions |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# This file was generated using idf.py save-defconfig. It can be edited manually. | ||
# Espressif IoT Development Framework (ESP-IDF) Project Minimal Configuration | ||
# | ||
CONFIG_IDF_TARGET="esp32s3" | ||
CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y | ||
CONFIG_ESP_DEFAULT_CPU_FREQ_240=y | ||
CONFIG_LV_COLOR_16_SWAP=y | ||
CONFIG_LV_MEM_CUSTOM=y | ||
CONFIG_LV_MEMCPY_MEMSET_STD=y | ||
CONFIG_LV_USE_PERF_MONITOR=y | ||
CONFIG_LV_SPRINTF_CUSTOM=y | ||
# CONFIG_LV_BUILD_EXAMPLES is not set |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# This file was generated using idf.py save-defconfig. It can be edited manually. | ||
# Espressif IoT Development Framework (ESP-IDF) Project Minimal Configuration | ||
# | ||
CONFIG_IDF_TARGET="esp32s2" | ||
CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y | ||
CONFIG_ESP_DEFAULT_CPU_FREQ_240=y | ||
CONFIG_LV_COLOR_16_SWAP=y | ||
CONFIG_LV_MEM_CUSTOM=y | ||
CONFIG_LV_MEMCPY_MEMSET_STD=y | ||
CONFIG_LV_USE_PERF_MONITOR=y | ||
CONFIG_LV_SPRINTF_CUSTOM=y | ||
# CONFIG_LV_BUILD_EXAMPLES is not set |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# This file was generated using idf.py save-defconfig. It can be edited manually. | ||
# Espressif IoT Development Framework (ESP-IDF) Project Minimal Configuration | ||
# | ||
CONFIG_IDF_TARGET="esp32s3" | ||
CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y | ||
CONFIG_ESP_DEFAULT_CPU_FREQ_240=y | ||
CONFIG_LV_COLOR_16_SWAP=y | ||
CONFIG_LV_MEM_CUSTOM=y | ||
CONFIG_LV_MEMCPY_MEMSET_STD=y | ||
CONFIG_LV_USE_PERF_MONITOR=y | ||
CONFIG_LV_SPRINTF_CUSTOM=y | ||
# CONFIG_LV_BUILD_EXAMPLES is not set |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# This file was generated using idf.py save-defconfig. It can be edited manually. | ||
# Espressif IoT Development Framework (ESP-IDF) Project Minimal Configuration | ||
# | ||
CONFIG_IDF_TARGET="esp32s3" | ||
CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y | ||
CONFIG_ESP_DEFAULT_CPU_FREQ_240=y | ||
CONFIG_LV_COLOR_16_SWAP=y | ||
CONFIG_LV_MEM_CUSTOM=y | ||
CONFIG_LV_MEMCPY_MEMSET_STD=y | ||
CONFIG_LV_USE_PERF_MONITOR=y | ||
CONFIG_LV_SPRINTF_CUSTOM=y | ||
# CONFIG_LV_BUILD_EXAMPLES is not set |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# This file was generated using idf.py save-defconfig. It can be edited manually. | ||
# Espressif IoT Development Framework (ESP-IDF) Project Minimal Configuration | ||
# | ||
CONFIG_IDF_TARGET="esp32s3" | ||
CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y | ||
CONFIG_ESP_DEFAULT_CPU_FREQ_240=y | ||
CONFIG_LV_COLOR_16_SWAP=y | ||
CONFIG_LV_MEM_CUSTOM=y | ||
CONFIG_LV_MEMCPY_MEMSET_STD=y | ||
CONFIG_LV_USE_PERF_MONITOR=y | ||
CONFIG_LV_SPRINTF_CUSTOM=y | ||
# CONFIG_LV_BUILD_EXAMPLES is not set |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# This file was generated using idf.py save-defconfig. It can be edited manually. | ||
# Espressif IoT Development Framework (ESP-IDF) Project Minimal Configuration | ||
# | ||
CONFIG_IDF_TARGET="esp32s3" | ||
CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y | ||
CONFIG_ESP_DEFAULT_CPU_FREQ_240=y | ||
CONFIG_LV_COLOR_16_SWAP=y | ||
CONFIG_LV_MEM_CUSTOM=y | ||
CONFIG_LV_MEMCPY_MEMSET_STD=y | ||
CONFIG_LV_USE_PERF_MONITOR=y | ||
CONFIG_LV_SPRINTF_CUSTOM=y | ||
# CONFIG_LV_BUILD_EXAMPLES is not set |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# This file was generated using idf.py save-defconfig. It can be edited manually. | ||
# Espressif IoT Development Framework (ESP-IDF) Project Minimal Configuration | ||
# | ||
CONFIG_IDF_TARGET="esp32" | ||
CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y | ||
CONFIG_ESP_DEFAULT_CPU_FREQ_240=y | ||
CONFIG_LV_COLOR_16_SWAP=y | ||
CONFIG_LV_MEM_CUSTOM=y | ||
CONFIG_LV_MEMCPY_MEMSET_STD=y | ||
CONFIG_LV_USE_PERF_MONITOR=y | ||
CONFIG_LV_SPRINTF_CUSTOM=y | ||
# CONFIG_LV_BUILD_EXAMPLES is not set |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
idf_component_register(SRCS "bsp_espbox_disp_example.c" "app_disp_fs.c" | ||
INCLUDE_DIRS "." | ||
REQUIRES "spiffs" "vfs" "es8311" "esp_jpeg") | ||
REQUIRES "spiffs" "vfs") |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# This file was generated using idf.py save-defconfig. It can be edited manually. | ||
# Espressif IoT Development Framework (ESP-IDF) Project Minimal Configuration | ||
# | ||
CONFIG_IDF_TARGET="esp32s3" | ||
CONFIG_ESPTOOLPY_FLASHMODE_QIO=y | ||
CONFIG_ESPTOOLPY_FLASHSIZE_16MB=y | ||
CONFIG_PARTITION_TABLE_CUSTOM=y | ||
CONFIG_SPIRAM=y | ||
CONFIG_SPIRAM_MODE_OCT=y | ||
CONFIG_SPIRAM_SPEED_80M=y | ||
CONFIG_ESP_DEFAULT_CPU_FREQ_MHZ_240=y | ||
CONFIG_SPIFFS_PAGE_SIZE=1024 | ||
CONFIG_LV_COLOR_16_SWAP=y | ||
CONFIG_LV_MEM_CUSTOM=y | ||
CONFIG_LV_MEMCPY_MEMSET_STD=y | ||
CONFIG_LV_USE_PERF_MONITOR=y | ||
CONFIG_LV_SPRINTF_CUSTOM=y | ||
# CONFIG_LV_BUILD_EXAMPLES is not set |
15 changes: 15 additions & 0 deletions
15
examples/display_audio_photo/sdkconfig.bsp.esp32_s3_korvo_2
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# This file was generated using idf.py save-defconfig. It can be edited manually. | ||
# Espressif IoT Development Framework (ESP-IDF) Project Minimal Configuration | ||
# | ||
CONFIG_IDF_TARGET="esp32s3" | ||
CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y | ||
CONFIG_ESP_DEFAULT_CPU_FREQ_240=y | ||
CONFIG_LV_COLOR_16_SWAP=y | ||
CONFIG_LV_MEM_CUSTOM=y | ||
CONFIG_LV_MEMCPY_MEMSET_STD=y | ||
CONFIG_LV_USE_PERF_MONITOR=y | ||
CONFIG_LV_SPRINTF_CUSTOM=y | ||
CONFIG_PARTITION_TABLE_CUSTOM=y | ||
CONFIG_SPIRAM=y | ||
CONFIG_SPIFFS_PAGE_SIZE=1024 | ||
# CONFIG_LV_BUILD_EXAMPLES is not set |
15 changes: 15 additions & 0 deletions
15
examples/display_audio_photo/sdkconfig.bsp.esp32_s3_lcd_ev_board
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# This file was generated using idf.py save-defconfig. It can be edited manually. | ||
# Espressif IoT Development Framework (ESP-IDF) Project Minimal Configuration | ||
# | ||
CONFIG_IDF_TARGET="esp32s3" | ||
CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y | ||
CONFIG_ESP_DEFAULT_CPU_FREQ_240=y | ||
CONFIG_LV_COLOR_16_SWAP=y | ||
CONFIG_LV_MEM_CUSTOM=y | ||
CONFIG_LV_MEMCPY_MEMSET_STD=y | ||
CONFIG_LV_USE_PERF_MONITOR=y | ||
CONFIG_LV_SPRINTF_CUSTOM=y | ||
CONFIG_PARTITION_TABLE_CUSTOM=y | ||
CONFIG_SPIRAM=y | ||
CONFIG_SPIFFS_PAGE_SIZE=1024 | ||
# CONFIG_LV_BUILD_EXAMPLES is not set |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# This file was generated using idf.py save-defconfig. It can be edited manually. | ||
# Espressif IoT Development Framework (ESP-IDF) Project Minimal Configuration | ||
# | ||
CONFIG_IDF_TARGET="esp32s2" | ||
CONFIG_ESPTOOLPY_FLASHMODE_QIO=y | ||
CONFIG_SPIRAM=y | ||
CONFIG_SPIRAM_SPEED_80M=y | ||
CONFIG_SPIRAM_TRY_ALLOCATE_WIFI_LWIP=y | ||
CONFIG_SPIRAM_MALLOC_RESERVE_INTERNAL=8192 | ||
CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY=y | ||
CONFIG_ESP_DEFAULT_CPU_FREQ_MHZ_240=y | ||
CONFIG_LV_MEM_CUSTOM=y | ||
CONFIG_LV_MEMCPY_MEMSET_STD=y |
Oops, something went wrong.