diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 00dfea0d2..ca4389f38 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -1,28 +1,28 @@ -name: ESP32 builder IDF_Arduino 4.4.3 solo1 +name: IDF_Arduino 4.4.3 solo1 on: workflow_dispatch: # Manually start a workflow -# push: -# branches: master -# paths-ignore: -# - '.github/**' # Ignore changes towards the .github directory jobs: build-libs: name: Build Arduino Libs - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v3 - name: Install dependencies run: bash ./tools/prepare-ci.sh - name: Build Arduino Libs run: bash ./build.sh + - name: Display files + run: ls -R ./* - name: Release uses: jason2866/action-gh-release@v1.2 - #if: startsWith(github.ref, 'refs/tags/') with: tag_name: ${{ github.run_number }} + body_path: release-info.txt prerelease: true - files: dist/framework* + files: | + dist/framework* + release-info.txt env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/README.md b/README.md index 4543792b2..b6fd32ed5 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Tasmota ESP32 Arduino Lib Builder [![ESP32 builder](https://github.com/Jason2866/esp32-arduino-lib-builder/actions/workflows/push.yml/badge.svg)](https://github.com/Jason2866/esp32-arduino-lib-builder/actions/workflows/push.yml) +# Tasmota ESP32 Arduino Lib Builder [![ESP32 builder](https://github.com/Jason2866/esp32-arduino-lib-builder/actions/workflows/push.yml/badge.svg)](https://github.com/Jason2866/esp32-arduino-lib-builder/actions/workflows/push.yml)[![GitHub Releases](https://img.shields.io/github/downloads/Jason2866/esp32-arduino-lib-builder/total?label=downloads)](https://github.com/Jason2866/esp32-arduino-lib-builder/releases/latest) This repository contains the scripts that produce the libraries included with Tasmota esp32-arduino. @@ -11,13 +11,13 @@ cd esp32-arduino-lib-builder ./build.sh ``` ### Development builds -Look in release and download a version. The day of build is using the commits of this day of IDF / Arduino. +Look in release and download a version. There is the Info of the used commits of IDF / Arduino. -### Stable Release including ESP32solo1 +### Stable Platformio Platform release including ESP32solo1 based on Arduino Core 2.0.5 and can be used with Platformio for the ESP32/ESP32solo1, ESP32C3, ESP32S2 and ESP32S3 ``` [platformio] -platform = https://github.com/tasmota/platform-espressif32/releases/download/v2.0.5.1/platform-espressif32-2.0.5.1.zip +platform = https://github.com/tasmota/platform-espressif32/releases/download/v2.0.5.2/platform-espressif32-2.0.5.2.zip framework = arduino, espidf ``` to use the ESP32 Solo1 Arduino framework add in your env diff --git a/build.sh b/build.sh index 450d42544..0b9bf3189 100755 --- a/build.sh +++ b/build.sh @@ -119,11 +119,11 @@ rm -rf build sdkconfig out # Add components version info mkdir -p "$AR_TOOLS/sdk" && rm -rf version.txt && rm -rf "$AR_TOOLS/sdk/versions.txt" -component_version="esp-idf: "$(git -C "$IDF_PATH" symbolic-ref --short HEAD)" "$(git -C "$IDF_PATH" rev-parse --short HEAD) +component_version="esp-idf: "$(git -C "$IDF_PATH" symbolic-ref --short HEAD || git -C "$IDF_PATH" tag --points-at HEAD)" "$(git -C "$IDF_PATH" rev-parse --short HEAD) echo $component_version >> version.txt && echo $component_version >> "$AR_TOOLS/sdk/versions.txt" for component in `ls "$AR_COMPS"`; do if [ -d "$AR_COMPS/$component/.git" ] || [ -d "$AR_COMPS/$component/.github" ]; then - component_version="$component: "$(git -C "$AR_COMPS/$component" symbolic-ref --short HEAD)" "$(git -C "$AR_COMPS/$component" rev-parse --short HEAD) + component_version="$component: "$(git -C "$AR_COMPS/$component" symbolic-ref --short HEAD || git -C "$AR_COMPS/$component" tag --points-at HEAD)" "$(git -C "$AR_COMPS/$component" rev-parse --short HEAD) echo $component_version >> version.txt && echo $component_version >> "$AR_TOOLS/sdk/versions.txt" fi done diff --git a/configs/defconfig.esp32 b/configs/defconfig.esp32 index 408cf48a1..fec81ead8 100644 --- a/configs/defconfig.esp32 +++ b/configs/defconfig.esp32 @@ -72,6 +72,7 @@ CONFIG_LWIP_TCP_RTO_TIME=3000 CONFIG_LWIP_TCPIP_TASK_STACK_SIZE=2560 CONFIG_LWIP_TCPIP_TASK_AFFINITY_CPU0=y CONFIG_LWIP_UDP_RECVMBOX_SIZE=64 +CONFIG_LWIP_IPV6_AUTOCONFIG=y # CONFIG_MBEDTLS_ASYMMETRIC_CONTENT_LEN is not set CONFIG_MBEDTLS_PSK_MODES=y CONFIG_MBEDTLS_KEY_EXCHANGE_PSK=y diff --git a/configs/defconfig.esp32c3 b/configs/defconfig.esp32c3 index cbecef8f0..cb23bee4c 100644 --- a/configs/defconfig.esp32c3 +++ b/configs/defconfig.esp32c3 @@ -56,7 +56,6 @@ CONFIG_FREERTOS_IDLE_TASK_STACKSIZE=2304 CONFIG_HAL_ASSERTION_DISABLE=y CONFIG_LOG_DEFAULT_LEVEL_NONE=y # CONFIG_LOG_COLORS is not set -CONFIG_LWIP_IPV6_AUTOCONFIG=y CONFIG_LWIP_LOCAL_HOSTNAME="tasmota" CONFIG_LWIP_MAX_SOCKETS=16 CONFIG_LWIP_SO_RCVBUF=y @@ -64,6 +63,8 @@ CONFIG_LWIP_IP_FORWARD=y CONFIG_LWIP_IPV4_NAPT=y CONFIG_LWIP_DHCP_OPTIONS_LEN=128 CONFIG_LWIP_SNTP_UPDATE_DELAY=10800000 +CONFIG_LWIP_UDP_RECVMBOX_SIZE=64 +CONFIG_LWIP_IPV6_AUTOCONFIG=y CONFIG_MBEDTLS_PSK_MODES=y CONFIG_MBEDTLS_KEY_EXCHANGE_PSK=y CONFIG_NEWLIB_NANO_FORMAT=y diff --git a/configs/defconfig.esp32s2 b/configs/defconfig.esp32s2 index de21b3d17..c589b743c 100644 --- a/configs/defconfig.esp32s2 +++ b/configs/defconfig.esp32s2 @@ -16,7 +16,8 @@ CONFIG_COMPILER_WARN_WRITE_STRINGS=y CONFIG_ESP32S2_DEFAULT_CPU_FREQ_240=y CONFIG_ESP32S2_SPIRAM_SUPPORT=y CONFIG_ESP32S2_ULP_COPROC_ENABLED=y -CONFIG_ESP32S2_ULP_COPROC_RESERVE_MEM=1024 +CONFIG_ESP32S2_ULP_COPROC_RISCV=y +CONFIG_ESP32S2_ULP_COPROC_RESERVE_MEM=4096 CONFIG_SPIRAM_MALLOC_ALWAYSINTERNAL=4096 CONFIG_SPIRAM_TRY_ALLOCATE_WIFI_LWIP=y CONFIG_SPIRAM_MALLOC_RESERVE_INTERNAL=0 @@ -65,6 +66,8 @@ CONFIG_LWIP_TCP_MSS=1436 CONFIG_LWIP_TCP_RTO_TIME=3000 CONFIG_LWIP_TCPIP_TASK_STACK_SIZE=2560 CONFIG_LWIP_TCPIP_TASK_AFFINITY_CPU0=y +CONFIG_LWIP_UDP_RECVMBOX_SIZE=64 +CONFIG_LWIP_IPV6_AUTOCONFIG=y # CONFIG_MBEDTLS_ASYMMETRIC_CONTENT_LEN is not set CONFIG_MBEDTLS_SSL_PROTO_DTLS=y CONFIG_MBEDTLS_PSK_MODES=y diff --git a/configs/defconfig.esp32s3 b/configs/defconfig.esp32s3 index bef54a741..1e559dbce 100644 --- a/configs/defconfig.esp32s3 +++ b/configs/defconfig.esp32s3 @@ -41,7 +41,7 @@ CONFIG_ESP32S3_DEFAULT_CPU_FREQ_240=y CONFIG_ESP32S3_SPIRAM_SUPPORT=y CONFIG_ESP32S3_ULP_COPROC_ENABLED=y CONFIG_ESP32S3_ULP_COPROC_RISCV=y -CONFIG_ESP32S3_ULP_COPROC_RESERVE_MEM=1024 +CONFIG_ESP32S3_ULP_COPROC_RESERVE_MEM=4096 CONFIG_SPIRAM_MALLOC_ALWAYSINTERNAL=4096 CONFIG_SPIRAM_TRY_ALLOCATE_WIFI_LWIP=y CONFIG_SPIRAM_MALLOC_RESERVE_INTERNAL=0 @@ -93,6 +93,8 @@ CONFIG_LWIP_TCP_MSS=1436 CONFIG_LWIP_TCP_RTO_TIME=3000 CONFIG_LWIP_TCPIP_TASK_STACK_SIZE=2560 CONFIG_LWIP_TCPIP_TASK_AFFINITY_CPU0=y +CONFIG_LWIP_UDP_RECVMBOX_SIZE=64 +CONFIG_LWIP_IPV6_AUTOCONFIG=y # CONFIG_MBEDTLS_ASYMMETRIC_CONTENT_LEN is not set CONFIG_MBEDTLS_PSK_MODES=y CONFIG_MBEDTLS_KEY_EXCHANGE_PSK=y diff --git a/core_version.h b/core_version.h index 19c6bb113..c593bf82d 100644 --- a/core_version.h +++ b/core_version.h @@ -1,4 +1,4 @@ -#define ARDUINO_ESP32_GIT_VER 0x38c3f487 -#define ARDUINO_ESP32_GIT_DESC 2.0.5.3 -#define ARDUINO_ESP32_RELEASE_2_0_5_3 -#define ARDUINO_ESP32_RELEASE "2_0_5_3" +#define ARDUINO_ESP32_GIT_VER 0xcbaeab4e +#define ARDUINO_ESP32_GIT_DESC 2.0.6 +#define ARDUINO_ESP32_RELEASE_2_0_6 +#define ARDUINO_ESP32_RELEASE "2_0_6" diff --git a/main/Kconfig.projbuild b/main/Kconfig.projbuild index d30fccce9..76e2defdb 100644 --- a/main/Kconfig.projbuild +++ b/main/Kconfig.projbuild @@ -13,3 +13,7 @@ config LIB_BUILDER_FLASHFREQ default "40m" if ESPTOOLPY_FLASHFREQ_40M default "26m" if ESPTOOLPY_FLASHFREQ_26M default "20m" if ESPTOOLPY_FLASHFREQ_20M + +config LIB_BUILDER_COMPILE + bool + default y diff --git a/package.json b/package.json index 8f72c8441..4a482e7e1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "framework-arduinoespressif32", - "version": "2.0.5", + "version": "2.0.6", "description": "Tasmota Arduino Framework for the Espressif ESP32, ESP32-S and ESP32-C series of SoCs", "keywords": [ "tasmota", diff --git a/tools/archive-build.sh b/tools/archive-build.sh old mode 100755 new mode 100644 index 6bcb73e85..9604c296f --- a/tools/archive-build.sh +++ b/tools/archive-build.sh @@ -1,7 +1,7 @@ #!/bin/bash IDF_COMMIT=$(git -C "$IDF_PATH" rev-parse --short HEAD || echo "") -IDF_BRANCH=$(git -C "$IDF_PATH" symbolic-ref --short HEAD || echo "") +IDF_BRANCH=$(git -C "$IDF_PATH" symbolic-ref --short HEAD || git -C "$IDF_PATH" tag --points-at HEAD || echo "") idf_version_string=${IDF_BRANCH//\//_}"-$IDF_COMMIT" archive_path="dist/arduino-esp32-libs-solo1-$idf_version_string.tar.gz" @@ -16,16 +16,19 @@ echo "Creating framework-arduinoespressif32-solo1" cp -rf ../components/arduino 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/package rm -rf arduino-esp32/tools/sdk rm -rf arduino-esp32/tools/esptool.py rm -rf arduino-esp32/tools/gen_esp32part.py +rm -rf arduino-esp32/tools/gen_insights_package.py +rm -rf arduino-esp32/tools/gen_insights_package.exe rm -rf arduino-esp32/tools/platformio-build-*.py rm -rf arduino-esp32/platform.txt rm -rf arduino-esp32/package.json cp -f platform.txt arduino-esp32/ cp -Rf tools/sdk arduino-esp32/tools/ -cp -f tools/esptool.py arduino-esp32/tools/ cp -f tools/gen_esp32part.py arduino-esp32/tools/ cp -f tools/platformio-build-*.py arduino-esp32/tools/ cp ../package.json arduino-esp32/package.json diff --git a/tools/config.sh b/tools/config.sh old mode 100755 new mode 100644 index 2910560c7..86c2b196a --- a/tools/config.sh +++ b/tools/config.sh @@ -6,7 +6,7 @@ if [ -z $IDF_PATH ]; then fi if [ -z $IDF_BRANCH ]; then - IDF_BRANCH="Tasmota/v4.4" + IDF_BRANCH="release/v4.4" fi if [ -z $AR_PR_TARGET_BRANCH ]; then @@ -34,7 +34,7 @@ AR_USER="tasmota" AR_REPO="$AR_USER/arduino-esp32" # Arduino branch to use -AR_BRANCH="master" +AR_BRANCH="work_ipv6" AR_REPO_URL="https://github.com/$AR_REPO.git" if [ -n $GITHUB_TOKEN ]; then @@ -46,10 +46,15 @@ AR_COMPS="$AR_ROOT/components" AR_OUT="$AR_ROOT/out" AR_TOOLS="$AR_OUT/tools" AR_PLATFORM_TXT="$AR_OUT/platform.txt" -AR_ESPTOOL_PY="$AR_TOOLS/esptool.py" AR_GEN_PART_PY="$AR_TOOLS/gen_esp32part.py" AR_SDK="$AR_TOOLS/sdk/$IDF_TARGET" +IDF_COMMIT=$(git -C "$IDF_PATH" rev-parse --short HEAD || echo "") +AR_COMMIT=$(git -C "$AR_COMPS/arduino" rev-parse --short HEAD || echo "") + +rm -rf release-info.txt +echo "Framework built from Tasmota IDF branch $IDF_BRANCH commit $IDF_COMMIT and $AR_REPO branch $AR_BRANCH commit $AR_COMMIT" >> release-info.txt + function get_os(){ OSBITS=`arch` if [[ "$OSTYPE" == "linux"* ]]; then @@ -80,6 +85,14 @@ export SED="sed" export SSTAT="stat -c %s" if [[ "$AR_OS" == "macos" ]]; then + if ! [ -x "$(command -v gsed)" ]; then + echo "ERROR: gsed is not installed! Please install gsed first. ex. brew install gsed" + exit 1 + fi + if ! [ -x "$(command -v gawk)" ]; then + echo "ERROR: gawk is not installed! Please install gawk first. ex. brew install gawk" + exit 1 + fi export SED="gsed" export SSTAT="stat -f %z" fi diff --git a/tools/copy-bootloader.sh b/tools/copy-bootloader.sh index c8faf2dfc..1442c70fa 100755 --- a/tools/copy-bootloader.sh +++ b/tools/copy-bootloader.sh @@ -7,18 +7,8 @@ BOOTCONF=$FLASH_MODE"_$FLASH_FREQ" source ./tools/config.sh -echo "Copying bootloader: $AR_SDK/bin/bootloader_$BOOTCONF.bin" +echo "Copying bootloader: $AR_SDK/bin/bootloader_$BOOTCONF.elf" mkdir -p "$AR_SDK/bin" -# Workaround for getting the bootloaders to be flashable with esptool v4.x -# It might still be needed for IDF5, but using the included esptool instead -#cp "build/bootloader/bootloader.bin" "$AR_SDK/bin/bootloader_$BOOTCONF.bin" - -# We use esptool v.4.21 in Tasmota IDF fork so no need to clone here - -#if [ ! -e "tools/esptool" ]; then -# git clone https://github.com/espressif/esptool tools/esptool -#fi -./esp-idf/components/esptool_py/esptool/esptool.py --chip "$IDF_TARGET" elf2image --dont-append-digest "build/bootloader/bootloader.elf" -o "$AR_SDK/bin/bootloader_$BOOTCONF.bin" cp "build/bootloader/bootloader.elf" "$AR_SDK/bin/bootloader_$BOOTCONF.elf" diff --git a/tools/copy-libs.sh b/tools/copy-libs.sh index 4d044a7dd..a6505d084 100755 --- a/tools/copy-libs.sh +++ b/tools/copy-libs.sh @@ -92,6 +92,8 @@ for item in "${@:2:${#@}-5}"; do if [[ "${item:2:7}" != "ARDUINO" ]] && [[ "$item" != "-DESP32" ]]; then #skip ARDUINO defines DEFINES+="$item " fi + elif [ "$prefix" = "-O" ]; then + PIO_CC_FLAGS+="$item " elif [[ "$item" != "-Wall" && "$item" != "-Werror=all" && "$item" != "-Wextra" ]]; then if [[ "${item:0:23}" != "-mfix-esp32-psram-cache" && "${item:0:18}" != "-fmacro-prefix-map" ]]; then C_FLAGS+="$item " @@ -106,7 +108,7 @@ str=`printf '%b' "$str"` #unescape the string set -- $str for item in "${@:2:${#@}-5}"; do prefix="${item:0:2}" - if [[ "$prefix" != "-I" && "$prefix" != "-D" && "$item" != "-Wall" && "$item" != "-Werror=all" && "$item" != "-Wextra" ]]; then + if [[ "$prefix" != "-I" && "$prefix" != "-D" && "$item" != "-Wall" && "$item" != "-Werror=all" && "$item" != "-Wextra" && "$prefix" != "-O" ]]; then if [[ "${item:0:23}" != "-mfix-esp32-psram-cache" && "${item:0:18}" != "-fmacro-prefix-map" ]]; then AS_FLAGS+="$item " if [[ $C_FLAGS == *"$item"* ]]; then @@ -125,7 +127,7 @@ str=`printf '%b' "$str"` #unescape the string set -- $str for item in "${@:2:${#@}-5}"; do prefix="${item:0:2}" - if [[ "$prefix" != "-I" && "$prefix" != "-D" && "$item" != "-Wall" && "$item" != "-Werror=all" && "$item" != "-Wextra" ]]; then + if [[ "$prefix" != "-I" && "$prefix" != "-D" && "$item" != "-Wall" && "$item" != "-Werror=all" && "$item" != "-Wextra" && "$prefix" != "-O" ]]; then if [[ "${item:0:23}" != "-mfix-esp32-psram-cache" && "${item:0:18}" != "-fmacro-prefix-map" ]]; then CPP_FLAGS+="$item " if [[ $PIO_CC_FLAGS != *"$item"* ]]; then @@ -479,9 +481,6 @@ rm -rf platform_start.txt platform_mid.txt 1platform_mid.txt # sdkconfig cp -f "sdkconfig" "$AR_SDK/sdkconfig" -# esptool.py -cp "$IDF_COMPS/esptool_py/esptool/esptool.py" "$AR_ESPTOOL_PY" - # gen_esp32part.py cp "$IDF_COMPS/partition_table/gen_esp32part.py" "$AR_GEN_PART_PY" diff --git a/tools/copy-to-arduino.sh b/tools/copy-to-arduino.sh index ba5b17273..6880b75d6 100755 --- a/tools/copy-to-arduino.sh +++ b/tools/copy-to-arduino.sh @@ -16,10 +16,9 @@ fi echo "Installing new libraries to $ESP32_ARDUINO" -rm -rf $ESP32_ARDUINO/tools/sdk $ESP32_ARDUINO/tools/esptool.py $ESP32_ARDUINO/tools/gen_esp32part.py $ESP32_ARDUINO/tools/platformio-build-*.py $ESP32_ARDUINO/platform.txt +rm -rf $ESP32_ARDUINO/tools/sdk $ESP32_ARDUINO/tools/gen_esp32part.py $ESP32_ARDUINO/tools/platformio-build-*.py $ESP32_ARDUINO/platform.txt cp -f $AR_OUT/platform.txt $ESP32_ARDUINO/ cp -Rf $AR_TOOLS/sdk $ESP32_ARDUINO/tools/ -cp -f $AR_TOOLS/esptool.py $ESP32_ARDUINO/tools/ cp -f $AR_TOOLS/gen_esp32part.py $ESP32_ARDUINO/tools/ cp -f $AR_TOOLS/platformio-build-*.py $ESP32_ARDUINO/tools/ diff --git a/tools/install-esp-idf.sh b/tools/install-esp-idf.sh index 67127a50f..a6fd16a4c 100755 --- a/tools/install-esp-idf.sh +++ b/tools/install-esp-idf.sh @@ -46,4 +46,4 @@ cp "$IDF_PATH/components/esp32-camera/driver/private_include/cam_hal.h" "$IDF_PA source $IDF_PATH/export.sh export IDF_COMMIT=$(git -C "$IDF_PATH" rev-parse --short HEAD) -export IDF_BRANCH=$(git -C "$IDF_PATH" symbolic-ref --short HEAD) +export IDF_BRANCH=$(git -C "$IDF_PATH" symbolic-ref --short HEAD || git -C "$IDF_PATH" tag --points-at HEAD)