From fc73ebd382fb015d43866ac66ca3f2f06cc8f42a Mon Sep 17 00:00:00 2001 From: me-no-dev Date: Mon, 5 Apr 2021 13:56:01 +0300 Subject: [PATCH 1/7] Add option to specify which Arduino branch will be target for PR --- tools/config.sh | 7 ++++++- tools/push-to-arduino.sh | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/tools/config.sh b/tools/config.sh index 686badecf..a82151c48 100755 --- a/tools/config.sh +++ b/tools/config.sh @@ -12,6 +12,10 @@ if [ -z $IDF_BRANCH ]; then IDF_BRANCH="release/v3.3" fi +if [ -z $AR_PR_TARGET_BRANCH ]; then + AR_PR_TARGET_BRANCH="release/v1.0" +fi + # Owner of the target ESP32 Arduino repository AR_USER="espressif" @@ -96,13 +100,14 @@ function git_pr_exists(){ # git_pr_exists function git_create_pr(){ # git_create_pr local pr_branch="$1" local pr_title="$2" + local pr_target="$3" local pr_body="" for component in `ls "$AR_COMPS"`; do if [ ! $component == "arduino" ] && [ -d "$AR_COMPS/$component/.git" ]; then pr_body+="$component: "$(git -C "$AR_COMPS/$component" symbolic-ref --short HEAD)" "$(git -C "$AR_COMPS/$component" rev-parse --short HEAD)"\r\n" fi done - local pr_data="{\"title\": \"$pr_title\", \"body\": \"$pr_body\", \"head\": \"$AR_USER:$pr_branch\", \"base\": \"master\"}" + local pr_data="{\"title\": \"$pr_title\", \"body\": \"$pr_body\", \"head\": \"$AR_USER:$pr_branch\", \"base\": \"$pr_target\"}" git_create_pr_res=`echo "$pr_data" | curl -k -H "Authorization: token $GITHUB_TOKEN" -H "Accept: application/vnd.github.v3.raw+json" --data @- "https://api.github.com/repos/$AR_REPO/pulls"` local done_pr=`echo "$git_create_pr_res" | jq -r '.title'` if [ ! "$done_pr" == "" ] && [ ! "$done_pr" == "null" ]; then echo 1; else echo 0; fi diff --git a/tools/push-to-arduino.sh b/tools/push-to-arduino.sh index 7ebb077f0..17a08452c 100755 --- a/tools/push-to-arduino.sh +++ b/tools/push-to-arduino.sh @@ -50,7 +50,7 @@ fi # if [ "$AR_HAS_PR" == "0" ]; then - pr_created=`git_create_pr "$AR_NEW_BRANCH_NAME" "$AR_NEW_PR_TITLE"` + pr_created=`git_create_pr "$AR_NEW_BRANCH_NAME" "$AR_NEW_PR_TITLE" "$AR_PR_TARGET_BRANCH"` if [ $pr_created == "0" ]; then echo "ERROR: Failed to create PR '$AR_NEW_PR_TITLE': "`echo "$git_create_pr_res" | jq -r '.message'`": "`echo "$git_create_pr_res" | jq -r '.errors[].message'` exit 1 From d6eafd6ddae228564e9846424cf2b622fc8f227d Mon Sep 17 00:00:00 2001 From: me-no-dev <hristo@espressif.com> Date: Mon, 5 Apr 2021 14:41:59 +0300 Subject: [PATCH 2/7] Make sure that correct source arduino branch is cloned --- tools/update-components.sh | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/tools/update-components.sh b/tools/update-components.sh index 6ba4388d3..228815083 100755 --- a/tools/update-components.sh +++ b/tools/update-components.sh @@ -5,10 +5,18 @@ source ./tools/config.sh # # CLONE/UPDATE ARDUINO # -ARDUINO_BRANCH="master" -ARDUINO_HAS_BRANCH=`git_branch_exists "$AR_COMPS/arduino" "idf-$IDF_BRANCH"` -if [ "$ARDUINO_HAS_BRANCH" == "1" ]; then - ARDUINO_BRANCH="idf-$IDF_BRANCH" +if [ -z $ARDUINO_BRANCH ]; then + has_ar_branch=`git_branch_exists "$AR_COMPS/arduino" "idf-$IDF_BRANCH"` + if [ "$has_ar_branch" == "1" ]; then + ARDUINO_BRANCH="idf-$IDF_BRANCH" + else + has_ar_branch=`git_branch_exists "$AR_COMPS/arduino" "$AR_PR_TARGET_BRANCH"` + if [ "$has_ar_branch" == "1" ]; then + ARDUINO_BRANCH="$AR_PR_TARGET_BRANCH" + else + ARDUINO_BRANCH="master" + fi + fi fi if [ ! -d "$AR_COMPS/arduino" ]; then From 75877d2218e6171e7ad955ba2fc170927415ca13 Mon Sep 17 00:00:00 2001 From: me-no-dev <hristo@espressif.com> Date: Thu, 27 May 2021 00:11:19 +0300 Subject: [PATCH 3/7] Update toolchain for IDF 3.3 --- sdkconfig | 7 +++++++ tools/config.sh | 10 +++++----- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/sdkconfig b/sdkconfig index 361aa3aa6..4f92cefe7 100644 --- a/sdkconfig +++ b/sdkconfig @@ -282,6 +282,11 @@ CONFIG_SPI_SLAVE_ISR_IN_IRAM=y # CONFIG_CAN_ISR_IN_IRAM= +# +# UART configuration +# +CONFIG_UART_ISR_IN_IRAM= + # # eFuse Bit Manager # @@ -622,6 +627,7 @@ CONFIG_FREERTOS_ISR_STACKSIZE=1536 CONFIG_FREERTOS_LEGACY_HOOKS= CONFIG_FREERTOS_MAX_TASK_NAME_LEN=16 CONFIG_SUPPORT_STATIC_ALLOCATION=y +CONFIG_ENABLE_STATIC_TASK_CLEAN_UP_HOOK= CONFIG_TIMER_TASK_PRIORITY=1 CONFIG_TIMER_TASK_STACK_DEPTH=2048 CONFIG_TIMER_QUEUE_LENGTH=10 @@ -936,6 +942,7 @@ CONFIG_UNITY_ENABLE_DOUBLE=y CONFIG_UNITY_ENABLE_COLOR= CONFIG_UNITY_ENABLE_IDF_TEST_RUNNER=y CONFIG_UNITY_ENABLE_FIXTURE= +CONFIG_UNITY_ENABLE_BACKTRACE_ON_FAIL= # # Virtual file system diff --git a/tools/config.sh b/tools/config.sh index a82151c48..14da02556 100755 --- a/tools/config.sh +++ b/tools/config.sh @@ -2,11 +2,11 @@ IDF_COMPS="$IDF_PATH/components" IDF_TOOLCHAIN="xtensa-esp32-elf" -IDF_TOOLCHAIN_LINUX_ARMEL="https://dl.espressif.com/dl/xtensa-esp32-elf-linux-armel-1.22.0-96-g2852398-5.2.0.tar.gz" -IDF_TOOLCHAIN_LINUX32="https://dl.espressif.com/dl/xtensa-esp32-elf-linux32-1.22.0-96-g2852398-5.2.0.tar.gz" -IDF_TOOLCHAIN_LINUX64="https://dl.espressif.com/dl/xtensa-esp32-elf-linux64-1.22.0-96-g2852398-5.2.0.tar.gz" -IDF_TOOLCHAIN_WIN32="https://dl.espressif.com/dl/xtensa-esp32-elf-win32-1.22.0-96-g2852398-5.2.0.zip" -IDF_TOOLCHAIN_MACOS="https://dl.espressif.com/dl/xtensa-esp32-elf-osx-1.22.0-96-g2852398-5.2.0.tar.gz" +IDF_TOOLCHAIN_LINUX_ARMEL="https://github.com/espressif/arduino-esp32/releases/download/1.0.5-rc5/xtensa-esp32-elf-linux-armel-1.22.0-97-gc752ad5-5.2.0.tar.gz" +IDF_TOOLCHAIN_LINUX32="https://github.com/espressif/arduino-esp32/releases/download/1.0.5-rc5/xtensa-esp32-elf-linux32-1.22.0-97-gc752ad5-5.2.0.tar.gz" +IDF_TOOLCHAIN_LINUX64="https://github.com/espressif/arduino-esp32/releases/download/1.0.5-rc5/xtensa-esp32-elf-linux64-1.22.0-97-gc752ad5-5.2.0.tar.gz" +IDF_TOOLCHAIN_WIN32="https://github.com/espressif/arduino-esp32/releases/download/1.0.5-rc5/xtensa-esp32-elf-win32-1.22.0-97-gc752ad5-5.2.0.zip" +IDF_TOOLCHAIN_MACOS="https://github.com/espressif/arduino-esp32/releases/download/1.0.5-rc5/xtensa-esp32-elf-macos-1.22.0-97-gc752ad5-5.2.0.tar.gz" if [ -z $IDF_BRANCH ]; then IDF_BRANCH="release/v3.3" From f2326ff4806d2d838fa861c735f6eed02a6e6de2 Mon Sep 17 00:00:00 2001 From: me-no-dev <hristo@espressif.com> Date: Mon, 31 May 2021 10:46:22 +0300 Subject: [PATCH 4/7] Properly download files from github --- tools/install-esp-idf.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/install-esp-idf.sh b/tools/install-esp-idf.sh index 9b625d0ab..370e2f1f9 100755 --- a/tools/install-esp-idf.sh +++ b/tools/install-esp-idf.sh @@ -128,7 +128,7 @@ if ! [ -x "$(command -v $IDF_TOOLCHAIN-gcc)" ]; then exit 1 fi echo "Downloading $TC_LINK" - curl -k -o $IDF_TOOLCHAIN.$TC_EXT $TC_LINK || exit 1 + curl -Lk -o $IDF_TOOLCHAIN.$TC_EXT $TC_LINK || exit 1 fi if [[ "$AR_OS" == "win32" ]]; then unzip $IDF_TOOLCHAIN.$TC_EXT || exit 1 From d73d00b822989c8e3551beb49469edcd187be7d1 Mon Sep 17 00:00:00 2001 From: me-no-dev <hristo@espressif.com> Date: Mon, 31 May 2021 20:41:21 +0300 Subject: [PATCH 5/7] Add committer email so Arduino CLA does not complain --- .github/workflows/cron.yml | 2 ++ .github/workflows/repository_dispatch.yml | 2 ++ 2 files changed, 4 insertions(+) diff --git a/.github/workflows/cron.yml b/.github/workflows/cron.yml index 25ec13c6c..caa925bc8 100644 --- a/.github/workflows/cron.yml +++ b/.github/workflows/cron.yml @@ -29,6 +29,8 @@ jobs: - 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: bash ./tools/cron.sh - name: Upload archive diff --git a/.github/workflows/repository_dispatch.yml b/.github/workflows/repository_dispatch.yml index c2233cbd6..016b84831 100644 --- a/.github/workflows/repository_dispatch.yml +++ b/.github/workflows/repository_dispatch.yml @@ -13,6 +13,8 @@ jobs: - 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 archive uses: actions/upload-artifact@v1 From 319bc09d88929dc2875838f77c422c622b1bb6d9 Mon Sep 17 00:00:00 2001 From: me-no-dev <hristo@espressif.com> Date: Tue, 8 Jun 2021 10:32:25 +0300 Subject: [PATCH 6/7] Update update-components.sh --- tools/update-components.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tools/update-components.sh b/tools/update-components.sh index 228815083..719ab2295 100755 --- a/tools/update-components.sh +++ b/tools/update-components.sh @@ -5,6 +5,9 @@ source ./tools/config.sh # # CLONE/UPDATE ARDUINO # +if [ ! -d "$AR_COMPS/arduino" ]; then + git clone $AR_REPO_URL "$AR_COMPS/arduino" +fi if [ -z $ARDUINO_BRANCH ]; then has_ar_branch=`git_branch_exists "$AR_COMPS/arduino" "idf-$IDF_BRANCH"` if [ "$has_ar_branch" == "1" ]; then @@ -19,13 +22,10 @@ if [ -z $ARDUINO_BRANCH ]; then fi fi -if [ ! -d "$AR_COMPS/arduino" ]; then - git clone $AR_REPO_URL "$AR_COMPS/arduino" -b $ARDUINO_BRANCH -else - git -C "$AR_COMPS/arduino" checkout $ARDUINO_BRANCH && \ - git -C "$AR_COMPS/arduino" fetch origin && \ - git -C "$AR_COMPS/arduino" pull origin $ARDUINO_BRANCH -fi +git -C "$AR_COMPS/arduino" checkout $ARDUINO_BRANCH && \ +git -C "$AR_COMPS/arduino" fetch origin && \ +git -C "$AR_COMPS/arduino" pull origin $ARDUINO_BRANCH + if [ $? -ne 0 ]; then exit 1; fi git -C "$AR_COMPS/arduino" submodule update --init --recursive From b1c75d1b3011de09e93697a7ebe2269d1af0ef5e Mon Sep 17 00:00:00 2001 From: Me No Dev <me-no-dev@users.noreply.github.com> Date: Mon, 13 Dec 2021 13:11:04 +0200 Subject: [PATCH 7/7] Update build-bootloaders.sh --- tools/build-bootloaders.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/build-bootloaders.sh b/tools/build-bootloaders.sh index 83df37fd2..b8f4100a6 100755 --- a/tools/build-bootloaders.sh +++ b/tools/build-bootloaders.sh @@ -14,6 +14,7 @@ $SED -i '/CONFIG_ESPTOOLPY_FLASHFREQ_40M/c\CONFIG_ESPTOOLPY_FLASHFREQ_40M=' ./sd $SED -i '/CONFIG_SPIRAM_SPEED_40M/c\CONFIG_SPIRAM_SPEED_40M=' ./sdkconfig echo "CONFIG_SPIRAM_SPEED_80M=y" >> ./sdkconfig echo "CONFIG_BOOTLOADER_SPI_WP_PIN=7" >> ./sdkconfig +echo "CONFIG_BOOTLOADER_SPI_CUSTOM_WP_PIN=" >> ./sdkconfig echo "CONFIG_SPIRAM_OCCUPY_HSPI_HOST=y" >> ./sdkconfig echo "CONFIG_SPIRAM_OCCUPY_VSPI_HOST=" >> ./sdkconfig echo "CONFIG_SPIRAM_OCCUPY_NO_HOST=" >> ./sdkconfig @@ -56,6 +57,7 @@ $SED -i '/CONFIG_ESPTOOLPY_FLASHFREQ_80M/c\CONFIG_ESPTOOLPY_FLASHFREQ_80M=' ./sd $SED -i '/CONFIG_ESPTOOLPY_FLASHFREQ_40M/c\CONFIG_ESPTOOLPY_FLASHFREQ_40M=y' ./sdkconfig echo "CONFIG_BOOTLOADER_SPI_WP_PIN=7" >> ./sdkconfig +echo "CONFIG_BOOTLOADER_SPI_CUSTOM_WP_PIN=" >> ./sdkconfig echo "CONFIG_BOOTLOADER_VDDSDIO_BOOST_1_8V=" >> ./sdkconfig $SED -i '/CONFIG_FLASHMODE_QIO/c\CONFIG_FLASHMODE_QIO=y' ./sdkconfig