From 67aeeecbe8c700df271e088ed0fa547315ecc578 Mon Sep 17 00:00:00 2001 From: me-no-dev Date: Thu, 29 Sep 2022 23:36:31 +0300 Subject: [PATCH 1/2] Enable FREERTOS_WATCHPOINT_END_OF_STACK only for Xtensa --- configs/defconfig.common | 1 - configs/defconfig.esp32 | 3 ++- configs/defconfig.esp32s2 | 3 ++- configs/defconfig.esp32s3 | 3 ++- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/configs/defconfig.common b/configs/defconfig.common index 763504066..60008cf04 100644 --- a/configs/defconfig.common +++ b/configs/defconfig.common @@ -36,7 +36,6 @@ CONFIG_FATFS_LFN_STACK=y CONFIG_FMB_TIMER_PORT_ENABLED=y CONFIG_FREERTOS_HZ=1000 # CONFIG_FREERTOS_ASSERT_ON_UNTESTED_FUNCTION is not set -CONFIG_FREERTOS_WATCHPOINT_END_OF_STACK=y CONFIG_FREERTOS_IDLE_TASK_STACKSIZE=1024 CONFIG_HEAP_POISONING_LIGHT=y CONFIG_HTTPD_MAX_REQ_HDR_LEN=1024 diff --git a/configs/defconfig.esp32 b/configs/defconfig.esp32 index 67f3080b4..bd38b4829 100644 --- a/configs/defconfig.esp32 +++ b/configs/defconfig.esp32 @@ -19,4 +19,5 @@ CONFIG_FREERTOS_FPU_IN_ISR=y 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 \ No newline at end of file +CONFIG_TWAI_ERRATA_FIX_RX_FIFO_CORRUPT=y +CONFIG_FREERTOS_WATCHPOINT_END_OF_STACK=y \ No newline at end of file diff --git a/configs/defconfig.esp32s2 b/configs/defconfig.esp32s2 index 38db2c31c..6dc619a9f 100644 --- a/configs/defconfig.esp32s2 +++ b/configs/defconfig.esp32s2 @@ -4,4 +4,5 @@ CONFIG_ESP32S2_SPIRAM_SUPPORT=y CONFIG_ESP32S2_KEEP_USB_ALIVE=y # CONFIG_ESP_TASK_WDT_CHECK_IDLE_TASK_CPU0 is not set # CONFIG_USE_WAKENET is not set -# CONFIG_USE_MULTINET is not set \ No newline at end of file +# CONFIG_USE_MULTINET is not set +CONFIG_FREERTOS_WATCHPOINT_END_OF_STACK=y \ No newline at end of file diff --git a/configs/defconfig.esp32s3 b/configs/defconfig.esp32s3 index e0b30c998..d56dedcdc 100644 --- a/configs/defconfig.esp32s3 +++ b/configs/defconfig.esp32s3 @@ -8,4 +8,5 @@ CONFIG_ESP32S3_UNIVERSAL_MAC_ADDRESSES_TWO=y CONFIG_SR_WN_MODEL_WN8_QUANT=y CONFIG_SR_WN_WN8_HIESP=y CONFIG_SR_MN_ENGLISH=y -CONFIG_SR_MN_EN_MULTINET5_SINGLE_RECOGNITION_QUANT8=y \ No newline at end of file +CONFIG_SR_MN_EN_MULTINET5_SINGLE_RECOGNITION_QUANT8=y +CONFIG_FREERTOS_WATCHPOINT_END_OF_STACK=y \ No newline at end of file From c3ecc1cb83cf3ae51695a70d647a3caeb43df4af Mon Sep 17 00:00:00 2001 From: me-no-dev Date: Thu, 29 Sep 2022 23:37:30 +0300 Subject: [PATCH 2/2] Skip collecting optimization flag and esptool.py --- tools/config.sh | 1 - tools/copy-libs.sh | 9 ++++----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/tools/config.sh b/tools/config.sh index d9427f024..eef437cb2 100755 --- a/tools/config.sh +++ b/tools/config.sh @@ -43,7 +43,6 @@ 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" 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"