From 16dd4bb92b6b70979532993d1a22d749bccaaaba Mon Sep 17 00:00:00 2001 From: Lukaswnd Date: Wed, 5 Jun 2024 12:36:04 +0200 Subject: [PATCH] set my configs --- .github/workflows/build_manual.yml | 62 +++++ .github/workflows/cron.yml | 144 ---------- .github/workflows/docker.yml | 81 ------ .github/workflows/push.yml | 67 ----- .github/workflows/repository_dispatch.yml | 31 --- build.sh | 48 ++-- components/fb_gfx/CMakeLists.txt | 5 - components/fb_gfx/FreeMonoBold12pt7b.h | 250 ----------------- components/fb_gfx/component.mk | 2 - components/fb_gfx/fb_gfx.c | 167 ------------ components/fb_gfx/include/fb_gfx.h | 44 --- configs/CMakeLists.txt | 315 ++++++++++++++++++++++ configs/builds.json | 4 +- configs/defconfig.120m | 3 +- configs/defconfig.16m | 2 +- configs/defconfig.60m | 2 +- configs/defconfig.64m | 2 +- configs/defconfig.common | 245 +++++++++++++---- configs/defconfig.debug_debug | 9 +- configs/defconfig.debug_default | 11 +- configs/defconfig.debug_error | 7 + configs/defconfig.debug_info | 9 +- configs/defconfig.debug_none | 7 + configs/defconfig.debug_verbose | 9 +- configs/defconfig.debug_warning | 7 + configs/defconfig.esp32 | 2 +- configs/defconfig.esp32c2 | 2 +- configs/defconfig.esp32c3 | 2 +- configs/defconfig.esp32c6 | 2 +- configs/defconfig.esp32h2 | 3 +- configs/defconfig.esp32s2 | 2 +- configs/defconfig.esp32s3 | 2 +- configs/defconfig.opi_ram | 13 +- configs/defconfig.qio_ram | 15 +- configs/idf_component.yml | 66 +++++ main/idf_component.yml | 56 +--- tools/archive-build.sh | 33 +++ tools/gen_pio_frmwk_manifest.py | 95 +++++++ tools/gen_platformio_manifest.py | 15 +- tools/install-arduino.sh | 30 +++ 40 files changed, 938 insertions(+), 933 deletions(-) create mode 100644 .github/workflows/build_manual.yml delete mode 100644 .github/workflows/cron.yml delete mode 100644 .github/workflows/docker.yml delete mode 100644 .github/workflows/push.yml delete mode 100644 .github/workflows/repository_dispatch.yml delete mode 100644 components/fb_gfx/CMakeLists.txt delete mode 100755 components/fb_gfx/FreeMonoBold12pt7b.h delete mode 100755 components/fb_gfx/component.mk delete mode 100644 components/fb_gfx/fb_gfx.c delete mode 100644 components/fb_gfx/include/fb_gfx.h create mode 100644 configs/CMakeLists.txt create mode 100644 configs/idf_component.yml create mode 100644 tools/gen_pio_frmwk_manifest.py diff --git a/.github/workflows/build_manual.yml b/.github/workflows/build_manual.yml new file mode 100644 index 000000000..d2246cff3 --- /dev/null +++ b/.github/workflows/build_manual.yml @@ -0,0 +1,62 @@ +name: Manual Build + +on: + workflow_dispatch: + inputs: + target: + type: choice + description: Choose Target + default: 'all' + options: + - 'all' + - 'esp32' + - 'esp32s2' + - 'esp32s3' + - 'esp32c3' + - 'esp32c6' + - 'esp32h2' + log_level: + type: choice + description: Choose Log Level + default: 'default' + options: + - 'default' + - 'none' + - 'verbose' + - 'debug' + - 'info' + - 'warning' + - 'error' + +jobs: + run: + name: Build ${{ github.ref_name }} SDK For ${{ github.event.inputs.target }} as ${{ github.event.inputs.log_level }} + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + + - name: Install dependencies + run: bash ./tools/prepare-ci.sh + + - name: Build + shell: bash + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_RUN_NUMBER: ${{ github.run_number }} + run: | + export TARGET_TYPE=${{ github.event.inputs.target }} + export LOG_LEVEL=${{ github.event.inputs.log_level }} + echo "Building for $TARGET_TYPE (log_level: $LOG_LEVEL)" + bash ./build.sh -e -d -t $TARGET_TYPE -D $LOG_LEVEL + + - name: Release + uses: jason2866/action-gh-release@v1.2 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: "3.0.0.${{ github.run_number }}" + files: | + dist/framework* + \ No newline at end of file diff --git a/.github/workflows/cron.yml b/.github/workflows/cron.yml deleted file mode 100644 index 00405c4ba..000000000 --- a/.github/workflows/cron.yml +++ /dev/null @@ -1,144 +0,0 @@ -name: Cron Build - -on: - schedule: -# ┌───────────── minute (0 - 59) -# │ ┌───────────── hour (0 - 23) -# │ │ ┌───────────── day of the month (1 - 31) -# │ │ │ ┌───────────── month (1 - 12 or JAN-DEC) -# │ │ │ │ ┌───────────── day of the week (0 - 6 or SUN-SAT) -# │ │ │ │ │ -# │ │ │ │ │ -# │ │ │ │ │ -# * * * * * - - cron: '0 */6 * * *' - -defaults: - run: - shell: bash - -jobs: - run: - name: Build with IDF ${{ matrix.idf_branch }} - runs-on: ubuntu-latest - - strategy: - fail-fast: false - matrix: - idf_branch: [release/v5.1, release/v4.4] #, release/v3.3] - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - name: Install dependencies - run: bash ./tools/prepare-ci.sh - - name: Build - env: - GITHUB_TOKEN: ${{ secrets.PUSH_TOKEN }} - GIT_AUTHOR_EMAIL: ${{ secrets.PUSH_EMAIL }} - GIT_COMMITTER_EMAIL: ${{ secrets.PUSH_EMAIL }} - IDF_BRANCH: ${{ matrix.idf_branch }} - run: | - git checkout ${{ matrix.idf_branch }} || echo "Using master branch" - bash ./tools/cron.sh - - name: Upload build - if: failure() - uses: actions/upload-artifact@v4 - with: - name: build - path: build - - name: Upload archive - uses: actions/upload-artifact@v4 - with: - name: artifacts - path: dist - - - # check: - # name: Check if result should be deployed - # runs-on: ubuntu-latest - # strategy: - # matrix: - # branch: [release/v5.1, release/v4.4] #, release/v3.3] - # outputs: - # idf_branch: ${{ steps.check.outputs.idf_branch }} - # idf_commit: ${{ steps.check.outputs.idf_commit }} - # ar_branch: ${{ steps.check.outputs.ar_branch }} - # ar_new_commit_message: ${{ steps.check.outputs.ar_new_commit_message }} - # ar_new_branch_name: ${{ steps.check.outputs.ar_new_branch_name }} - # ar_new_pr_title: ${{ steps.check.outputs.ar_new_pr_title }} - # ar_has_commit: ${{ steps.check.outputs.ar_has_commit }} - # ar_has_branch: ${{ steps.check.outputs.ar_has_branch }} - # ar_has_pr: ${{ steps.check.outputs.ar_has_pr }} - # libs_version: ${{ steps.check.outputs.libs_version }} - # libs_has_commit: ${{ steps.check.outputs.libs_has_commit }} - # libs_has_branch: ${{ steps.check.outputs.libs_has_branch }} - # steps: - # - uses: actions/checkout@v3 - # - id: check - # env: - # GITHUB_TOKEN: ${{ secrets.PUSH_TOKEN }} - # GIT_AUTHOR_EMAIL: ${{ secrets.PUSH_EMAIL }} - # GIT_COMMITTER_EMAIL: ${{ secrets.PUSH_EMAIL }} - # IDF_BRANCH: ${{ matrix.idf_branch }} - # run: bash ./tools/check-deploy-needed.sh - - # build: - # name: Build Libs for ${{ matrix.target }} - # runs-on: ubuntu-latest - # needs: check - # if: needs.check.outputs.libs_has_commit == '0' || needs.check.outputs.ar_has_commit == '0' - # strategy: - # matrix: - # target: [esp32, esp32s2, esp32s3, esp32c3, esp32c6, esp32h2] - # fail-fast: false - # steps: - # - uses: actions/checkout@v3 - # # - name: Install dependencies - # # run: bash ./tools/prepare-ci.sh - # - shell: bash - # name: Build Libs for ${{ matrix.target }} - # run: echo ${{ matrix.target }} - # # run: bash ./build.sh -t ${{ matrix.target }} - # # - name: Upload archive - # # uses: actions/upload-artifact@v3 - # # with: - # # name: artifacts - # # path: dist - - # deploy: - # name: Deploy build - # runs-on: ubuntu-latest - # needs: [check, build] - # steps: - # - uses: actions/checkout@v3 - # - shell: bash - # env: - # GITHUB_TOKEN: ${{ secrets.PUSH_TOKEN }} - # GIT_AUTHOR_EMAIL: ${{ secrets.PUSH_EMAIL }} - # GIT_COMMITTER_EMAIL: ${{ secrets.PUSH_EMAIL }} - # IDF_BRANCH: ${{ needs.check.outputs.idf_branch }} - # IDF_COMMIT: ${{ needs.check.outputs.idf_commit }} - # AR_BRANCH: ${{ needs.check.outputs.ar_branch }} - # AR_NEW_COMMIT_MESSAGE: ${{ needs.check.outputs.ar_new_commit_message }} - # AR_NEW_BRANCH_NAME: ${{ needs.check.outputs.ar_new_branch_name }} - # AR_NEW_PR_TITLE: ${{ needs.check.outputs.ar_new_pr_title }} - # AR_HAS_COMMIT: ${{ needs.check.outputs.ar_has_commit }} - # AR_HAS_BRANCH: ${{ needs.check.outputs.ar_has_branch }} - # AR_HAS_PR: ${{ needs.check.outputs.ar_has_pr }} - # LIBS_VERSION: ${{ needs.check.outputs.libs_version }} - # LIBS_HAS_COMMIT: ${{ needs.check.outputs.libs_has_commit }} - # LIBS_HAS_BRANCH: ${{ needs.check.outputs.libs_has_branch }} - # run: | - # echo "IDF_COMMIT: $IDF_COMMIT" - # echo "AR_BRANCH: $AR_BRANCH" - # echo "AR_NEW_COMMIT_MESSAGE: $AR_NEW_COMMIT_MESSAGE" - # echo "AR_NEW_BRANCH_NAME: $AR_NEW_BRANCH_NAME" - # echo "AR_NEW_PR_TITLE: $AR_NEW_PR_TITLE" - # echo "AR_HAS_COMMIT: $AR_HAS_COMMIT" - # echo "AR_HAS_BRANCH: $AR_HAS_BRANCH" - # echo "AR_HAS_PR: $AR_HAS_PR" - # echo "LIBS_VERSION: $LIBS_VERSION" - # echo "LIBS_HAS_COMMIT: $LIBS_HAS_COMMIT" - # echo "LIBS_HAS_BRANCH: $LIBS_HAS_BRANCH" - diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml deleted file mode 100644 index 8952015a2..000000000 --- a/.github/workflows/docker.yml +++ /dev/null @@ -1,81 +0,0 @@ -name: Build and push Docker image - -on: - push: - branches: - - 'master' - - 'release/*' - tags: - - 'v*.*' - -env: - # Build the image for amd64 and arm64 - BUILD_PLATFORMS: linux/amd64,linux/arm64 - DOCKERHUB_REPO: ${{ github.repository_owner }}/esp32-arduino-lib-builder - -jobs: - docker: - # Disable the job in forks - if: ${{ github.repository_owner == 'espressif' }} - - runs-on: ubuntu-latest - steps: - # Depending on the branch/tag, set CLONE_BRANCH_OR_TAG variable (used in the Dockerfile - # as a build arg) and TAG_NAME (used when tagging the image). - # - # The following 3 steps cover the alternatives (tag, release branch, master branch): - - name: Set variables (tags) - if: ${{ github.ref_type == 'tag' }} - run: | - echo "CLONE_BRANCH_OR_TAG=$GITHUB_REF_NAME" >> $GITHUB_ENV - echo "TAG_NAME=$GITHUB_REF_NAME" >> $GITHUB_ENV - - name: Set variables (release branches) - if: ${{ github.ref_type == 'branch' && startsWith(github.ref_name, 'release/') }} - run: | - echo "CLONE_BRANCH_OR_TAG=$GITHUB_REF_NAME" >> $GITHUB_ENV - echo "TAG_NAME=release-${GITHUB_REF_NAME##release/}" >> $GITHUB_ENV - - name: Set variables (main branch) - if: ${{ github.ref_type == 'branch' && github.ref_name == 'master' }} - run: | - echo "CLONE_BRANCH_OR_TAG=master" >> $GITHUB_ENV - echo "TAG_NAME=latest" >> $GITHUB_ENV - - # Display the variables set above, just in case. - - name: Check variables - run: | - echo "CLONE_BRANCH_OR_TAG: $CLONE_BRANCH_OR_TAG" - echo "CHECKOUT_REF: $CHECKOUT_REF" - echo "TAG_NAME: $TAG_NAME" - - # The following steps are the standard boilerplate from - # https://github.com/marketplace/actions/build-and-push-docker-images - - name: Checkout - uses: actions/checkout@v4 - - name: Login to Docker Hub - uses: docker/login-action@v3 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - name: Set up QEMU for multiarch builds - uses: docker/setup-qemu-action@v3 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - name: Build and push - uses: docker/build-push-action@v5 - with: - context: tools/docker - push: true - tags: ${{ env.DOCKERHUB_REPO }}:${{ env.TAG_NAME }} - platforms: ${{ env.BUILD_PLATFORMS }} - build-args: | - LIBBUILDER_CLONE_URL=${{ github.server_url }}/${{ github.repository }}.git - LIBBUILDER_CLONE_BRANCH_OR_TAG=${{ env.CLONE_BRANCH_OR_TAG }} - - - name: Update Docker Hub repository description (master branch) - if: ${{ github.ref_type == 'branch' && github.ref_name == 'master' }} - uses: peter-evans/dockerhub-description@v4 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - repository: ${{ env.DOCKERHUB_REPO }} - readme-filepath: ./tools/docker/README.md diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml deleted file mode 100644 index c3edd52d3..000000000 --- a/.github/workflows/push.yml +++ /dev/null @@ -1,67 +0,0 @@ -name: ESP32 Arduino Libs CI - -on: - push: - branches: - - master - pull_request: - -concurrency: - group: esp-idf-libs-${{github.event.pull_request.number || github.ref}} - cancel-in-progress: true - -jobs: - - build-libs: - name: Build Libs for ${{ matrix.target }} - runs-on: ubuntu-latest - strategy: - matrix: - target: [esp32, esp32s2, esp32s3, esp32c2, esp32c3, esp32c6, esp32h2] - fail-fast: false - steps: - - uses: actions/checkout@v4 - - name: Install dependencies - run: bash ./tools/prepare-ci.sh - - name: Build Libs for ${{ matrix.target }} - run: bash ./build.sh -e -t ${{ matrix.target }} - - name: Upload build - if: failure() - uses: actions/upload-artifact@v4 - with: - name: build-${{ matrix.target }} - path: build - - name: Upload archive - uses: actions/upload-artifact@v4 - with: - name: artifacts-${{ matrix.target }} - path: dist - - combine-artifacts: - name: Combine artifacts - needs: build-libs - runs-on: ubuntu-latest - steps: - - name: Download artifacts - uses: actions/download-artifact@v4 - with: - path: dist - pattern: artifacts-* - merge-multiple: true - - shell: bash - run: | - mkdir -p out - find dist -name 'arduino-esp32-libs-esp*.tar.gz' -exec tar zxvf {} -C out \; - cd out/tools/esp32-arduino-libs && tar zcf ../../../dist/esp32-arduino-libs.tar.gz * && cd ../../.. - cp out/package_esp32_index.template.json dist/package_esp32_index.template.json - - name: Upload full esp32-arduino-libs archive - uses: actions/upload-artifact@v4 - with: - name: esp32-arduino-libs - path: dist/esp32-arduino-libs.tar.gz - - name: Upload package_esp32_index.template.json - uses: actions/upload-artifact@v4 - with: - name: package-esp32-index-json - path: dist/package_esp32_index.template.json - diff --git a/.github/workflows/repository_dispatch.yml b/.github/workflows/repository_dispatch.yml deleted file mode 100644 index a18412a3d..000000000 --- a/.github/workflows/repository_dispatch.yml +++ /dev/null @@ -1,31 +0,0 @@ -name: Remote Trigger - -on: repository_dispatch - -jobs: - run: - name: Dispatch Event - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - name: Install dependencies - run: bash ./tools/prepare-ci.sh - - name: Handle Event - env: - GITHUB_TOKEN: ${{ secrets.PUSH_TOKEN }} - GIT_AUTHOR_EMAIL: ${{ secrets.PUSH_EMAIL }} - GIT_COMMITTER_EMAIL: ${{ secrets.PUSH_EMAIL }} - run: bash ./tools/repository_dispatch.sh - - name: Upload build - if: failure() - uses: actions/upload-artifact@v4 - with: - name: build - path: build - - name: Upload archive - uses: actions/upload-artifact@v4 - with: - name: artifacts - path: dist diff --git a/build.sh b/build.sh index eead520a6..0f411b8b8 100755 --- a/build.sh +++ b/build.sh @@ -142,7 +142,7 @@ if [ "$BUILD_TYPE" != "all" ]; then # Skip building for targets that are not in the $TARGET array continue fi - + configs="configs/defconfig.common;configs/defconfig.$target;configs/defconfig.debug_$BUILD_DEBUG" for defconf in `echo "$target_json" | jq -c '.features[]' | tr -d '"'`; do configs="$configs;configs/defconfig.$defconf" @@ -187,7 +187,7 @@ for target_json in `jq -c '.targets[]' configs/builds.json`; do continue fi fi - + # Skip chips that should not be a part of the final libs # WARNING!!! this logic needs to be updated when cron builds are split into jobs if [ "$TARGET" = "all" ] && [ $target_skip -eq 1 ]; then @@ -218,18 +218,18 @@ for target_json in `jq -c '.targets[]' configs/builds.json`; do idf.py -DIDF_TARGET="$target" -DSDKCONFIG_DEFAULTS="$idf_libs_configs" idf-libs if [ $? -ne 0 ]; then exit 1; fi - if [ "$target" == "esp32s3" ]; then - idf.py -DIDF_TARGET="$target" -DSDKCONFIG_DEFAULTS="$idf_libs_configs" srmodels_bin - if [ $? -ne 0 ]; then exit 1; fi - AR_SDK="$AR_TOOLS/esp32-arduino-libs/$target" - # sr model.bin - if [ -f "build/srmodels/srmodels.bin" ]; then - echo "$AR_SDK/esp_sr" - mkdir -p "$AR_SDK/esp_sr" - cp -f "build/srmodels/srmodels.bin" "$AR_SDK/esp_sr/" - cp -f "partitions.csv" "$AR_SDK/esp_sr/" - fi - fi + #if [ "$target" == "esp32s3" ]; then + # idf.py -DIDF_TARGET="$target" -DSDKCONFIG_DEFAULTS="$idf_libs_configs" srmodels_bin + # if [ $? -ne 0 ]; then exit 1; fi + # AR_SDK="$AR_TOOLS/esp32-arduino-libs/$target" + # # sr model.bin + # if [ -f "build/srmodels/srmodels.bin" ]; then + # echo "$AR_SDK/esp_sr" + # mkdir -p "$AR_SDK/esp_sr" + # cp -f "build/srmodels/srmodels.bin" "$AR_SDK/esp_sr/" + # cp -f "partitions.csv" "$AR_SDK/esp_sr/" + # fi + #fi # Build Bootloaders for boot_conf in `echo "$target_json" | jq -c '.bootloaders[]'`; do @@ -310,10 +310,28 @@ if [ "$BUILD_TYPE" = "all" ]; then ibr=$(git describe --all 2>/dev/null) ic=$(git -C "$IDF_PATH" rev-parse --short HEAD) popd - python3 ./tools/gen_platformio_manifest.py -o "$TOOLS_JSON_OUT/" -s "$ibr" -c "$ic" + python3 ./tools/gen_platformio_manifest.py -o "$TOOLS_JSON_OUT/" -s "$ibr" -c "$ic" -n "$GITHUB_RUN_NUMBER" + if [ $? -ne 0 ]; then exit 1; fi +fi + +AR_VERSION=$(jq -c '.version' "$AR_COMPS/arduino/package.json" | tr -d '"') +AR_VERSION_UNDERSCORE=`echo "$AR_VERSION" | tr . _` + +# Generate PlatformIO framework manifest file +rm -rf "$AR_ROOT/package.json" +if [ "$BUILD_TYPE" = "all" ]; then + python3 ./tools/gen_pio_frmwk_manifest.py -o "$AR_ROOT/" -s "v$AR_VERSION" -c "$IDF_COMMIT" -n "$GITHUB_RUN_NUMBER" if [ $? -ne 0 ]; then exit 1; fi fi +# Generate core_version.h +rm -rf "$AR_ROOT/core_version.h" +echo "#define ARDUINO_ESP32_GIT_VER 0x$AR_Commit_short +#define ARDUINO_ESP32_GIT_DESC $AR_VERSION +#define ARDUINO_ESP32_RELEASE_$AR_VERSION_UNDERSCORE +#define ARDUINO_ESP32_RELEASE \"$AR_VERSION_UNDERSCORE\"" >> "$AR_ROOT/core_version.h" + + # copy everything to arduino-esp32 installation if [ $COPY_OUT -eq 1 ] && [ -d "$ESP32_ARDUINO" ]; then ./tools/copy-to-arduino.sh diff --git a/components/fb_gfx/CMakeLists.txt b/components/fb_gfx/CMakeLists.txt deleted file mode 100644 index 5b6febc2d..000000000 --- a/components/fb_gfx/CMakeLists.txt +++ /dev/null @@ -1,5 +0,0 @@ -set(COMPONENT_SRCS "fb_gfx.c") -set(COMPONENT_ADD_INCLUDEDIRS "include") -set(COMPONENT_PRIV_INCLUDEDIRS "") -set(COMPONENT_PRIV_REQUIRES newlib) -register_component() \ No newline at end of file diff --git a/components/fb_gfx/FreeMonoBold12pt7b.h b/components/fb_gfx/FreeMonoBold12pt7b.h deleted file mode 100755 index 45db126bd..000000000 --- a/components/fb_gfx/FreeMonoBold12pt7b.h +++ /dev/null @@ -1,250 +0,0 @@ -const uint8_t FreeMonoBold12pt7bBitmaps[] = { - 0xFF, 0xFF, 0xFF, 0xF6, 0x66, 0x60, 0x6F, 0x60, 0xE7, 0xE7, 0x62, 0x42, - 0x42, 0x42, 0x42, 0x11, 0x87, 0x30, 0xC6, 0x18, 0xC3, 0x31, 0xFF, 0xFF, - 0xF9, 0x98, 0x33, 0x06, 0x60, 0xCC, 0x7F, 0xEF, 0xFC, 0x66, 0x0C, 0xC3, - 0x98, 0x63, 0x04, 0x40, 0x0C, 0x03, 0x00, 0xC0, 0xFE, 0x7F, 0x9C, 0x66, - 0x09, 0x80, 0x78, 0x0F, 0xE0, 0x7F, 0x03, 0xE0, 0xF8, 0x7F, 0xFB, 0xFC, - 0x0C, 0x03, 0x00, 0xC0, 0x30, 0x38, 0x1F, 0x0C, 0x42, 0x10, 0xC4, 0x1F, - 0x03, 0x9C, 0x3C, 0x7F, 0x33, 0xE0, 0x8C, 0x21, 0x08, 0xC3, 0xE0, 0x70, - 0x3E, 0x1F, 0xC6, 0x61, 0x80, 0x70, 0x0C, 0x07, 0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 0x31, 0xE3, 0x80, 0x3C, 0x37, 0xE7, 0x67, - 0xE6, 0x1C }; - -const GFXglyph FreeMonoBold12pt7bGlyphs[] = { - { 0, 0, 0, 14, 0, 1 }, // 0x20 ' ' - { 0, 4, 15, 14, 5, -14 }, // 0x21 '!' - { 8, 8, 7, 14, 3, -13 }, // 0x22 '"' - { 15, 11, 18, 14, 2, -15 }, // 0x23 '#' - { 40, 10, 20, 14, 2, -16 }, // 0x24 '$' - { 65, 10, 15, 14, 2, -14 }, // 0x25 '%' - { 84, 10, 13, 14, 2, -12 }, // 0x26 '&' - { 101, 3, 7, 14, 5, -13 }, // 0x27 ''' - { 104, 5, 19, 14, 6, -14 }, // 0x28 '(' - { 116, 5, 19, 14, 3, -14 }, // 0x29 ')' - { 128, 10, 10, 14, 2, -14 }, // 0x2A '*' - { 141, 12, 13, 14, 1, -12 }, // 0x2B '+' - { 161, 5, 7, 14, 4, -2 }, // 0x2C ',' - { 166, 12, 2, 14, 1, -7 }, // 0x2D '-' - { 169, 3, 3, 14, 5, -2 }, // 0x2E '.' - { 171, 10, 20, 14, 2, -16 }, // 0x2F '/' - { 196, 10, 15, 14, 2, -14 }, // 0x30 '0' - { 215, 10, 15, 14, 2, -14 }, // 0x31 '1' - { 234, 10, 15, 14, 2, -14 }, // 0x32 '2' - { 253, 11, 15, 14, 1, -14 }, // 0x33 '3' - { 274, 9, 14, 14, 2, -13 }, // 0x34 '4' - { 290, 10, 15, 14, 2, -14 }, // 0x35 '5' - { 309, 10, 15, 14, 2, -14 }, // 0x36 '6' - { 328, 10, 15, 14, 2, -14 }, // 0x37 '7' - { 347, 10, 15, 14, 2, -14 }, // 0x38 '8' - { 366, 10, 15, 14, 3, -14 }, // 0x39 '9' - { 385, 3, 11, 14, 5, -10 }, // 0x3A ':' - { 390, 4, 15, 14, 4, -10 }, // 0x3B ';' - { 398, 12, 11, 14, 1, -11 }, // 0x3C '<' - { 415, 12, 7, 14, 1, -9 }, // 0x3D '=' - { 426, 12, 11, 14, 1, -11 }, // 0x3E '>' - { 443, 9, 14, 14, 3, -13 }, // 0x3F '?' - { 459, 11, 19, 14, 2, -14 }, // 0x40 '@' - { 486, 15, 14, 14, -1, -13 }, // 0x41 'A' - { 513, 13, 14, 14, 0, -13 }, // 0x42 'B' - { 536, 12, 14, 14, 1, -13 }, // 0x43 'C' - { 557, 12, 14, 14, 1, -13 }, // 0x44 'D' - { 578, 13, 14, 14, 0, -13 }, // 0x45 'E' - { 601, 13, 14, 14, 0, -13 }, // 0x46 'F' - { 624, 13, 14, 14, 1, -13 }, // 0x47 'G' - { 647, 14, 14, 14, 0, -13 }, // 0x48 'H' - { 672, 10, 14, 14, 2, -13 }, // 0x49 'I' - { 690, 13, 14, 14, 1, -13 }, // 0x4A 'J' - { 713, 14, 14, 14, 0, -13 }, // 0x4B 'K' - { 738, 12, 14, 14, 1, -13 }, // 0x4C 'L' - { 759, 14, 14, 14, 0, -13 }, // 0x4D 'M' - { 784, 13, 14, 14, 0, -13 }, // 0x4E 'N' - { 807, 12, 14, 14, 1, -13 }, // 0x4F 'O' - { 828, 12, 14, 14, 0, -13 }, // 0x50 'P' - { 849, 12, 17, 14, 1, -13 }, // 0x51 'Q' - { 875, 14, 14, 14, 0, -13 }, // 0x52 'R' - { 900, 10, 14, 14, 2, -13 }, // 0x53 'S' - { 918, 12, 14, 14, 1, -13 }, // 0x54 'T' - { 939, 12, 14, 14, 1, -13 }, // 0x55 'U' - { 960, 16, 14, 14, -1, -13 }, // 0x56 'V' - { 988, 14, 14, 14, 0, -13 }, // 0x57 'W' - { 1013, 14, 14, 14, 0, -13 }, // 0x58 'X' - { 1038, 12, 14, 14, 1, -13 }, // 0x59 'Y' - { 1059, 10, 14, 14, 2, -13 }, // 0x5A 'Z' - { 1077, 5, 19, 14, 6, -14 }, // 0x5B '[' - { 1089, 10, 20, 14, 2, -16 }, // 0x5C '\' - { 1114, 5, 19, 14, 3, -14 }, // 0x5D ']' - { 1126, 10, 8, 14, 2, -15 }, // 0x5E '^' - { 1136, 14, 2, 14, 0, 4 }, // 0x5F '_' - { 1140, 4, 4, 14, 4, -15 }, // 0x60 '`' - { 1142, 12, 11, 14, 1, -10 }, // 0x61 'a' - { 1159, 13, 15, 14, 0, -14 }, // 0x62 'b' - { 1184, 12, 11, 14, 1, -10 }, // 0x63 'c' - { 1201, 13, 15, 14, 1, -14 }, // 0x64 'd' - { 1226, 12, 11, 14, 1, -10 }, // 0x65 'e' - { 1243, 11, 15, 14, 2, -14 }, // 0x66 'f' - { 1264, 13, 16, 14, 1, -10 }, // 0x67 'g' - { 1290, 14, 15, 14, 0, -14 }, // 0x68 'h' - { 1317, 11, 14, 14, 1, -13 }, // 0x69 'i' - { 1337, 8, 19, 15, 3, -13 }, // 0x6A 'j' - { 1356, 13, 15, 14, 1, -14 }, // 0x6B 'k' - { 1381, 11, 15, 14, 1, -14 }, // 0x6C 'l' - { 1402, 15, 11, 14, 0, -10 }, // 0x6D 'm' - { 1423, 14, 11, 14, 0, -10 }, // 0x6E 'n' - { 1443, 12, 11, 14, 1, -10 }, // 0x6F 'o' - { 1460, 14, 16, 14, 0, -10 }, // 0x70 'p' - { 1488, 14, 16, 14, 0, -10 }, // 0x71 'q' - { 1516, 12, 11, 14, 1, -10 }, // 0x72 'r' - { 1533, 10, 11, 14, 2, -10 }, // 0x73 's' - { 1547, 11, 14, 14, 1, -13 }, // 0x74 't' - { 1567, 13, 11, 14, 0, -10 }, // 0x75 'u' - { 1585, 14, 11, 14, 0, -10 }, // 0x76 'v' - { 1605, 14, 11, 14, 0, -10 }, // 0x77 'w' - { 1625, 14, 11, 14, 0, -10 }, // 0x78 'x' - { 1645, 12, 16, 14, 1, -10 }, // 0x79 'y' - { 1669, 11, 11, 14, 1, -10 }, // 0x7A 'z' - { 1685, 7, 19, 14, 3, -14 }, // 0x7B '{' - { 1702, 2, 19, 14, 6, -14 }, // 0x7C '|' - { 1707, 7, 19, 14, 4, -14 }, // 0x7D '}' - { 1724, 12, 4, 14, 1, -7 } }; // 0x7E '~' - -const GFXfont FreeMonoBold12pt7b = { - (uint8_t *)FreeMonoBold12pt7bBitmaps, - (GFXglyph *)FreeMonoBold12pt7bGlyphs, - 0x20, 0x7E, 24, 17 }; - -// Approx. 2402 bytes diff --git a/components/fb_gfx/component.mk b/components/fb_gfx/component.mk deleted file mode 100755 index 9cfcce520..000000000 --- a/components/fb_gfx/component.mk +++ /dev/null @@ -1,2 +0,0 @@ -COMPONENT_ADD_INCLUDEDIRS := include -COMPONENT_SRCDIRS := . diff --git a/components/fb_gfx/fb_gfx.c b/components/fb_gfx/fb_gfx.c deleted file mode 100644 index ab373c16f..000000000 --- a/components/fb_gfx/fb_gfx.c +++ /dev/null @@ -1,167 +0,0 @@ -// Copyright 2015-2016 Espressif Systems (Shanghai) PTE LTD -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -#include "stdint.h" -#include "stdarg.h" -#include "string.h" -#include "stdio.h" -#include "stdlib.h" -#include "fb_gfx.h" - -typedef struct { // Data stored PER GLYPH - uint16_t bitmapOffset; // Pointer into GFXfont->bitmap - uint8_t width, height; // Bitmap dimensions in pixels - uint8_t xAdvance; // Distance to advance cursor (x axis) - int8_t xOffset, yOffset; // Dist from cursor pos to UL corner -} GFXglyph; - -typedef struct { // Data stored for FONT AS A WHOLE: - uint8_t *bitmap; // Glyph bitmaps, concatenated - GFXglyph *glyph; // Glyph array - uint8_t first, last; // ASCII extents - uint8_t yAdvance; // Newline distance (y axis) - uint8_t yOffset; // Y offset of the font zero line (y axis) -} GFXfont; - -#include "FreeMonoBold12pt7b.h"//14x24 -#define gfxFont ((GFXfont*)(&FreeMonoBold12pt7b)) - -void fb_gfx_fillRect(fb_data_t *fb, int32_t x, int32_t y, int32_t w, int32_t h, uint32_t color) -{ - int32_t line_step = (fb->width - w) * fb->bytes_per_pixel; - uint8_t *data = fb->data + ((x + (y * fb->width)) * fb->bytes_per_pixel); - uint8_t c0 = color >> 16; - uint8_t c1 = color >> 8; - uint8_t c2 = color; - for (int i=0; ibytes_per_pixel == 2){ - data[0] = c1; - data[1] = c2; - } else if(fb->bytes_per_pixel == 1){ - data[0] = c2; - } else { - data[0] = c0; - data[1] = c1; - data[2] = c2; - } - data+=fb->bytes_per_pixel; - } - data += line_step; - } -} - -void fb_gfx_drawFastHLine(fb_data_t *fb, int32_t x, int32_t y, int32_t w, uint32_t color) -{ - fb_gfx_fillRect(fb, x, y, w, 1, color); -} - -void fb_gfx_drawFastVLine(fb_data_t *fb, int32_t x, int32_t y, int32_t h, uint32_t color) -{ - fb_gfx_fillRect(fb, x, y, 1, h, color); -} - -uint8_t fb_gfx_putc(fb_data_t *fb, int32_t x, int32_t y, uint32_t color, unsigned char c) -{ - uint16_t line_width; - uint8_t xa = 0, bit = 0, bits = 0, xx, yy; - uint8_t *bitmap; - GFXglyph *glyph; - - if ((c < 32) || (c < gfxFont->first) || (c > gfxFont->last)) { - return xa; - } - - c -= gfxFont->first; - - glyph = &(gfxFont->glyph[c]); - bitmap = gfxFont->bitmap + glyph->bitmapOffset; - - xa = glyph->xAdvance; - x += glyph->xOffset; - y += glyph->yOffset; - y += gfxFont->yOffset; - line_width = 0; - - for(yy=0; yyheight; yy++) { - for(xx=0; xxwidth; xx++) { - if(bit == 0) { - bits = *bitmap++; - bit = 0x80; - } - if(bits & bit) { - line_width++; - } else if (line_width) { - fb_gfx_drawFastHLine(fb, x+xx-line_width, y+yy, line_width, color); - line_width=0; - } - bit >>= 1; - } - if (line_width) { - fb_gfx_drawFastHLine(fb, x+xx-line_width, y+yy, line_width, color); - line_width=0; - } - } - return xa; -} - -uint32_t fb_gfx_print(fb_data_t *fb, int32_t x, int32_t y, uint32_t color, const char * str) -{ - uint32_t l = 0; - int xc = x, yc = y, lc = fb->width - gfxFont->glyph[0].xAdvance; - uint8_t fh = gfxFont->yAdvance; - char c = *str++; - while(c){ - if(c != '\r'){ - if(c == '\n'){ - yc += fh; - xc = x; - } else { - if(xc > lc){ - yc += fh; - xc = x; - } - xc += fb_gfx_putc(fb, xc, yc, color, c); - } - } - l++; - c = *str++; - } - return l; -} - -uint32_t fb_gfx_printf(fb_data_t *fb, int32_t x, int32_t y, uint32_t color, const char *format, ...) -{ - char loc_buf[64]; - char * temp = loc_buf; - int len; - va_list arg; - va_list copy; - va_start(arg, format); - va_copy(copy, arg); - len = vsnprintf(loc_buf, sizeof(loc_buf), format, arg); - va_end(copy); - if(len >= sizeof(loc_buf)){ - temp = (char*)malloc(len+1); - if(temp == NULL) { - return 0; - } - } - vsnprintf(temp, len+1, format, arg); - va_end(arg); - fb_gfx_print(fb, x, y, color, temp); - if(len > 64){ - free(temp); - } - return len; -} diff --git a/components/fb_gfx/include/fb_gfx.h b/components/fb_gfx/include/fb_gfx.h deleted file mode 100644 index 158c80f6b..000000000 --- a/components/fb_gfx/include/fb_gfx.h +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright 2015-2016 Espressif Systems (Shanghai) PTE LTD -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -#ifndef _FB_GFX_H_ -#define _FB_GFX_H_ - -#ifdef __cplusplus -extern "C" { -#endif - - typedef enum { - FB_RGB888, FB_BGR888, FB_RGB565, FB_BGR565, FB_GRAY - } fb_format_t; - - typedef struct { - int width; - int height; - int bytes_per_pixel; - fb_format_t format; - uint8_t * data; - } fb_data_t; - - void fb_gfx_fillRect (fb_data_t *fb, int32_t x, int32_t y, int32_t w, int32_t h, uint32_t color); - void fb_gfx_drawFastHLine(fb_data_t *fb, int32_t x, int32_t y, int32_t w, uint32_t color); - void fb_gfx_drawFastVLine(fb_data_t *fb, int32_t x, int32_t y, int32_t h, uint32_t color); - uint8_t fb_gfx_putc (fb_data_t *fb, int32_t x, int32_t y, uint32_t color, unsigned char c); - uint32_t fb_gfx_print (fb_data_t *fb, int32_t x, int32_t y, uint32_t color, const char * str); - uint32_t fb_gfx_printf (fb_data_t *fb, int32_t x, int32_t y, uint32_t color, const char *format, ...); - -#ifdef __cplusplus -} -#endif - -#endif /* _FB_GFX_H_ */ diff --git a/configs/CMakeLists.txt b/configs/CMakeLists.txt new file mode 100644 index 000000000..294b1be4c --- /dev/null +++ b/configs/CMakeLists.txt @@ -0,0 +1,315 @@ +# Check ESP-IDF version and error out if it is not in the supported range. +# +# Note for arduino-esp32 developers: to bypass the version check locally, +# set ARDUINO_SKIP_IDF_VERSION_CHECK environment variable to 1. For example: +# export ARDUINO_SKIP_IDF_VERSION_CHECK=1 +# idf.py build + +set(min_supported_idf_version "5.1.0") +set(max_supported_idf_version "5.1.99") +set(idf_version "${IDF_VERSION_MAJOR}.${IDF_VERSION_MINOR}.${IDF_VERSION_PATCH}") + +if ("${idf_version}" AND NOT "$ENV{ARDUINO_SKIP_IDF_VERSION_CHECK}") + if (idf_version VERSION_LESS min_supported_idf_version) + message(FATAL_ERROR "Arduino-esp32 can be used with ESP-IDF versions " + "between ${min_supported_idf_version} and ${max_supported_idf_version}, " + "but an older version is detected: ${idf_version}.") + endif() + if (idf_version VERSION_GREATER max_supported_idf_version) + message(FATAL_ERROR "Arduino-esp32 can be used with ESP-IDF versions " + "between ${min_supported_idf_version} and ${max_supported_idf_version}, " + "but a newer version is detected: ${idf_version}.") + endif() +endif() + +set(CORE_SRCS + cores/esp32/base64.cpp + cores/esp32/cbuf.cpp + cores/esp32/chip-debug-report.cpp + cores/esp32/esp32-hal-adc.c + cores/esp32/esp32-hal-bt.c + cores/esp32/esp32-hal-cpu.c + cores/esp32/esp32-hal-dac.c + cores/esp32/esp32-hal-gpio.c + cores/esp32/esp32-hal-i2c.c + cores/esp32/esp32-hal-i2c-slave.c + cores/esp32/esp32-hal-ledc.c + cores/esp32/esp32-hal-matrix.c + cores/esp32/esp32-hal-misc.c + cores/esp32/esp32-hal-periman.c + cores/esp32/esp32-hal-psram.c + cores/esp32/esp32-hal-rgb-led.c + cores/esp32/esp32-hal-sigmadelta.c + cores/esp32/esp32-hal-spi.c + cores/esp32/esp32-hal-time.c + cores/esp32/esp32-hal-timer.c + cores/esp32/esp32-hal-tinyusb.c + cores/esp32/esp32-hal-touch.c + cores/esp32/esp32-hal-uart.c + cores/esp32/esp32-hal-rmt.c + cores/esp32/Esp.cpp + cores/esp32/FunctionalInterrupt.cpp + cores/esp32/HardwareSerial.cpp + cores/esp32/HEXBuilder.cpp + cores/esp32/IPAddress.cpp + cores/esp32/libb64/cdecode.c + cores/esp32/libb64/cencode.c + cores/esp32/MacAddress.cpp + cores/esp32/main.cpp + cores/esp32/MD5Builder.cpp + cores/esp32/Print.cpp + cores/esp32/SHA1Builder.cpp + cores/esp32/stdlib_noniso.c + cores/esp32/Stream.cpp + cores/esp32/StreamString.cpp + cores/esp32/Tone.cpp + cores/esp32/HWCDC.cpp + cores/esp32/USB.cpp + cores/esp32/USBCDC.cpp + cores/esp32/USBMSC.cpp + cores/esp32/FirmwareMSC.cpp + cores/esp32/firmware_msc_fat.c + cores/esp32/wiring_pulse.c + cores/esp32/wiring_shift.c + cores/esp32/WMath.cpp + cores/esp32/WString.cpp + ) + +set(ARDUINO_ALL_LIBRARIES + ArduinoOTA + AsyncUDP + BLE + BluetoothSerial + DNSServer + EEPROM + ESP_I2S + ESP_NOW + ESPmDNS + Ethernet + FFat + FS + HTTPClient + HTTPUpdate + LittleFS + NetBIOS + Network + PPP + Preferences + SD_MMC + SD + SimpleBLE + SPI + Ticker + Update + USB + WebServer + NetworkClientSecure + WiFi + WiFiProv + Wire + ) + +set(ARDUINO_LIBRARY_ArduinoOTA_SRCS libraries/ArduinoOTA/src/ArduinoOTA.cpp) +set(ARDUINO_LIBRARY_ArduinoOTA_REQUIRES esp_https_ota) + +set(ARDUINO_LIBRARY_AsyncUDP_SRCS libraries/AsyncUDP/src/AsyncUDP.cpp) + +set(ARDUINO_LIBRARY_BluetoothSerial_SRCS + libraries/BluetoothSerial/src/BluetoothSerial.cpp + libraries/BluetoothSerial/src/BTAddress.cpp + libraries/BluetoothSerial/src/BTAdvertisedDeviceSet.cpp + libraries/BluetoothSerial/src/BTScanResultsSet.cpp) + +set(ARDUINO_LIBRARY_DNSServer_SRCS libraries/DNSServer/src/DNSServer.cpp) + +set(ARDUINO_LIBRARY_EEPROM_SRCS libraries/EEPROM/src/EEPROM.cpp) + +set(ARDUINO_LIBRARY_ESP_I2S_SRCS libraries/ESP_I2S/src/ESP_I2S.cpp) + +set(ARDUINO_LIBRARY_ESP_NOW_SRCS + libraries/ESP_NOW/src/ESP32_NOW.cpp + libraries/ESP_NOW/src/ESP32_NOW_Serial.cpp) + +set(ARDUINO_LIBRARY_ESPmDNS_SRCS libraries/ESPmDNS/src/ESPmDNS.cpp) + +set(ARDUINO_LIBRARY_Ethernet_SRCS libraries/Ethernet/src/ETH.cpp) + +set(ARDUINO_LIBRARY_FFat_SRCS libraries/FFat/src/FFat.cpp) + +set(ARDUINO_LIBRARY_FS_SRCS + libraries/FS/src/FS.cpp + libraries/FS/src/vfs_api.cpp) + +set(ARDUINO_LIBRARY_HTTPClient_SRCS libraries/HTTPClient/src/HTTPClient.cpp) + +set(ARDUINO_LIBRARY_HTTPUpdate_SRCS libraries/HTTPUpdate/src/HTTPUpdate.cpp) + +set(ARDUINO_LIBRARY_LittleFS_SRCS libraries/LittleFS/src/LittleFS.cpp) + +set(ARDUINO_LIBRARY_NetBIOS_SRCS libraries/NetBIOS/src/NetBIOS.cpp) + +set(ARDUINO_LIBRARY_PPP_SRCS + libraries/PPP/src/PPP.cpp + libraries/PPP/src/ppp.c) + +set(ARDUINO_LIBRARY_Preferences_SRCS libraries/Preferences/src/Preferences.cpp) + +set(ARDUINO_LIBRARY_SD_MMC_SRCS libraries/SD_MMC/src/SD_MMC.cpp) + +set(ARDUINO_LIBRARY_SD_SRCS + libraries/SD/src/SD.cpp + libraries/SD/src/sd_diskio.cpp + libraries/SD/src/sd_diskio_crc.c) + +set(ARDUINO_LIBRARY_SimpleBLE_SRCS libraries/SimpleBLE/src/SimpleBLE.cpp) + +set(ARDUINO_LIBRARY_SPI_SRCS libraries/SPI/src/SPI.cpp) + +set(ARDUINO_LIBRARY_Ticker_SRCS libraries/Ticker/src/Ticker.cpp) + +set(ARDUINO_LIBRARY_Update_SRCS + libraries/Update/src/Updater.cpp + libraries/Update/src/HttpsOTAUpdate.cpp) + +set(ARDUINO_LIBRARY_USB_SRCS + libraries/USB/src/USBHID.cpp + libraries/USB/src/USBMIDI.cpp + libraries/USB/src/USBHIDMouse.cpp + libraries/USB/src/USBHIDKeyboard.cpp + libraries/USB/src/USBHIDGamepad.cpp + libraries/USB/src/USBHIDConsumerControl.cpp + libraries/USB/src/USBHIDSystemControl.cpp + libraries/USB/src/USBHIDVendor.cpp + libraries/USB/src/USBVendor.cpp) + +set(ARDUINO_LIBRARY_WebServer_SRCS + libraries/WebServer/src/WebServer.cpp + libraries/WebServer/src/Parsing.cpp + libraries/WebServer/src/detail/mimetable.cpp) + +set(ARDUINO_LIBRARY_NetworkClientSecure_SRCS + libraries/NetworkClientSecure/src/ssl_client.cpp + libraries/NetworkClientSecure/src/NetworkClientSecure.cpp) + +set(ARDUINO_LIBRARY_Network_SRCS + libraries/Network/src/NetworkInterface.cpp + libraries/Network/src/NetworkEvents.cpp + libraries/Network/src/NetworkManager.cpp + libraries/Network/src/NetworkClient.cpp + libraries/Network/src/NetworkServer.cpp + libraries/Network/src/NetworkUdp.cpp) + +set(ARDUINO_LIBRARY_WiFi_SRCS + libraries/WiFi/src/WiFiAP.cpp + libraries/WiFi/src/WiFi.cpp + libraries/WiFi/src/WiFiGeneric.cpp + libraries/WiFi/src/WiFiMulti.cpp + libraries/WiFi/src/WiFiScan.cpp + libraries/WiFi/src/WiFiSTA.cpp + libraries/WiFi/src/STA.cpp + libraries/WiFi/src/AP.cpp) + +set(ARDUINO_LIBRARY_WiFiProv_SRCS libraries/WiFiProv/src/WiFiProv.cpp) + +set(ARDUINO_LIBRARY_Wire_SRCS libraries/Wire/src/Wire.cpp) + +set(ARDUINO_LIBRARY_BLE_SRCS + libraries/BLE/src/BLE2902.cpp + libraries/BLE/src/BLE2904.cpp + libraries/BLE/src/BLEAddress.cpp + libraries/BLE/src/BLEAdvertisedDevice.cpp + libraries/BLE/src/BLEAdvertising.cpp + libraries/BLE/src/BLEBeacon.cpp + libraries/BLE/src/BLECharacteristic.cpp + libraries/BLE/src/BLECharacteristicMap.cpp + libraries/BLE/src/BLEClient.cpp + libraries/BLE/src/BLEDescriptor.cpp + libraries/BLE/src/BLEDescriptorMap.cpp + libraries/BLE/src/BLEDevice.cpp + libraries/BLE/src/BLEEddystoneTLM.cpp + libraries/BLE/src/BLEEddystoneURL.cpp + libraries/BLE/src/BLEExceptions.cpp + libraries/BLE/src/BLEHIDDevice.cpp + libraries/BLE/src/BLERemoteCharacteristic.cpp + libraries/BLE/src/BLERemoteDescriptor.cpp + libraries/BLE/src/BLERemoteService.cpp + libraries/BLE/src/BLEScan.cpp + libraries/BLE/src/BLESecurity.cpp + libraries/BLE/src/BLEServer.cpp + libraries/BLE/src/BLEService.cpp + libraries/BLE/src/BLEServiceMap.cpp + libraries/BLE/src/BLEUtils.cpp + libraries/BLE/src/BLEUUID.cpp + libraries/BLE/src/BLEValue.cpp + libraries/BLE/src/FreeRTOS.cpp + libraries/BLE/src/GeneralUtils.cpp + ) + +set(ARDUINO_LIBRARIES_SRCS) +set(ARDUINO_LIBRARIES_REQUIRES) +set(ARDUINO_LIBRARIES_INCLUDEDIRS) +foreach(libname IN LISTS ARDUINO_ALL_LIBRARIES) + if(NOT CONFIG_ARDUINO_SELECTIVE_COMPILATION OR CONFIG_ARDUINO_SELECTIVE_${libname}) + if(ARDUINO_LIBRARY_${libname}_SRCS) + list(APPEND ARDUINO_LIBRARIES_SRCS ${ARDUINO_LIBRARY_${libname}_SRCS}) + endif() + if(ARDUINO_LIBRARY_${libname}_REQUIRES) + list(APPEND ARDUINO_LIBRARIES_REQUIRES ${ARDUINO_LIBRARY_${libname}_REQUIRES}) + endif() + if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/libraries/${libname}/src) + list(APPEND ARDUINO_LIBRARIES_INCLUDEDIRS libraries/${libname}/src) + endif() + endif() +endforeach() + +set(includedirs variants/${CONFIG_ARDUINO_VARIANT}/ cores/esp32/ ${ARDUINO_LIBRARIES_INCLUDEDIRS}) +set(srcs ${CORE_SRCS} ${ARDUINO_LIBRARIES_SRCS}) +set(priv_includes cores/esp32/libb64) +set(requires spi_flash esp_partition mbedtls wifi_provisioning wpa_supplicant esp_adc esp_eth http_parser) +set(priv_requires fatfs nvs_flash app_update bootloader_support bt esp_hid usb ${ARDUINO_LIBRARIES_REQUIRES}) + +idf_component_register(INCLUDE_DIRS ${includedirs} PRIV_INCLUDE_DIRS ${priv_includes} SRCS ${srcs} REQUIRES ${requires} PRIV_REQUIRES ${priv_requires}) + +if(NOT CONFIG_FREERTOS_HZ EQUAL 1000 AND NOT "$ENV{ARDUINO_SKIP_TICK_CHECK}") + # See delay() in cores/esp32/esp32-hal-misc.c. + message(FATAL_ERROR "esp32-arduino requires CONFIG_FREERTOS_HZ=1000 " + "(currently ${CONFIG_FREERTOS_HZ})") +endif() + +string(TOUPPER ${CONFIG_ARDUINO_VARIANT} idf_target_caps) +string(REPLACE "-" "_" idf_target_for_macro "${idf_target_caps}") +target_compile_options(${COMPONENT_TARGET} PUBLIC + -DARDUINO=10812 + -DARDUINO_${idf_target_for_macro}_DEV + -DARDUINO_ARCH_ESP32 + -DARDUINO_BOARD="${idf_target_caps}_DEV" + -DARDUINO_VARIANT="${CONFIG_ARDUINO_VARIANT}" + -DESP32) + +if(CONFIG_AUTOSTART_ARDUINO) + # in autostart mode, arduino-esp32 contains app_main() function and needs to + # reference setup() and loop() in the main component. If we add main + # component to priv_requires then we create a large circular dependency + # (arduino-esp32 -> main -> arduino-esp32) and can get linker errors, so + # instead we add setup() and loop() to the undefined symbols list so the + # linker will always include them. + # + # (As they are C++ symbol, we need to add the C++ mangled names.) + target_link_libraries(${COMPONENT_LIB} INTERFACE "-u _Z5setupv -u _Z4loopv") +endif() + +# This function adds a dependency on the given component if the component is included into the build. +function(maybe_add_component component_name) + idf_build_get_property(components BUILD_COMPONENTS) + if (${component_name} IN_LIST components) + idf_component_get_property(lib_name ${component_name} COMPONENT_LIB) + target_link_libraries(${COMPONENT_LIB} PUBLIC ${lib_name}) + endif() +endfunction() + +if(IDF_TARGET MATCHES "esp32s2|esp32s3" AND CONFIG_TINYUSB_ENABLED) + maybe_add_component(arduino_tinyusb) +endif() +if(NOT CONFIG_ARDUINO_SELECTIVE_COMPILATION OR CONFIG_ARDUINO_SELECTIVE_ArduinoOTA) + maybe_add_component(esp_https_ota) +endif() \ No newline at end of file diff --git a/configs/builds.json b/configs/builds.json index e34813cfa..663469276 100644 --- a/configs/builds.json +++ b/configs/builds.json @@ -131,7 +131,7 @@ }, { "target": "esp32s3", - "features":["esp_sr"], + "features":[""], "idf_libs":["qio","80m","qio_ram"], "bootloaders":[ ["qio","120m","qio_ram"], @@ -148,4 +148,4 @@ ] } ] -} +} \ No newline at end of file diff --git a/configs/defconfig.120m b/configs/defconfig.120m index a21a8285e..11d11177f 100644 --- a/configs/defconfig.120m +++ b/configs/defconfig.120m @@ -1,2 +1,3 @@ CONFIG_ESPTOOLPY_FLASHFREQ_120M=y -CONFIG_SPIRAM_SPEED_120M=y \ No newline at end of file +CONFIG_SPIRAM_SPEED_120M=y +CONFIG_SPI_FLASH_HPM_ENA=y diff --git a/configs/defconfig.16m b/configs/defconfig.16m index b7916fbce..8fd9f172b 100644 --- a/configs/defconfig.16m +++ b/configs/defconfig.16m @@ -1 +1 @@ -CONFIG_ESPTOOLPY_FLASHFREQ_16M=y \ No newline at end of file +CONFIG_ESPTOOLPY_FLASHFREQ_16M=y diff --git a/configs/defconfig.60m b/configs/defconfig.60m index 797665f52..89cbdbefa 100644 --- a/configs/defconfig.60m +++ b/configs/defconfig.60m @@ -1 +1 @@ -CONFIG_ESPTOOLPY_FLASHFREQ_60M=y +CONFIG_ESPTOOLPY_FLASHFREQ_60M=y \ No newline at end of file diff --git a/configs/defconfig.64m b/configs/defconfig.64m index c33173f13..c0d361666 100644 --- a/configs/defconfig.64m +++ b/configs/defconfig.64m @@ -1 +1 @@ -CONFIG_ESPTOOLPY_FLASHFREQ_64M=y \ No newline at end of file +CONFIG_ESPTOOLPY_FLASHFREQ_64M=y diff --git a/configs/defconfig.common b/configs/defconfig.common index f3fe66f9d..02b65daa6 100644 --- a/configs/defconfig.common +++ b/configs/defconfig.common @@ -1,106 +1,251 @@ CONFIG_AUTOSTART_ARDUINO=y +# CONFIG_APP_EXCLUDE_PROJECT_VER_VAR is not set +# CONFIG_APP_EXCLUDE_PROJECT_NAME_VAR is not set # CONFIG_WS2812_LED_ENABLE is not set -CONFIG_ARDUHAL_ESP_LOG=y + +CONFIG_BOOTLOADER_LOG_LEVEL_WARN=y +CONFIG_BOOTLOADER_LOG_LEVEL=2 CONFIG_BOOTLOADER_APP_ROLLBACK_ENABLE=y CONFIG_BOOTLOADER_SKIP_VALIDATE_IN_DEEP_SLEEP=y -CONFIG_BT_BLE_BLUFI_ENABLE=y -CONFIG_BT_BLE_42_FEATURES_SUPPORTED=y -CONFIG_BT_BTC_TASK_STACK_SIZE=8192 -CONFIG_BT_BTU_TASK_STACK_SIZE=8192 -CONFIG_BLE_MESH=y +CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_SIZE=y + CONFIG_COMPILER_OPTIMIZATION_SIZE=y +# CONFIG_COMPILER_OPTIMIZATION_PERF is not set CONFIG_COMPILER_CXX_EXCEPTIONS=y +CONFIG_COMPILER_OPTIMIZATION_LEVEL_RELEASE=y +# CONFIG_COMPILER_HIDE_PATHS_MACROS is not set +# CONFIG_COMPILER_OPTIMIZATION_CHECKS_SILENT is not set CONFIG_COMPILER_STACK_CHECK_MODE_NORM=y +CONFIG_COMPILER_STACK_CHECK=y +# CONFIG_COMPILER_STACK_CHECK_MODE_NONE is not set CONFIG_COMPILER_WARN_WRITE_STRINGS=y + +CONFIG_LOG_DEFAULT_LEVEL_ERROR=y +CONFIG_LOG_DEFAULT_LEVEL=1 +CONFIG_LOG_MAXIMUM_EQUALS_DEFAULT=y +CONFIG_LOG_MAXIMUM_LEVEL_ERROR=y +CONFIG_LOG_MAXIMUM_LEVEL=1 +CONFIG_LOG_TIMESTAMP_SOURCE_RTOS=y +CONFIG_ARDUHAL_ESP_LOG=y +CONFIG_ARDUHAL_LOG_DEFAULT_LEVEL_INFO=y +CONFIG_ARDUHAL_LOG_DEFAULT_LEVEL=3 +CONFIG_LOG_COLORS=n + CONFIG_ESP_HTTPS_SERVER_ENABLE=y CONFIG_ESP_HTTP_CLIENT_ENABLE_BASIC_AUTH=y + +CONFIG_ESP_SYSTEM_ESP32_SRAM1_REGION_AS_IRAM=y CONFIG_ESP_INT_WDT_TIMEOUT_MS=300 CONFIG_ESP_IPC_TASK_STACK_SIZE=1024 CONFIG_ESP_MAIN_TASK_STACK_SIZE=4096 CONFIG_ESP_SYSTEM_EVENT_TASK_STACK_SIZE=2048 CONFIG_ESP_TASK_WDT_PANIC=y CONFIG_ESP_TIMER_TASK_STACK_SIZE=4096 + CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y -CONFIG_ESP_WIFI_FTM_ENABLE=y +CONFIG_ESPTOOLPY_HEADER_FLASHSIZE_UPDATE=y + +CONFIG_ESP_WIFI_11R_SUPPORT=y +# CONFIG_ESP_WIFI_FTM_ENABLE is not set CONFIG_ESP_WIFI_STATIC_RX_BUFFER_NUM=8 CONFIG_ESP_WIFI_STATIC_TX_BUFFER_NUM=8 CONFIG_ESP_WIFI_CACHE_TX_BUFFER_NUM=16 -CONFIG_ESP_WIFI_CSI_ENABLED=y +# CONFIG_ESP_WIFI_CSI_ENABLED is not set CONFIG_ESP_WIFI_ENABLE_WPA3_SAE=y -# CONFIG_ESP_WIFI_IRAM_OPT is not set -# CONFIG_ESP_WIFI_RX_IRAM_OPT is not set -CONFIG_ETH_SPI_ETHERNET_DM9051=y -CONFIG_ETH_SPI_ETHERNET_W5500=y -CONFIG_ETH_SPI_ETHERNET_KSZ8851SNL=y +CONFIG_ESP_WIFI_ENABLE_SAE_PK=y +# CONFIG_ESP_WIFI_ENTERPRISE_SUPPORT is not set +CONFIG_ESP_WIFI_MBEDTLS_TLS_CLIENT=y +# CONFIG_ESP_WIFI_SOFTAP_SAE_SUPPORT is not set +# CONFIG_ESP_WIFI_ENABLE_WPA3_OWE_STA is not set +# CONFIG_ESP_WIFI_ESPNOW_MAX_ENCRYPT_NUM is not set +# CONFIG_ESP_WIFI_MBEDTLS_CRYPTO is not set +CONFIG_ESP_WIFI_IRAM_OPT=y +CONFIG_ESP_WIFI_RX_IRAM_OPT=y + CONFIG_FATFS_CODEPAGE_850=y CONFIG_FATFS_LFN_STACK=y # CONFIG_FATFS_API_ENCODING_ANSI_OEM is not set CONFIG_FATFS_API_ENCODING_UTF_8=y -CONFIG_FATFS_USE_LABEL=y + # CONFIG_FMB_CONTROLLER_SLAVE_ID_SUPPORT is not set CONFIG_FMB_TIMER_PORT_ENABLED=y + CONFIG_FREERTOS_HZ=1000 -CONFIG_FREERTOS_ENABLE_BACKWARD_COMPATIBILITY=y +CONFIG_FREERTOS_WATCHPOINT_END_OF_STACK=y +CONFIG_FREERTOS_USE_TRACE_FACILITY=y +CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y +CONFIG_FREERTOS_VTASKLIST_INCLUDE_COREID=y +# CONFIG_FREERTOS_ENABLE_BACKWARD_COMPATIBILITY is not set # CONFIG_FREERTOS_ASSERT_ON_UNTESTED_FUNCTION is not set +# CONFIG_FREERTOS_ENABLE_TASK_SNAPSHOT is not set CONFIG_FREERTOS_IDLE_TASK_STACKSIZE=1024 +# CONFIG_FREERTOS_FPU_IN_ISR is not set +CONFIG_FREERTOS_PLACE_FUNCTIONS_INTO_FLASH=y +CONFIG_FREERTOS_PLACE_SNAPSHOT_FUNS_INTO_FLASH=y +CONFIG_FREERTOS_ISR_STACKSIZE=1536 + CONFIG_HEAP_POISONING_LIGHT=y CONFIG_HTTPD_MAX_REQ_HDR_LEN=1024 CONFIG_HTTPD_WS_SUPPORT=y -# CONFIG_LOG_COLORS is not set -CONFIG_LWIP_ETHARP_TRUST_IP_MAC=y + +CONFIG_LWIP_MAX_SOCKETS=16 +CONFIG_LWIP_SO_RCVBUF=y +CONFIG_LWIP_IP_FORWARD=y +CONFIG_LWIP_IPV4_NAPT=y # CONFIG_LWIP_DHCP_DOES_ARP_CHECK is not set CONFIG_LWIP_TCP_SYNMAXRTX=6 CONFIG_LWIP_TCP_MSS=1436 CONFIG_LWIP_TCP_RTO_TIME=3000 -CONFIG_LWIP_TCPIP_TASK_STACK_SIZE=4096 +CONFIG_LWIP_TCP_MSL=6000 +CONFIG_LWIP_TCP_FIN_WAIT_TIMEOUT=2000 +CONFIG_LWIP_TCPIP_TASK_STACK_SIZE=2560 CONFIG_LWIP_TCPIP_TASK_AFFINITY_CPU0=y +CONFIG_LWIP_IPV6_AUTOCONFIG=y +CONFIG_LWIP_IPV6_DHCP6=y +CONFIG_LWIP_IPV6_RDNSS_MAX_DNS_SERVERS=2 CONFIG_LWIP_MAX_SOCKETS=16 -CONFIG_LWIP_IP_FORWARD=y -CONFIG_LWIP_IPV4_NAPT=y CONFIG_LWIP_DHCP_RESTORE_LAST_IP=n CONFIG_LWIP_DHCP_OPTIONS_LEN=128 CONFIG_LWIP_SNTP_MAX_SERVERS=3 -CONFIG_LWIP_SNTP_UPDATE_DELAY=10800000 CONFIG_LWIP_DHCP_GET_NTP_SRV=y -CONFIG_LWIP_IPV6_AUTOCONFIG=y -CONFIG_LWIP_IPV6_DHCP6=y -CONFIG_LWIP_IPV6_RDNSS_MAX_DNS_SERVERS=2 -CONFIG_LWIP_PPP_SUPPORT=y -CONFIG_LWIP_PPP_NOTIFY_PHASE_SUPPORT=y -CONFIG_LWIP_PPP_PAP_SUPPORT=y -CONFIG_LWIP_PPP_ENABLE_IPV6=n -CONFIG_MBEDTLS_PSK_MODES=y -CONFIG_MBEDTLS_KEY_EXCHANGE_PSK=y -CONFIG_MBEDTLS_CAMELLIA_C=y +CONFIG_LWIP_SNTP_UPDATE_DELAY=3600000 +CONFIG_LWIP_TCPIP_RECVMBOX_SIZE=48 +CONFIG_LWIP_TCP_RECVMBOX_SIZE=16 +CONFIG_LWIP_UDP_RECVMBOX_SIZE=64 + +CONFIG_MBEDTLS_CERTIFICATE_BUNDLE=y +CONFIG_MBEDTLS_CERTIFICATE_BUNDLE_DEFAULT_FULL=y +CONFIG_MBEDTLS_TLS_DISABLED=y # CONFIG_MBEDTLS_ASYMMETRIC_CONTENT_LEN is not set -CONFIG_MBEDTLS_SSL_PROTO_DTLS=y +CONFIG_MBEDTLS_CERTIFICATE_BUNDLE_MAX_CERTS=10 +# CONFIG_MBEDTLS_SSL_KEEP_PEER_CERTIFICATE is not set +# CONFIG_MBEDTLS_PKCS7_C is not set +# CONFIG_MBEDTLS_ERROR_STRINGS is not set + +# +# Symmetric Ciphers +# +CONFIG_MBEDTLS_AES_C=y +# CONFIG_MBEDTLS_CAMELLIA_C is not set +# CONFIG_MBEDTLS_DES_C is not set +# CONFIG_MBEDTLS_BLOWFISH_C is not set +# CONFIG_MBEDTLS_XTEA_C is not set +# CONFIG_MBEDTLS_CCM_C is not set +# CONFIG_MBEDTLS_GCM_C is not set +# CONFIG_MBEDTLS_NIST_KW_C is not set +# end of Symmetric Ciphers + + +# +# TLS Key Exchange Methods +# + +CONFIG_MBEDTLS_KEY_EXCHANGE_RSA=y +# CONFIG_MBEDTLS_PSK_MODES is not set +# CONFIG_MBEDTLS_KEY_EXCHANGE_ELLIPTIC_CURVE is not set +# CONFIG_MBEDTLS_KEY_EXCHANGE_ECDHE_RSA is not set +# CONFIG_MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA is not set +# CONFIG_MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA is not set +# CONFIG_MBEDTLS_KEY_EXCHANGE_ECDH_RSA is not set + +CONFIG_MBEDTLS_SSL_PROTO_TLS1_2=y +# CONFIG_MBEDTLS_SSL_RENEGOTIATION is not set +# CONFIG_MBEDTLS_SSL_PROTO_GMTSSL1_1 is not set +# CONFIG_MBEDTLS_SSL_PROTO_DTLS is not set +# CONFIG_MBEDTLS_SSL_ALPN is not set +# CONFIG_MBEDTLS_CLIENT_SSL_SESSION_TICKETS is not set + +CONFIG_MBEDTLS_CMAC_C=y +CONFIG_MBEDTLS_ROM_MD5=y +CONFIG_MBEDTLS_HARDWARE_ECC=y +CONFIG_MBEDTLS_HARDWARE_AES=y +CONFIG_MBEDTLS_HARDWARE_MPI=y +CONFIG_MBEDTLS_HARDWARE_SHA=y +# CONFIG_MBEDTLS_ECC_OTHER_CURVES_SOFT_FALLBACK is not set +# CONFIG_MBEDTLS_HAVE_TIME is not set +# CONFIG_MBEDTLS_ECDSA_DETERMINISTIC is not set +# CONFIG_MBEDTLS_SHA512_C is not set +# CONFIG_MBEDTLS_RIPEMD160_C is not set + +# +# Certificates +# +# CONFIG_MBEDTLS_PEM_PARSE_C is not set +# CONFIG_MBEDTLS_PEM_WRITE_C is not set +# CONFIG_MBEDTLS_X509_CRL_PARSE_C is not set +# CONFIG_MBEDTLS_X509_CSR_PARSE_C is not set +# end of Certificates + +CONFIG_MBEDTLS_ECP_C=y +CONFIG_MBEDTLS_ECDH_C=y +CONFIG_MBEDTLS_ECDSA_C=y +CONFIG_MBEDTLS_ECP_DP_SECP256R1_ENABLED=y +# CONFIG_MBEDTLS_DHM_C is not set +# CONFIG_MBEDTLS_ECJPAKE_C is not set +# CONFIG_MBEDTLS_CLIENT_SSL_SESSION_TICKETS is not set +# CONFIG_MBEDTLS_SERVER_SSL_SESSION_TICKETS is not set +# CONFIG_MBEDTLS_ECP_DP_SECP192R1_ENABLED is not set +# CONFIG_MBEDTLS_ECP_DP_SECP224R1_ENABLED is not set +# CONFIG_MBEDTLS_ECP_DP_BP256R1_ENABLED is not set +# CONFIG_MBEDTLS_ECP_DP_SECP384R1_ENABLED is not set +# CONFIG_MBEDTLS_ECP_DP_SECP521R1_ENABLED is not set +# CONFIG_MBEDTLS_ECP_DP_SECP192K1_ENABLED is not set +# CONFIG_MBEDTLS_ECP_DP_SECP224K1_ENABLED is not set +# CONFIG_MBEDTLS_ECP_DP_SECP256K1_ENABLED is not set +# CONFIG_MBEDTLS_ECP_DP_BP384R1_ENABLED is not set +# CONFIG_MBEDTLS_ECP_DP_BP512R1_ENABLED is not set +# CONFIG_MBEDTLS_ECP_DP_CURVE25519_ENABLED is not set +# CONFIG_MBEDTLS_ECP_FIXED_POINT_OPTIM is not set +# CONFIG_MBEDTLS_ECP_NIST_OPTIM is not set +# CONFIG_MBEDTLS_SSL_PROTO_GMTSSL1_1 is not set +# CONFIG_MBEDTLS_SSL_PROTO_DTLS is not set + CONFIG_OPENSSL_ASSERT_DO_NOTHING=y CONFIG_PTHREAD_TASK_STACK_SIZE_DEFAULT=2048 +CONFIG_SPI_FLASH_DANGEROUS_WRITE_ALLOWED=y +# CONFIG_SPI_FLASH_ENABLE_ENCRYPTED_READ_WRITE is not set CONFIG_SPI_FLASH_YIELD_DURING_ERASE=y CONFIG_SPI_FLASH_ERASE_YIELD_DURATION_MS=10 CONFIG_SPI_FLASH_ERASE_YIELD_TICKS=2 CONFIG_SPI_FLASH_WRITE_CHUNK_SIZE=4096 # CONFIG_SPI_MASTER_ISR_IN_IRAM is not set # CONFIG_SPI_SLAVE_ISR_IN_IRAM is not set -CONFIG_SPIRAM_MALLOC_ALWAYSINTERNAL=4096 -CONFIG_SPIRAM_MALLOC_RESERVE_INTERNAL=0 -CONFIG_ESP_RMAKER_SKIP_VERSION_CHECK=y -CONFIG_ESP_RMAKER_USER_ID_CHECK=y -CONFIG_ESP_INSIGHTS_ENABLED=y -CONFIG_ESP_INSIGHTS_COREDUMP_ENABLE=n -CONFIG_ESP_INSIGHTS_TRANSPORT_HTTPS=y -CONFIG_DIAG_LOG_DROP_WIFI_LOGS=y -CONFIG_DIAG_ENABLE_METRICS=y -CONFIG_DIAG_ENABLE_HEAP_METRICS=y -CONFIG_DIAG_ENABLE_WIFI_METRICS=y -CONFIG_DIAG_ENABLE_VARIABLES=y -CONFIG_DIAG_ENABLE_NETWORK_VARIABLES=y + CONFIG_ESP_COREDUMP_ENABLE=y -CONFIG_ESP_COREDUMP_ENABLE_TO_FLASH=n +CONFIG_ESP_COREDUMP_ENABLE_TO_FLASH=y CONFIG_ESP_COREDUMP_DATA_FORMAT_ELF=y CONFIG_ESP_COREDUMP_CHECKSUM_CRC32=y CONFIG_ESP_COREDUMP_MAX_TASKS_NUM=64 -CONFIG_ESP_COREDUMP_STACK_SIZE=1024 -CONFIG_MBEDTLS_DYNAMIC_BUFFER=y -CONFIG_MBEDTLS_DYNAMIC_FREE_PEER_CERT=y -CONFIG_MBEDTLS_DYNAMIC_FREE_CONFIG_DATA=y +CONFIG_ESP_COREDUMP_STACK_SIZE=1792 + +CONFIG_VFS_SUPPORT_IO=y +CONFIG_VFS_SUPPORT_DIR=y +# CONFIG_VFS_SUPPORT_SELECT is not set +# CONFIG_VFS_SUPPRESS_SELECT_DEBUG_OUTPUT is not set +# CONFIG_VFS_SUPPORT_TERMIOS is not set + +CONFIG_LITTLEFS_MAX_PARTITIONS=3 + +CONFIG_SPIRAM_MALLOC_ALWAYSINTERNAL=4096 +CONFIG_SPIRAM_MALLOC_RESERVE_INTERNAL=0 +CONFIG_SPIRAM_IGNORE_NOTFOUND=y + + + + +# CONFIG_RINGBUF_PLACE_FUNCTIONS_INTO_FLASH is not set +# CONFIG_ETH_TRANSMIT_MUTEX is not set +# CONFIG_ETH_SPI_ETHERNET_DM9051 is not set +# CONFIG_ETH_SPI_ETHERNET_W5500 is not set +# CONFIG_ETH_SPI_ETHERNET_KSZ8851SNL is not set +# CONFIG_HAL_ASSERTION_DISABLE is not set + +# CONFIG_NEWLIB_NANO_FORMAT is not set +# CONFIG_DAC_DMA_AUTO_16BIT_ALIGN is not set + +# CONFIG_UNITY_ENABLE_FLOAT is not set +# CONFIG_UNITY_ENABLE_DOUBLE is not set +# CONFIG_UNITY_ENABLE_IDF_TEST_RUNNER is not set +# CONFIG_USE_WAKENET is not set +# CONFIG_USE_MULTINET is not set + diff --git a/configs/defconfig.debug_debug b/configs/defconfig.debug_debug index 3cec23da4..523ded84f 100644 --- a/configs/defconfig.debug_debug +++ b/configs/defconfig.debug_debug @@ -1,2 +1,9 @@ -CONFIG_BOOTLOADER_LOG_LEVEL_INFO=y +CONFIG_BOOTLOADER_LOG_LEVEL_WARN=y +CONFIG_BOOTLOADER_LOG_LEVEL=2 CONFIG_LOG_DEFAULT_LEVEL_DEBUG=y +CONFIG_LOG_DEFAULT_LEVEL=4 +CONFIG_LOG_MAXIMUM_EQUALS_DEFAULT=y +CONFIG_LOG_MAXIMUM_LEVEL_DEBUG=y +CONFIG_LOG_MAXIMUM_LEVEL=4 +CONFIG_ARDUHAL_LOG_DEFAULT_LEVEL_DEBUG=y +CONFIG_ARDUHAL_LOG_DEFAULT_LEVEL=4 diff --git a/configs/defconfig.debug_default b/configs/defconfig.debug_default index 1d8258392..8e4bee95c 100644 --- a/configs/defconfig.debug_default +++ b/configs/defconfig.debug_default @@ -1,2 +1,9 @@ -CONFIG_BOOTLOADER_LOG_LEVEL_NONE=y -CONFIG_LOG_DEFAULT_LEVEL_ERROR=y +CONFIG_BOOTLOADER_LOG_LEVEL_WARN=y +CONFIG_BOOTLOADER_LOG_LEVEL=2 +CONFIG_LOG_DEFAULT_LEVEL_WARN=y +CONFIG_LOG_DEFAULT_LEVEL=2 +CONFIG_LOG_MAXIMUM_EQUALS_DEFAULT=y +CONFIG_LOG_MAXIMUM_LEVEL_WARN=y +CONFIG_LOG_MAXIMUM_LEVEL=2 +CONFIG_ARDUHAL_LOG_DEFAULT_LEVEL_INFO=y +CONFIG_ARDUHAL_LOG_DEFAULT_LEVEL=3 diff --git a/configs/defconfig.debug_error b/configs/defconfig.debug_error index c1858126e..470001fe6 100644 --- a/configs/defconfig.debug_error +++ b/configs/defconfig.debug_error @@ -1,2 +1,9 @@ CONFIG_BOOTLOADER_LOG_LEVEL_ERROR=y +CONFIG_BOOTLOADER_LOG_LEVEL=1 CONFIG_LOG_DEFAULT_LEVEL_ERROR=y +CONFIG_LOG_DEFAULT_LEVEL=1 +CONFIG_LOG_MAXIMUM_EQUALS_DEFAULT=y +CONFIG_LOG_MAXIMUM_LEVEL_ERROR=y +CONFIG_LOG_MAXIMUM_LEVEL=1 +CONFIG_ARDUHAL_LOG_DEFAULT_LEVEL_ERROR=y +CONFIG_ARDUHAL_LOG_DEFAULT_LEVEL=1 diff --git a/configs/defconfig.debug_info b/configs/defconfig.debug_info index 312255bd2..75fbe4ba7 100644 --- a/configs/defconfig.debug_info +++ b/configs/defconfig.debug_info @@ -1,2 +1,9 @@ -CONFIG_BOOTLOADER_LOG_LEVEL_INFO=y +CONFIG_BOOTLOADER_LOG_LEVEL_WARN=y +CONFIG_BOOTLOADER_LOG_LEVEL=2 CONFIG_LOG_DEFAULT_LEVEL_INFO=y +CONFIG_LOG_DEFAULT_LEVEL=3 +CONFIG_LOG_MAXIMUM_EQUALS_DEFAULT=y +CONFIG_LOG_MAXIMUM_LEVEL_INFO=y +CONFIG_LOG_MAXIMUM_LEVEL=3 +CONFIG_ARDUHAL_LOG_DEFAULT_LEVEL_INFO=y +CONFIG_ARDUHAL_LOG_DEFAULT_LEVEL=3 diff --git a/configs/defconfig.debug_none b/configs/defconfig.debug_none index 941e46f21..92026893c 100644 --- a/configs/defconfig.debug_none +++ b/configs/defconfig.debug_none @@ -1,2 +1,9 @@ CONFIG_BOOTLOADER_LOG_LEVEL_NONE=y +CONFIG_BOOTLOADER_LOG_LEVEL=0 CONFIG_LOG_DEFAULT_LEVEL_NONE=y +CONFIG_LOG_DEFAULT_LEVEL=0 +CONFIG_LOG_MAXIMUM_EQUALS_DEFAULT=y +CONFIG_LOG_MAXIMUM_LEVEL_NONE=y +CONFIG_LOG_MAXIMUM_LEVEL=0 +CONFIG_ARDUHAL_LOG_DEFAULT_LEVEL_NONE=y +CONFIG_ARDUHAL_LOG_DEFAULT_LEVEL=0 diff --git a/configs/defconfig.debug_verbose b/configs/defconfig.debug_verbose index 27413d5d8..1d25a3f4a 100644 --- a/configs/defconfig.debug_verbose +++ b/configs/defconfig.debug_verbose @@ -1,2 +1,9 @@ -CONFIG_BOOTLOADER_LOG_LEVEL_INFO=y +CONFIG_BOOTLOADER_LOG_LEVEL_WARN=y +CONFIG_BOOTLOADER_LOG_LEVEL=2 CONFIG_LOG_DEFAULT_LEVEL_VERBOSE=y +CONFIG_LOG_DEFAULT_LEVEL=5 +CONFIG_LOG_MAXIMUM_EQUALS_DEFAULT=y +CONFIG_LOG_MAXIMUM_LEVEL_VERBOSE=y +CONFIG_LOG_MAXIMUM_LEVEL=3 +CONFIG_ARDUHAL_LOG_DEFAULT_LEVEL_VERBOSE=y +CONFIG_ARDUHAL_LOG_DEFAULT_LEVEL=5 diff --git a/configs/defconfig.debug_warning b/configs/defconfig.debug_warning index 5d306f463..56eb2aa6f 100644 --- a/configs/defconfig.debug_warning +++ b/configs/defconfig.debug_warning @@ -1,2 +1,9 @@ CONFIG_BOOTLOADER_LOG_LEVEL_WARN=y +CONFIG_BOOTLOADER_LOG_LEVEL=2 CONFIG_LOG_DEFAULT_LEVEL_WARN=y +CONFIG_LOG_DEFAULT_LEVEL=2 +CONFIG_LOG_MAXIMUM_EQUALS_DEFAULT=y +CONFIG_LOG_MAXIMUM_LEVEL_WARN=y +CONFIG_LOG_MAXIMUM_LEVEL=2 +CONFIG_ARDUHAL_LOG_DEFAULT_LEVEL_WARN=y +CONFIG_ARDUHAL_LOG_DEFAULT_LEVEL=2 diff --git a/configs/defconfig.esp32 b/configs/defconfig.esp32 index 2e88a27ed..eb522af1a 100644 --- a/configs/defconfig.esp32 +++ b/configs/defconfig.esp32 @@ -18,4 +18,4 @@ CONFIG_TWAI_ERRATA_FIX_BUS_OFF_REC=y CONFIG_TWAI_ERRATA_FIX_TX_INTR_LOST=y CONFIG_TWAI_ERRATA_FIX_RX_FRAME_INVALID=y CONFIG_TWAI_ERRATA_FIX_RX_FIFO_CORRUPT=y -CONFIG_FREERTOS_WATCHPOINT_END_OF_STACK=y +CONFIG_FREERTOS_WATCHPOINT_END_OF_STACK=y \ No newline at end of file diff --git a/configs/defconfig.esp32c2 b/configs/defconfig.esp32c2 index 11c0100a0..801fa039b 100644 --- a/configs/defconfig.esp32c2 +++ b/configs/defconfig.esp32c2 @@ -5,4 +5,4 @@ CONFIG_BT_BLE_BLUFI_ENABLE=y CONFIG_RTC_CLK_CAL_CYCLES=576 # CONFIG_ESP_TASK_WDT_CHECK_IDLE_TASK_CPU0 is not set CONFIG_FREERTOS_IDLE_TASK_STACKSIZE=2304 -CONFIG_ESP32C2_REV2_DEVELOPMENT=y +CONFIG_ESP32C2_REV2_DEVELOPMENT=y \ No newline at end of file diff --git a/configs/defconfig.esp32c3 b/configs/defconfig.esp32c3 index c497b562d..644905a2d 100644 --- a/configs/defconfig.esp32c3 +++ b/configs/defconfig.esp32c3 @@ -5,4 +5,4 @@ CONFIG_BT_ENABLED=y CONFIG_ESP_WIFI_11KV_SUPPORT=y CONFIG_ESP_WIFI_SCAN_CACHE=y CONFIG_ESP_WIFI_MBO_SUPPORT=y -CONFIG_ESP_WIFI_11R_SUPPORT=y +CONFIG_ESP_WIFI_11R_SUPPORT=y \ No newline at end of file diff --git a/configs/defconfig.esp32c6 b/configs/defconfig.esp32c6 index 4627165c9..8626f4593 100644 --- a/configs/defconfig.esp32c6 +++ b/configs/defconfig.esp32c6 @@ -51,4 +51,4 @@ CONFIG_OPENTHREAD_NETWORK_PANID=0x1234 CONFIG_OPENTHREAD_NETWORK_EXTPANID="dead00beef00cafe" CONFIG_OPENTHREAD_NETWORK_MASTERKEY="00112233445566778899aabbccddeeff" CONFIG_OPENTHREAD_NETWORK_PSKC="104810e2315100afd6bc9215a6bfac53" -# end of OpenThread +# end of OpenThread \ No newline at end of file diff --git a/configs/defconfig.esp32h2 b/configs/defconfig.esp32h2 index 63d60eb15..6d3a9f265 100644 --- a/configs/defconfig.esp32h2 +++ b/configs/defconfig.esp32h2 @@ -3,6 +3,7 @@ CONFIG_BT_BLE_BLUFI_ENABLE=y CONFIG_RTC_CLK_CAL_CYCLES=576 # CONFIG_ESP_TASK_WDT_CHECK_IDLE_TASK_CPU0 is not set CONFIG_FREERTOS_IDLE_TASK_STACKSIZE=2304 +CONFIG_FREERTOS_IDLE_TASK_STACKSIZE=2304 # # ESP32 Arduino OpenThread Configuration @@ -47,4 +48,4 @@ CONFIG_OPENTHREAD_NETWORK_PANID=0x1234 CONFIG_OPENTHREAD_NETWORK_EXTPANID="dead00beef00cafe" CONFIG_OPENTHREAD_NETWORK_MASTERKEY="00112233445566778899aabbccddeeff" CONFIG_OPENTHREAD_NETWORK_PSKC="104810e2315100afd6bc9215a6bfac53" -# end of OpenThread +# end of OpenThread \ No newline at end of file diff --git a/configs/defconfig.esp32s2 b/configs/defconfig.esp32s2 index 3b0af548a..fb4a072ab 100644 --- a/configs/defconfig.esp32s2 +++ b/configs/defconfig.esp32s2 @@ -14,4 +14,4 @@ CONFIG_ULP_COPROC_ENABLED=y # Choose FSM or RISCV exclusively! Never both. CONFIG_ULP_COPROC_TYPE_FSM=y # CONFIG_ULP_COPROC_TYPE_RISCV=y -CONFIG_ULP_COPROC_RESERVE_MEM=512 +CONFIG_ULP_COPROC_RESERVE_MEM=512 \ No newline at end of file diff --git a/configs/defconfig.esp32s3 b/configs/defconfig.esp32s3 index 2c2cba3cd..d90a920d2 100644 --- a/configs/defconfig.esp32s3 +++ b/configs/defconfig.esp32s3 @@ -16,4 +16,4 @@ CONFIG_ULP_COPROC_ENABLED=y # Choose FSM or RISCV exclusively! Never both. CONFIG_ULP_COPROC_TYPE_FSM=y # CONFIG_ULP_COPROC_TYPE_RISCV=y -CONFIG_ULP_COPROC_RESERVE_MEM=512 +CONFIG_ULP_COPROC_RESERVE_MEM=512 \ No newline at end of file diff --git a/configs/defconfig.opi_ram b/configs/defconfig.opi_ram index 16e6a278c..b8dd03750 100644 --- a/configs/defconfig.opi_ram +++ b/configs/defconfig.opi_ram @@ -1,3 +1,14 @@ CONFIG_SPIRAM_MODE_OCT=y +CONFIG_SPIRAM_BOOT_INIT=y +CONFIG_SPIRAM_TYPE_AUTO=y +CONFIG_SPIRAM_SIZE=-1 +CONFIG_SPIRAM=y +# CONFIG_SPIRAM_BOOT_INIT is not set +CONFIG_SPIRAM_SUPPORT=y CONFIG_SPIRAM_IGNORE_NOTFOUND=y -# CONFIG_SPIRAM_MEMTEST is not set \ No newline at end of file +CONFIG_SPIRAM_USE_MALLOC=y +CONFIG_WIFI_LWIP_ALLOCATION_FROM_SPIRAM_FIRST=y +CONFIG_SPIRAM_ALLOW_STACK_EXTERNAL_MEMORY=y +CONFIG_SPIRAM_MALLOC_ALWAYSINTERNAL=4096 +CONFIG_SPIRAM_MALLOC_RESERVE_INTERNAL=0 +# CONFIG_SPIRAM_MEMTEST is not set diff --git a/configs/defconfig.qio_ram b/configs/defconfig.qio_ram index 902680b3a..5d19c0398 100644 --- a/configs/defconfig.qio_ram +++ b/configs/defconfig.qio_ram @@ -1 +1,14 @@ -# CONFIG_SPIRAM_BOOT_INIT is not set \ No newline at end of file +CONFIG_SPIRAM_MODE_QUAD=y +CONFIG_SPIRAM_BOOT_INIT=y +CONFIG_SPIRAM_TYPE_AUTO=y +CONFIG_SPIRAM_SIZE=-1 +CONFIG_SPIRAM=y +# CONFIG_SPIRAM_BOOT_INIT is not set +CONFIG_SPIRAM_SUPPORT=y +CONFIG_SPIRAM_IGNORE_NOTFOUND=y +CONFIG_SPIRAM_USE_MALLOC=y +CONFIG_WIFI_LWIP_ALLOCATION_FROM_SPIRAM_FIRST=y +CONFIG_SPIRAM_ALLOW_STACK_EXTERNAL_MEMORY=y +CONFIG_SPIRAM_MALLOC_ALWAYSINTERNAL=4096 +CONFIG_SPIRAM_MALLOC_RESERVE_INTERNAL=0 +# CONFIG_SPIRAM_MEMTEST is not set diff --git a/configs/idf_component.yml b/configs/idf_component.yml new file mode 100644 index 000000000..40f9c8251 --- /dev/null +++ b/configs/idf_component.yml @@ -0,0 +1,66 @@ +description: "Arduino core for ESP32, ESP32-S and ESP32-C series of SoCs" +url: "https://github.com/espressif/arduino-esp32" +license: "LGPL-2.1" +targets: + - esp32 + - esp32s2 + - esp32s3 + - esp32c2 + - esp32c3 + - esp32c6 + - esp32h2 +tags: + - arduino +files: + include: + - "variants/esp32/**/*" + - "variants/esp32s2/**/*" + - "variants/esp32s3/**/*" + - "variants/esp32c2/**/*" + - "variants/esp32c3/**/*" + - "variants/esp32c6/**/*" + - "variants/esp32h2/**/*" + exclude: + - "docs/" + - "docs/**/*" + - "idf_component_examples/" + - "idf_component_examples/**/*" + - "package/" + - "package/**/*" + - "tests/" + - "tests/**/*" + - "tools/" + - "tools/**/*" + - "variants/**/*" + - ".gitignore" + - ".gitmodules" + - ".readthedocs.yaml" + - "boards.txt" + - "CODE_OF_CONDUCT.md" + - "LICENSE.md" + - "package.json" + - "platform.txt" + - "programmers.txt" +dependencies: + idf: ">=5.1,<5.2" + # mdns 1.2.1 is necessary to build H2 with no WiFi + mdns: "^1.2.3" + espressif/esp_modem: "^1.1.0" + chmorgan/esp-libhelix-mp3: + version: "1.0.3" + require: public + espressif/esp-zboss-lib: + version: "^1.0.1" + rules: + - if: "target != esp32c2" + espressif/esp-zigbee-lib: + version: "^1.0.1" + rules: + - if: "target != esp32c2" + esp-dsp: + version: "^1.3.4" + rules: + - if: "target != esp32c2" + joltwallet/littlefs: "^1.10.2" +examples: + - path: ./idf_component_examples/Hello_world \ No newline at end of file diff --git a/main/idf_component.yml b/main/idf_component.yml index 011906d27..99064b46d 100644 --- a/main/idf_component.yml +++ b/main/idf_component.yml @@ -7,59 +7,7 @@ dependencies: require: public rules: - if: "target in [esp32, esp32s2, esp32s3]" - espressif/esp-tflite-micro: - version: ">=1.2.0" - require: public - rules: - - if: "target not in [esp32c2]" - espressif/esp-dl: - version: "master" - git: https://github.com/espressif/esp-dl.git - require: public - rules: - - if: "target in [esp32s3, esp32s2, esp32]" - espressif/esp-sr: - version: ">=1.4.2" - rules: - - if: "target in [esp32s3]" - # esp-sr: "^1.3.1" - # esp32-camera: "^2.0.4" - # esp-dl: - # git: https://github.com/espressif/esp-dl.git - # espressif/esp_rainmaker: - # path: components/esp_rainmaker - # git: https://github.com/espressif/esp-rainmaker.git + mdns: "1.3.0" - # # Defining a dependency from the registry: - # # https://components.espressif.com/component/example/cmp - # example/cmp: "^3.3.3" # Automatically update minor releases - # - # # Other ways to define dependencies - # - # # For components maintained by Espressif only name can be used. - # # Same as `espressif/cmp` - # component: "~1.0.0" # Automatically update bugfix releases - # - # # Or in a longer form with extra parameters - # component2: - # version: ">=2.0.0" - # - # # For transient dependencies `public` flag can be set. - # # `public` flag doesn't have an effect for the `main` component. - # # All dependencies of `main` are public by default. - # public: true - # - # # For components hosted on non-default registry: - # service_url: "https://componentregistry.company.com" - # - # # For components in git repository: - # test_component: - # path: test_component - # git: ssh://git@gitlab.com/user/components.git - # - # # For test projects during component development - # # components can be used from a local directory - # # with relative or absolute path - # some_local_component: - # path: ../../projects/component + joltwallet/littlefs: "1.14.4" \ No newline at end of file diff --git a/tools/archive-build.sh b/tools/archive-build.sh index f973a42ef..c33f96931 100755 --- a/tools/archive-build.sh +++ b/tools/archive-build.sh @@ -5,8 +5,41 @@ IDF_BRANCH=$(git -C "$IDF_PATH" symbolic-ref --short HEAD || git -C "$IDF_PATH" idf_version_string=${IDF_BRANCH//\//_}"-$IDF_COMMIT" archive_path="dist/arduino-esp32-libs-$1-$idf_version_string.tar.gz" +pio_zip_archive_path="dist/framework-arduinoespressif32.zip" +pio_zip_archive_libs_path="dist/framework-arduinoespressif32-libs.zip" mkdir -p dist && rm -rf "$archive_path" if [ -d "out" ]; then cd out && tar zcf "../$archive_path" * && cd .. fi + +cd out +echo "Creating PlatformIO Tasmota framework-arduinoespressif32" +mkdir -p arduino-esp32/cores/esp32 +mkdir -p arduino-esp32/tools/partitions +cp -rf ../components/arduino/tools arduino-esp32 +cp -rf ../components/arduino/cores arduino-esp32 +cp -rf ../components/arduino/libraries arduino-esp32 +cp -rf ../components/arduino/variants arduino-esp32 +cp -f ../components/arduino/CMa* arduino-esp32 +cp -f ../components/arduino/idf* arduino-esp32 +cp -f ../components/arduino/Kco* arduino-esp32 +cp -f ../components/arduino/pac* arduino-esp32 +rm -rf arduino-esp32/docs +rm -rf arduino-esp32/tests +rm -rf arduino-esp32/libraries/RainMaker +rm -rf arduino-esp32/libraries/Insights +rm -rf arduino-esp32/libraries/SPIFFS +rm -rf arduino-esp32/libraries/ESP_SR +rm -rf arduino-esp32/tools/esp32-arduino-libs +rm -rf arduino-esp32/tools/gen_insights_package.py +cp -rf tools/esp32-arduino-libs arduino-esp32/tools/ +cp ../package.json arduino-esp32/package.json +cp ../core_version.h arduino-esp32/cores/esp32/core_version.h +cp -rf arduino-esp32/tools/esp32-arduino-libs framework-arduinoespressif32-libs/ +cp -rf arduino-esp32/ framework-arduinoespressif32/ + +# If the framework is needed as tar.gz uncomment next line +# tar --exclude=.* -zcf ../$pio_archive_path framework-arduinoespressif32/ +7z a -mx=9 -tzip -xr'!.*' ../$pio_zip_archive_path framework-arduinoespressif32/ +7z a -mx=9 -tzip -xr'!.*' ../$pio_zip_archive_libs_path framework-arduinoespressif32-libs/ \ No newline at end of file diff --git a/tools/gen_pio_frmwk_manifest.py b/tools/gen_pio_frmwk_manifest.py new file mode 100644 index 000000000..32035c1af --- /dev/null +++ b/tools/gen_pio_frmwk_manifest.py @@ -0,0 +1,95 @@ +import argparse +import json +import os +import re +import sys + +MANIFEST_DATA = { + "name": "framework-arduinoespressif32-libs", + "description": "Precompiled platformio framework for Arduino for the Espressif ESP32 series of SoCs", + "keywords": ["framework", "arduino", "espressif", "esp32"], + "license": "LGPL-2.1-or-later", + "repository": { + "type": "git", + "url": "https://github.com/lukaswnd/esp32-arduino-libs", + "build-id": "0" + }, +} + + +def convert_version(version_string): + """A helper function that converts a custom IDF version string + extracted from a Git repository to a suitable SemVer alternative. For example: + 'release/v5.1' becomes '5.1.0', + 'v7.7.7' becomes '7.7.7' + """ + + regex_pattern = ( + r"v(?P0|[1-9]\d*)\.(?P0|[1-9]\d*)\.*(?P0|[1-9]\d*)*" + ) + match = re.search(regex_pattern, version_string) + if not match: + sys.stderr.write( + f"Failed to find a regex match for '{regex_pattern}' in '{version_string}'\n" + ) + return "" + + major, minor, patch = match.groups() + if not patch: + patch = "0" + + return ".".join((major, minor, patch)) + + +def main(dst_dir, version_string, commit_hash, build_number): + + converted_version = convert_version(version_string) + if not converted_version: + sys.stderr.write(f"Failed to convert version '{version_string}'\n") + return -1 + + manifest_file_path = os.path.join(dst_dir, "package.json") + with open(manifest_file_path, "w", encoding="utf8") as fp: + MANIFEST_DATA["version"] = f"{converted_version}+sha.{commit_hash}" + MANIFEST_DATA["repository"]["build-id"] = build_number + json.dump(MANIFEST_DATA, fp, indent=2) + + print( + f"Generated PlatformIO manifest file '{manifest_file_path}' with '{converted_version}' version" + ) + return 0 + + +if __name__ == "__main__": + parser = argparse.ArgumentParser() + parser.add_argument( + "-o", + "--dst-dir", + dest="dst_dir", + required=True, + help="Destination folder where the 'package.json' manifest will be located", + ) + parser.add_argument( + "-s", + "--version-string", + dest="version_string", + required=True, + help="ESP-IDF version string used for compiling libraries", + ) + parser.add_argument( + "-c", + "--commit-hash", + dest="commit_hash", + required=True, + help="ESP-IDF revision in form of a commit hash", + ) + parser.add_argument( + "-n", + "--build-number", + dest="build_number", + required=True, + help="Number of Github workflow build", + ) + args = parser.parse_args() + + sys.exit(main(args.dst_dir, args.version_string, args.commit_hash, args.build_number)) diff --git a/tools/gen_platformio_manifest.py b/tools/gen_platformio_manifest.py index 2d031b687..f5a001cc3 100644 --- a/tools/gen_platformio_manifest.py +++ b/tools/gen_platformio_manifest.py @@ -11,7 +11,8 @@ "license": "LGPL-2.1-or-later", "repository": { "type": "git", - "url": "https://github.com/espressif/esp32-arduino-libs", + "url": "https://github.com/lukaswnd/esp32-arduino-libs", + "build-id": "0" }, } @@ -40,7 +41,7 @@ def convert_version(version_string): return ".".join((major, minor, patch)) -def main(dst_dir, version_string, commit_hash): +def main(dst_dir, version_string, commit_hash, build_number): converted_version = convert_version(version_string) if not converted_version: @@ -50,6 +51,7 @@ def main(dst_dir, version_string, commit_hash): manifest_file_path = os.path.join(dst_dir, "package.json") with open(manifest_file_path, "w", encoding="utf8") as fp: MANIFEST_DATA["version"] = f"{converted_version}+sha.{commit_hash}" + MANIFEST_DATA["repository"]["build-id"] = build_number json.dump(MANIFEST_DATA, fp, indent=2) print( @@ -81,6 +83,13 @@ def main(dst_dir, version_string, commit_hash): required=True, help="ESP-IDF revision in form of a commit hash", ) + parser.add_argument( + "-n", + "--build-number", + dest="build_number", + required=True, + help="Number of Github workflow build", + ) args = parser.parse_args() - sys.exit(main(args.dst_dir, args.version_string, args.commit_hash)) + sys.exit(main(args.dst_dir, args.version_string, args.commit_hash, args.build_number)) diff --git a/tools/install-arduino.sh b/tools/install-arduino.sh index 51e1162a4..c3210872f 100755 --- a/tools/install-arduino.sh +++ b/tools/install-arduino.sh @@ -60,3 +60,33 @@ else fi if [ $? -ne 0 ]; then exit 1; fi + +# Remove unwanted directories +rm -rf "$AR_COMPS/arduino/docs" \ + "$AR_COMPS/arduino/idf_component_examples" \ + "$AR_COMPS/arduino/tests" \ + "$AR_COMPS/arduino/libraries/RainMaker" \ + "$AR_COMPS/arduino/libraries/Insights" \ + "$AR_COMPS/arduino/libraries/SPIFFS" \ + "$AR_COMPS/arduino/libraries/ESP_SR" \ + "$AR_COMPS/arduino/libraries/TFLiteMicro" + +if [ $? -ne 0 ]; then + echo "Error removing directories" + exit 1 +fi + +# Replace CMakeLists.txt and idf_component.yml +rm -rf "$AR_COMPS/arduino/CMakeLists.txt" "$AR_COMPS/arduino/idf_component.yml" + +cp "$AR_ROOT/configs/CMakeLists.txt" "$AR_COMPS/arduino/CMakeLists.txt" +if [ $? -ne 0 ]; then + echo "Error copying CMakeLists.txt" + exit 1 +fi + +cp "$AR_ROOT/configs/idf_component.yml" "$AR_COMPS/arduino/idf_component.yml" +if [ $? -ne 0 ]; then + echo "Error copying idf_component.yml" + exit 1 +fi