From 80b445f83ea05e98e043dcd7f2fc00659e15941c Mon Sep 17 00:00:00 2001 From: Ivan Grokhotkov Date: Wed, 14 Jul 2021 17:57:13 +0200 Subject: [PATCH 1/5] readme: minor fixes --- README.md | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 94f03a2..0d9d61a 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Espressif DSP Library -ESP-DSP is the official DSP library for the [ESP32](https://espressif.com/en/products/hardware/esp32/overview) chip and for the [ESP32S3](https://espressif.com/en/products/hardware/esp32s3/overview) chip. +ESP-DSP is the official DSP library for the [ESP32](https://espressif.com/en/products/hardware/esp32/overview) chip and for the [ESP32-S3](https://espressif.com/en/products/hardware/esp32s3/overview) chip. ## Overview @@ -28,7 +28,7 @@ Documentation found in the above links is automatically generated from the conte ## Installation and Usage -The ESP-DSP library is a component for the [ESP-IDF build system](https://docs.espressif.com/projects/esp-idf/en/latest/api-guides/build-system.html). It also works with the [new CMake-based build system](https://docs.espressif.com/projects/esp-idf/en/latest/api-guides/build-system-cmake.html). +The ESP-DSP library is a component for the [ESP-IDF build system](https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/build-system.html). It also works for ESP32 with the [legacy GNU Make-based build system](https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/build-system-legacy.html). ### Trying out ESP-DSP examples @@ -37,10 +37,6 @@ If you haven't created an ESP-IDF project yet, and wish to try the examples prov cd ~/esp git clone https://github.com/espressif/esp-dsp.git cd esp-dsp/examples/dotprod - make -j4 flash monitor ESPPORT=PORT - -or, if you are using CMake based build system, - idf.py -p PORT flash monitor where `PORT` is the UART port name of your development board, such as `/dev/ttyUSB0` or `COM1`. @@ -68,4 +64,4 @@ For general questions related to this library, please use the [esp32.com forum]( ## Copyrights and License -All original source code in this repository is Copyright (C) 2018-2019 Espressif Systems. This source code is licensed under the Apache License 2.0 as described in the file LICENSE. +All original source code in this repository is Copyright (C) 2018-2021 Espressif Systems. This source code is licensed under the Apache License 2.0 as described in the file LICENSE. From 298e5032ec78d97bd86817d57d2304b39cba303e Mon Sep 17 00:00:00 2001 From: Ivan Grokhotkov Date: Wed, 14 Jul 2021 16:41:16 +0200 Subject: [PATCH 2/5] global: use __XTENSA__ instead of CONFIG_IDF_TARGET_XTENSA Regression for IDF 4.2 and below, introduced in https://github.com/espressif/esp-dsp/pull/26. Closes https://github.com/espressif/esp-dsp/issues/31. --- modules/conv/include/dsps_conv_platform.h | 4 ++-- modules/dotprod/include/dspi_dotprod_platform.h | 4 ++-- modules/dotprod/include/dsps_dotprod_platform.h | 5 +++-- modules/fft/include/dsps_fft2r_platform.h | 4 ++-- modules/fft/include/dsps_fft4r_platform.h | 4 ++-- modules/fir/include/dsps_fir_platform.h | 4 ++-- modules/iir/include/dsps_biquad_platform.h | 6 +++--- modules/math/add/include/dsps_add_platform.h | 4 ++-- modules/math/addc/include/dsps_addc_platform.h | 4 ++-- modules/math/mul/include/dsps_mul_platform.h | 4 ++-- modules/math/mulc/include/dsps_mulc_platform.h | 4 ++-- modules/math/sub/include/dsps_sub_platform.h | 4 ++-- modules/matrix/include/dspm_mult_platform.h | 4 ++-- 13 files changed, 28 insertions(+), 27 deletions(-) diff --git a/modules/conv/include/dsps_conv_platform.h b/modules/conv/include/dsps_conv_platform.h index 0219de1..02c9c85 100644 --- a/modules/conv/include/dsps_conv_platform.h +++ b/modules/conv/include/dsps_conv_platform.h @@ -3,10 +3,9 @@ #include "sdkconfig.h" -#ifdef CONFIG_IDF_TARGET_ARCH_XTENSA +#ifdef __XTENSA__ #include #include -#endif #if ((XCHAL_HAVE_FP == 1) && (XCHAL_HAVE_LOOPS == 1)) @@ -16,5 +15,6 @@ #define dsps_corr_f32_ae32_enabled 1 #endif +#endif // __XTENSA__ #endif // _dsps_conv_platform_H_ \ No newline at end of file diff --git a/modules/dotprod/include/dspi_dotprod_platform.h b/modules/dotprod/include/dspi_dotprod_platform.h index a6e147e..3acd4d5 100644 --- a/modules/dotprod/include/dspi_dotprod_platform.h +++ b/modules/dotprod/include/dspi_dotprod_platform.h @@ -3,14 +3,14 @@ #include "sdkconfig.h" -#ifdef CONFIG_IDF_TARGET_ARCH_XTENSA +#ifdef __XTENSA__ #include #include -#endif #if CONFIG_IDF_TARGET_ESP32S3 #define dspi_dotprod_aes3_enabled 1 #endif +#endif // __XTENSA__ #endif // _dspi_dotprod_platform_H_ diff --git a/modules/dotprod/include/dsps_dotprod_platform.h b/modules/dotprod/include/dsps_dotprod_platform.h index 29e7ac2..f308262 100644 --- a/modules/dotprod/include/dsps_dotprod_platform.h +++ b/modules/dotprod/include/dsps_dotprod_platform.h @@ -3,10 +3,9 @@ #include "sdkconfig.h" -#ifdef CONFIG_IDF_TARGET_ARCH_XTENSA +#ifdef __XTENSA__ #include #include -#endif #if ((XCHAL_HAVE_FP == 1) && (XCHAL_HAVE_LOOPS == 1)) @@ -21,6 +20,7 @@ #define dsps_dotprod_s16_ae32_enabled 1 #endif // +#endif // __XTENSA__ #if CONFIG_IDF_TARGET_ESP32S3 @@ -28,4 +28,5 @@ #define dsps_dotprod_f32_aes3_enabled 1 #endif + #endif // _dsps_dotprod_platform_H_ diff --git a/modules/fft/include/dsps_fft2r_platform.h b/modules/fft/include/dsps_fft2r_platform.h index d2eae26..17506e7 100644 --- a/modules/fft/include/dsps_fft2r_platform.h +++ b/modules/fft/include/dsps_fft2r_platform.h @@ -3,10 +3,9 @@ #include "sdkconfig.h" -#ifdef CONFIG_IDF_TARGET_ARCH_XTENSA +#ifdef __XTENSA__ #include #include -#endif #if ((XCHAL_HAVE_FP == 1) && (XCHAL_HAVE_LOOPS == 1)) @@ -26,6 +25,7 @@ #define dsps_bit_rev_lookup_fc32_ae32_enabled 1 #endif // +#endif // __XTENSA__ #if CONFIG_IDF_TARGET_ESP32S3 #define dsps_fft2r_fc32_aes3_enabled 1 diff --git a/modules/fft/include/dsps_fft4r_platform.h b/modules/fft/include/dsps_fft4r_platform.h index 71ea8c8..a777bdc 100644 --- a/modules/fft/include/dsps_fft4r_platform.h +++ b/modules/fft/include/dsps_fft4r_platform.h @@ -3,10 +3,9 @@ #include "sdkconfig.h" -#ifdef CONFIG_IDF_TARGET_ARCH_XTENSA +#ifdef __XTENSA__ #include #include -#endif #if ((XCHAL_HAVE_FP == 1) && (XCHAL_HAVE_LOOPS == 1)) @@ -28,6 +27,7 @@ #define dsps_bit_rev_lookup_fc32_ae32_enabled 1 #endif // +#endif // __XTENSA__ diff --git a/modules/fir/include/dsps_fir_platform.h b/modules/fir/include/dsps_fir_platform.h index 1aecd01..fab2656 100644 --- a/modules/fir/include/dsps_fir_platform.h +++ b/modules/fir/include/dsps_fir_platform.h @@ -3,10 +3,9 @@ #include "sdkconfig.h" -#ifdef CONFIG_IDF_TARGET_ARCH_XTENSA +#ifdef __XTENSA__ #include #include -#endif #if ((XCHAL_HAVE_FP == 1) && (XCHAL_HAVE_LOOPS == 1)) @@ -15,5 +14,6 @@ #define dsps_fird_f32_ae32_enabled 1 #endif // +#endif // __XTENSA__ #endif // _dsps_fir_platform_H_ \ No newline at end of file diff --git a/modules/iir/include/dsps_biquad_platform.h b/modules/iir/include/dsps_biquad_platform.h index cf9318a..e39e851 100644 --- a/modules/iir/include/dsps_biquad_platform.h +++ b/modules/iir/include/dsps_biquad_platform.h @@ -3,16 +3,16 @@ #include "sdkconfig.h" -#ifdef CONFIG_IDF_TARGET_ARCH_XTENSA +#ifdef __XTENSA__ #include #include -#endif - #if ((XCHAL_HAVE_FP == 1) && (XCHAL_HAVE_LOOPS == 1)) #define dsps_biquad_f32_ae32_enabled 1 #endif +#endif // __XTENSA__ + #endif // _dsps_biquad_platform_H_ diff --git a/modules/math/add/include/dsps_add_platform.h b/modules/math/add/include/dsps_add_platform.h index 491dcd1..2b7b835 100644 --- a/modules/math/add/include/dsps_add_platform.h +++ b/modules/math/add/include/dsps_add_platform.h @@ -3,10 +3,9 @@ #include "sdkconfig.h" -#ifdef CONFIG_IDF_TARGET_ARCH_XTENSA +#ifdef __XTENSA__ #include #include -#endif #if ((XCHAL_HAVE_FP == 1) && (XCHAL_HAVE_LOOPS == 1)) @@ -18,6 +17,7 @@ #if (XCHAL_HAVE_LOOPS == 1) #define dsps_add_s16_ae32_enabled 1 #endif +#endif // __XTENSA__ #endif // _dsps_add_platform_H_ \ No newline at end of file diff --git a/modules/math/addc/include/dsps_addc_platform.h b/modules/math/addc/include/dsps_addc_platform.h index 7066cb8..70cad5f 100644 --- a/modules/math/addc/include/dsps_addc_platform.h +++ b/modules/math/addc/include/dsps_addc_platform.h @@ -3,10 +3,9 @@ #include "sdkconfig.h" -#ifdef CONFIG_IDF_TARGET_ARCH_XTENSA +#ifdef __XTENSA__ #include #include -#endif #if ((XCHAL_HAVE_FP == 1) && (XCHAL_HAVE_LOOPS == 1)) @@ -14,6 +13,7 @@ #define dsps_addc_f32_ae32_enabled 1 #endif +#endif // __XTENSA__ #endif // _dsps_addc_platform_H_ \ No newline at end of file diff --git a/modules/math/mul/include/dsps_mul_platform.h b/modules/math/mul/include/dsps_mul_platform.h index 09e7ceb..3eb8824 100644 --- a/modules/math/mul/include/dsps_mul_platform.h +++ b/modules/math/mul/include/dsps_mul_platform.h @@ -3,10 +3,9 @@ #include "sdkconfig.h" -#ifdef CONFIG_IDF_TARGET_ARCH_XTENSA +#ifdef __XTENSA__ #include #include -#endif #if ((XCHAL_HAVE_FP == 1) && (XCHAL_HAVE_LOOPS == 1)) @@ -14,5 +13,6 @@ #define dsps_mul_f32_ae32_enabled 1 #endif +#endif // __XTENSA__ #endif // _dsps_mul_platform_H_ \ No newline at end of file diff --git a/modules/math/mulc/include/dsps_mulc_platform.h b/modules/math/mulc/include/dsps_mulc_platform.h index d7593c3..9a7ca11 100644 --- a/modules/math/mulc/include/dsps_mulc_platform.h +++ b/modules/math/mulc/include/dsps_mulc_platform.h @@ -3,10 +3,9 @@ #include "sdkconfig.h" -#ifdef CONFIG_IDF_TARGET_ARCH_XTENSA +#ifdef __XTENSA__ #include #include -#endif #if ((XCHAL_HAVE_FP == 1) && (XCHAL_HAVE_LOOPS == 1)) @@ -20,6 +19,7 @@ #define dsps_mulc_s16_ae32_enabled 1 #endif // +#endif // __XTENSA__ #endif // _dsps_mulc_platform_H_ \ No newline at end of file diff --git a/modules/math/sub/include/dsps_sub_platform.h b/modules/math/sub/include/dsps_sub_platform.h index 074b688..6c67f30 100644 --- a/modules/math/sub/include/dsps_sub_platform.h +++ b/modules/math/sub/include/dsps_sub_platform.h @@ -3,10 +3,9 @@ #include "sdkconfig.h" -#ifdef CONFIG_IDF_TARGET_ARCH_XTENSA +#ifdef __XTENSA__ #include #include -#endif #if ((XCHAL_HAVE_FP == 1) && (XCHAL_HAVE_LOOPS == 1)) @@ -14,5 +13,6 @@ #define dsps_sub_f32_ae32_enabled 1 #endif +#endif // __XTENSA__ #endif // _dsps_sub_platform_H_ \ No newline at end of file diff --git a/modules/matrix/include/dspm_mult_platform.h b/modules/matrix/include/dspm_mult_platform.h index 4a72b20..ccc037c 100644 --- a/modules/matrix/include/dspm_mult_platform.h +++ b/modules/matrix/include/dspm_mult_platform.h @@ -3,10 +3,9 @@ #include "sdkconfig.h" -#ifdef CONFIG_IDF_TARGET_ARCH_XTENSA +#ifdef __XTENSA__ #include #include -#endif #if ((XCHAL_HAVE_FP == 1) && (XCHAL_HAVE_LOOPS == 1)) @@ -24,6 +23,7 @@ #define dspm_mult_s16_ae32_enabled 1 #endif +#endif // __XTENSA__ #if CONFIG_IDF_TARGET_ESP32S3 #define dspm_mult_f32_aes3_enabled 1 From 0a5f22d8a3bd0875a354120030eaa5556513fcb1 Mon Sep 17 00:00:00 2001 From: Ivan Grokhotkov Date: Wed, 14 Jul 2021 18:26:25 +0200 Subject: [PATCH 3/5] default to CONFIG_DSP_ANSI for chips which aren't explicitly supported --- Kconfig | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/Kconfig b/Kconfig index 5c8eaf7..bf1c698 100644 --- a/Kconfig +++ b/Kconfig @@ -1,16 +1,24 @@ menu "DSP Library" +config DSP_OPTIMIZATIONS_SUPPORTED + bool + default y + depends on IDF_TARGET_ESP32 || IDF_TARGET_ESP32S3 + choice DSP_OPTIMIZATION - bool "DSP Optimization for ESP32" - default DSP_OPTIMIZED + bool "DSP Optimization" + default DSP_OPTIMIZED if DSP_OPTIMIZATIONS_SUPPORTED + default DSP_ANSI help - An Ansi C version could be used for verification and debug purpose. + An ANSI C version could be used for verification and debug purpose, + or for chips where an optimized version is not available. config DSP_ANSI bool "ANSI C" config DSP_OPTIMIZED - bool "ESP32 Optimized" + bool "Optimized" + depends on DSP_OPTIMIZATIONS_SUPPORTED endchoice config DSP_OPTIMIZATION From 86dade5ddc3e36cbf7d1cde506059cf1a5d45fc0 Mon Sep 17 00:00:00 2001 From: Ivan Grokhotkov Date: Wed, 14 Jul 2021 18:06:46 +0200 Subject: [PATCH 4/5] tests: fix dependency on memalign which is not supported until IDF 4.3. --- modules/common/include/dsp_tests.h | 8 ++++++++ test/test_dsp.c | 1 + 2 files changed, 9 insertions(+) diff --git a/modules/common/include/dsp_tests.h b/modules/common/include/dsp_tests.h index 3042c2d..ea1fb42 100644 --- a/modules/common/include/dsp_tests.h +++ b/modules/common/include/dsp_tests.h @@ -15,6 +15,9 @@ #ifndef _DSP_TESTS_H_ #define _DSP_TESTS_H_ +#include +#include "esp_idf_version.h" + #define TEST_ASSERT_EXEC_IN_RANGE(min_exec, max_exec, actual) \ if (actual >= max_exec) { \ ESP_LOGE("", "Time error. Expected max: %i, reached: %i", (int)max_exec, (int)actual);\ @@ -26,4 +29,9 @@ } +// memalign function is implemented in IDF 4.3 and later +#if ESP_IDF_VERSION <= ESP_IDF_VERSION_VAL(4, 3, 0) +#define memalign(align_, size_) malloc(size_) +#endif + #endif // _DSP_TESTS_H_ \ No newline at end of file diff --git a/test/test_dsp.c b/test/test_dsp.c index 814b851..2454ec0 100644 --- a/test/test_dsp.c +++ b/test/test_dsp.c @@ -20,6 +20,7 @@ #include "esp_dsp.h" #include "report.inc" #include "sdkconfig.h" +#include "dsp_tests.h" static const char *TAG = "common"; From ed33103b83af164cbf57178be97132e04816e095 Mon Sep 17 00:00:00 2001 From: Ivan Grokhotkov Date: Wed, 14 Jul 2021 17:10:42 +0200 Subject: [PATCH 5/5] ci: build examples with multiple IDF versions --- .gitlab-ci.yml | 88 +++++++++++++++++++++++------------------------ build_all.sh | 81 +++++++++++++++++++++++++++++++++++++++++++ build_examples.sh | 56 ------------------------------ 3 files changed, 124 insertions(+), 101 deletions(-) create mode 100755 build_all.sh delete mode 100755 build_examples.sh diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e943c40..3c9bf35 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -17,10 +17,6 @@ variables: ESP_IDF_GIT: "https://gitlab-ci-token:${CI_JOB_TOKEN}@${GITLAB_HTTPS_SERVER}/espressif/esp-idf.git" -.setup_idf_tools: &setup_idf_tools | - cd esp-idf -# tools/idf_tools.py --non-interactive install && eval "$(tools/idf_tools.py --non-interactive export)" || exit 1 - .add_gh_key_remote: &add_gh_key_remote | command -v ssh-agent >/dev/null || exit 1 eval $(ssh-agent -s) @@ -34,51 +30,53 @@ after_script: # Just for cleaning space, no other causes - git clean -ffdx -build: + +# This template gets expanded multiple times, once for every IDF version. +# IDF version is specified by setting the espressif/idf image tag. +# +# EXAMPLE_TARGETS sets the list of IDF_TARGET values to build examples for. +# It should be equal to the list of targets supported by the specific IDF version. +# +# TEST_TARGETS sets the list of IDF_TARGET values to build the test_app for. +# It should contain only the targets with optimized assembly implementations. +# +.build_template: stage: build tags: - build + - internet script: - # Get ESP-IDF - - dir - - git clone ${ESP_IDF_GIT} esp-idf - - dir - - pushd esp-idf - - dir - # Non-recursive getting its submodules - - git submodule update --init - - dir - - export IDF_PATH=$PWD - - dir - #- *setup_idf_tools - - dir - - ./tools/ci/mirror-submodule-update.sh - - - source /opt/pyenv/activate - - pyenv global $(pyenv versions --bare) - - ./tools/idf_tools.py --non-interactive install-python-env - - ./tools/idf_tools.py --non-interactive install - - - idf_exports=$(${IDF_PATH}/tools/idf_tools.py --non-interactive export) - - eval "${idf_exports}" - - popd - - # Create a copy of the project in "esp-dsp" directory. - # This is needed because CMake build system can not build a component - # when ESP-IDF directory is inside the component. - # After cloning, we will have two directories at the same level: "esp-idf" and "esp-dsp" - - git clone $PWD esp-dsp - - cd esp-dsp - - # Build test app by both Makefiles and CMake ways - - pushd test_app - - make defconfig && make - - rm -rf build - - idf.py build - - popd - - # Build examples - - ./build_examples.sh + - ./build_all.sh + variables: + EXAMPLE_TARGETS: "esp32" + TEST_TARGETS: "esp32" + +build_idf_v4.0: + extends: .build_template + image: espressif/idf:release-v4.0 + +build_idf_v4.1: + extends: .build_template + image: espressif/idf:release-v4.1 + +build_idf_v4.2: + extends: .build_template + image: espressif/idf:release-v4.2 + variables: + EXAMPLE_TARGETS: "esp32 esp32s2" + +build_idf_v4.3: + extends: .build_template + image: espressif/idf:release-v4.3 + variables: + EXAMPLE_TARGETS: "esp32 esp32s2" + +build_idf_latest: + extends: .build_template + image: espressif/idf:latest + variables: + EXAMPLE_TARGETS: "esp32 esp32s2 esp32s3" + TEST_TARGETS: "esp32 esp32s3" build_docs: stage: build diff --git a/build_all.sh b/build_all.sh new file mode 100755 index 0000000..504f4fa --- /dev/null +++ b/build_all.sh @@ -0,0 +1,81 @@ +#!/bin/bash +# +# Build the test app and all examples from the examples directory. +# Expects EXAMPLE_TARGETS and TEST_TARGETS environment variables to be set. +# Each variable is the list of IDF_TARGET values to build the examples and +# the test app for, respectively. +# +# ----------------------------------------------------------------------------- +# Safety settings (see https://gist.github.com/ilg-ul/383869cbb01f61a51c4d). + +if [[ -n "${DEBUG_SHELL}" ]] +then + set -x # Activate the expand mode if DEBUG is anything but empty. +fi + +if [[ -z "${EXAMPLE_TARGETS}" || -z "${TEST_TARGETS}" ]] +then + echo "EXAMPLE_TARGETS and TEST_TARGETS environment variables must be set before calling this script" + exit 1 +fi + +set -o errexit # Exit if command failed. +set -o pipefail # Exit if pipe failed. +set -o nounset # Exit if variable not set. + + +STARS='***************************************************' + +# ----------------------------------------------------------------------------- + +die() { + echo "${1:-"Unknown Error"}" 1>&2 + exit 1 +} + +# build_for_targets +# call this in the project directory +function build_for_targets +{ + target_list="$1" + for IDF_TARGET in ${target_list} + do + export IDF_TARGET + if [[ "${IDF_TARGET}" = "esp32" ]] + then + echo "${STARS}" + echo "Building in $PWD with Make" + # -j option will be set via MAKEFLAGS in .gitlab-ci.yml + # shellcheck disable=SC2015 + make defconfig && make || die "Make build in ${PWD} has failed" + rm -rf build + fi + + echo "${STARS}" + echo "Building in $PWD with CMake for ${IDF_TARGET}" + if [[ ${IDF_TARGET} != "esp32" ]] + then + # IDF 4.0 doesn't support idf.py set-target, and only supports esp32. + idf.py set-target "${IDF_TARGET}" + fi + idf.py build || die "CMake build in ${PWD} has failed for ${IDF_TARGET}" + idf.py fullclean + done +} + +# Build the test app +echo "${STARS}" +pushd test_app +build_for_targets "${TEST_TARGETS}" +popd + +# Build the examples +pushd examples +EXAMPLES=$(find . -maxdepth 1 -mindepth 1 -type d | cut -d '/' -f 2) +for NAME in ${EXAMPLES} +do + pushd "${NAME}" + build_for_targets "${EXAMPLE_TARGETS}" + popd +done +popd diff --git a/build_examples.sh b/build_examples.sh deleted file mode 100755 index 2535a05..0000000 --- a/build_examples.sh +++ /dev/null @@ -1,56 +0,0 @@ -#!/bin/bash -# -# Build all examples from the examples directory. -# -# ----------------------------------------------------------------------------- -# Safety settings (see https://gist.github.com/ilg-ul/383869cbb01f61a51c4d). - -if [[ ! -z ${DEBUG_SHELL} ]] -then - set -x # Activate the expand mode if DEBUG is anything but empty. -fi - -set -o errexit # Exit if command failed. -set -o pipefail # Exit if pipe failed. -set -o nounset # Exit if variable not set. - -# Remove the initial space and instead use '\n'. -IFS=$'\n\t' - -STARS='***************************************************' - -# ----------------------------------------------------------------------------- - -die() { - echo "${1:-"Unknown Error"}" 1>&2 - exit 1 -} - -pushd examples - -EXAMPLES=$(find . -maxdepth 1 -mindepth 1 -type d | cut -d '/' -f 2) - -for NAME in ${EXAMPLES} -do - echo "$STARS" - echo "Building example $NAME with Make" - pushd $NAME - # -j option will be set via MAKEFLAGS in .gitlab-ci.yml - make defconfig && make || die "Make build for ${NAME} has failed" - rm -rf build - echo "$STARS" - echo "Building example $NAME with CMake for Esp32" - idf.py set-target esp32 - idf.py build || die "CMake build for ${NAME} has failed for Esp32" - echo "Building example $NAME with CMake for Esp32-s2" - idf.py clean - idf.py set-target esp32s2 - idf.py build || die "CMake build for ${NAME} has failed for Esp32-s2" - echo "Building example $NAME with CMake for Esp32-s3" - idf.py clean - idf.py set-target esp32s3 - idf.py build || die "CMake build for ${NAME} has failed for Esp32-s3" - popd -done - -popd