From ff25790326661fe2d2036cccf419d97a3a89a1ed Mon Sep 17 00:00:00 2001 From: m1nl Date: Wed, 23 Apr 2025 12:31:09 +0200 Subject: [PATCH 1/6] fix build scripts --- tools/install-esp-idf.sh | 3 ++ tools/update-components.sh | 59 +++++++++++++++++++++----------------- 2 files changed, 35 insertions(+), 27 deletions(-) diff --git a/tools/install-esp-idf.sh b/tools/install-esp-idf.sh index 0d562a892..536025649 100755 --- a/tools/install-esp-idf.sh +++ b/tools/install-esp-idf.sh @@ -16,6 +16,9 @@ if [ ! -d "$IDF_PATH" ]; then echo "ESP-IDF is not installed! Installing local copy" git clone $IDF_REPO_URL -b $IDF_BRANCH idf_was_installed="1" +else + git -C "$IDF_PATH" fetch + git -C "$IDF_PATH" reset --hard fi if [ "$IDF_COMMIT" ]; then diff --git a/tools/update-components.sh b/tools/update-components.sh index bd0e394a5..db0d09c77 100755 --- a/tools/update-components.sh +++ b/tools/update-components.sh @@ -1,5 +1,6 @@ #/bin/bash +set -e source ./tools/config.sh CAMERA_REPO_URL="https://github.com/espressif/esp32-camera.git" @@ -16,6 +17,9 @@ TINYUSB_REPO_URL="https://github.com/hathach/tinyusb.git" echo "Updating ESP32 Arduino..." if [ ! -d "$AR_COMPS/arduino" ]; then git clone $AR_REPO_URL "$AR_COMPS/arduino" +else + git -C "$AR_COMPS/arduino" fetch + git -C "$AR_COMPS/arduino" reset --hard fi if [ -z $AR_BRANCH ]; then @@ -46,11 +50,9 @@ if [ -z $AR_BRANCH ]; then fi if [ "$AR_BRANCH" ]; then - git -C "$AR_COMPS/arduino" checkout "$AR_BRANCH" && \ - git -C "$AR_COMPS/arduino" fetch && \ - git -C "$AR_COMPS/arduino" pull --ff-only + git -C "$AR_COMPS/arduino" checkout "$AR_BRANCH" fi -if [ $? -ne 0 ]; then exit 1; fi +patch --directory="$AR_COMPS/arduino" -p1 < patches/arduino_typo.diff # # CLONE/UPDATE ESP32-CAMERA @@ -59,45 +61,48 @@ echo "Updating ESP32 Camera..." if [ ! -d "$AR_COMPS/esp32-camera" ]; then git clone $CAMERA_REPO_URL "$AR_COMPS/esp32-camera" else - git -C "$AR_COMPS/esp32-camera" fetch && \ - git -C "$AR_COMPS/esp32-camera" pull --ff-only + git -C "$AR_COMPS/esp32-camera" fetch + git -C "$AR_COMPS/esp32-camera" reset --hard fi -if [ $? -ne 0 ]; then exit 1; fi +git -C "$AR_COMPS/esp32-camera" checkout tags/v2.0.15 # # CLONE/UPDATE ESP-DL # echo "Updating ESP-DL..." if [ ! -d "$AR_COMPS/esp-dl" ]; then - git clone $DL_REPO_URL "$AR_COMPS/esp-dl" && \ - git -C "$AR_COMPS/esp-dl" reset --hard 0632d2447dd49067faabe9761d88fa292589d5d9 - if [ $? -ne 0 ]; then exit 1; fi + git clone $DL_REPO_URL "$AR_COMPS/esp-dl" +else + git -C "$AR_COMPS/esp-dl" fetch + git -C "$AR_COMPS/esp-dl" reset --hard fi +git -C "$AR_COMPS/esp-dl" checkout 0632d2447dd49067faabe9761d88fa292589d5d9 # # CLONE/UPDATE ESP-LITTLEFS # echo "Updating ESP-LITTLEFS..." if [ ! -d "$AR_COMPS/esp_littlefs" ]; then - git clone $LITTLEFS_REPO_URL "$AR_COMPS/esp_littlefs" && \ - git -C "$AR_COMPS/esp_littlefs" submodule update --init --recursive + git clone $LITTLEFS_REPO_URL "$AR_COMPS/esp_littlefs" else - git -C "$AR_COMPS/esp_littlefs" fetch && \ - git -C "$AR_COMPS/esp_littlefs" pull --ff-only && \ - git -C "$AR_COMPS/esp_littlefs" submodule update --init --recursive + git -C "$AR_COMPS/esp_littlefs" fetch + git -C "$AR_COMPS/esp_littlefs" reset --hard fi -if [ $? -ne 0 ]; then exit 1; fi +git -C "$AR_COMPS/esp_littlefs" checkout tags/v1.16.4 +git -C "$AR_COMPS/esp_littlefs" submodule update --init --recursive # # CLONE/UPDATE ESP-RAINMAKER # echo "Updating ESP-RainMaker..." if [ ! -d "$AR_COMPS/esp-rainmaker" ]; then - git clone $RMAKER_REPO_URL "$AR_COMPS/esp-rainmaker" && \ - git -C "$AR_COMPS/esp-rainmaker" reset --hard d8e93454f495bd8a414829ec5e86842b373ff555 && \ - git -C "$AR_COMPS/esp-rainmaker" submodule update --init --recursive + git clone $RMAKER_REPO_URL "$AR_COMPS/esp-rainmaker" +else + git -C "$AR_COMPS/esp-rainmaker" fetch + git -C "$AR_COMPS/esp-rainmaker" reset --hard fi -if [ $? -ne 0 ]; then exit 1; fi +git -C "$AR_COMPS/esp-rainmaker" checkout 0414a8530ec1ac8714269302503c71c238b68836 +git -C "$AR_COMPS/esp-rainmaker" submodule update --init --recursive # # CLONE/UPDATE ESP-DSP @@ -106,10 +111,10 @@ echo "Updating ESP-DSP..." if [ ! -d "$AR_COMPS/espressif__esp-dsp" ]; then git clone $DSP_REPO_URL "$AR_COMPS/espressif__esp-dsp" else - git -C "$AR_COMPS/espressif__esp-dsp" fetch && \ - git -C "$AR_COMPS/espressif__esp-dsp" pull --ff-only + git -C "$AR_COMPS/espressif__esp-dsp" fetch + git -C "$AR_COMPS/espressif__esp-dsp" reset --hard fi -if [ $? -ne 0 ]; then exit 1; fi +git -C "$AR_COMPS/espressif__esp-dsp" checkout tags/v1.6.1 # # CLONE/UPDATE TINYUSB @@ -118,8 +123,8 @@ echo "Updating TinyUSB..." if [ ! -d "$AR_COMPS/arduino_tinyusb/tinyusb" ]; then git clone $TINYUSB_REPO_URL "$AR_COMPS/arduino_tinyusb/tinyusb" else - git -C "$AR_COMPS/arduino_tinyusb/tinyusb" fetch && \ - git -C "$AR_COMPS/arduino_tinyusb/tinyusb" pull --ff-only + git -C "$AR_COMPS/arduino_tinyusb/tinyusb" fetch + git -C "$AR_COMPS/arduino_tinyusb/tinyusb" reset --hard fi -if [ $? -ne 0 ]; then exit 1; fi - +git -C "$AR_COMPS/arduino_tinyusb/tinyusb" checkout 0.15.0 +git -C "$AR_COMPS/arduino_tinyusb/tinyusb" submodule update --init --recursive From a25e05bf824870bc5829bf6fe1711f8a607ffc3b Mon Sep 17 00:00:00 2001 From: m1nl Date: Wed, 23 Apr 2025 12:31:35 +0200 Subject: [PATCH 2/6] add patch for arduino; disable workflows --- .../cron.yml | 0 .../repository_dispatch.yml | 0 patches/arduino_typo.diff | 105 ++++++++++++++++++ 3 files changed, 105 insertions(+) rename .github/{workflows => disabled-workflows}/cron.yml (100%) rename .github/{workflows => disabled-workflows}/repository_dispatch.yml (100%) create mode 100644 patches/arduino_typo.diff diff --git a/.github/workflows/cron.yml b/.github/disabled-workflows/cron.yml similarity index 100% rename from .github/workflows/cron.yml rename to .github/disabled-workflows/cron.yml diff --git a/.github/workflows/repository_dispatch.yml b/.github/disabled-workflows/repository_dispatch.yml similarity index 100% rename from .github/workflows/repository_dispatch.yml rename to .github/disabled-workflows/repository_dispatch.yml diff --git a/patches/arduino_typo.diff b/patches/arduino_typo.diff new file mode 100644 index 000000000..06ec83880 --- /dev/null +++ b/patches/arduino_typo.diff @@ -0,0 +1,105 @@ +diff --git a/libraries/BLE/examples/BLE5_extended_scan/BLE5_extended_scan.ino b/libraries/BLE/examples/BLE5_extended_scan/BLE5_extended_scan.ino +index d3606e69..1439b998 100644 +--- a/libraries/BLE/examples/BLE5_extended_scan/BLE5_extended_scan.ino ++++ b/libraries/BLE/examples/BLE5_extended_scan/BLE5_extended_scan.ino +@@ -19,7 +19,7 @@ uint32_t scanTime = 100; //In 10ms (1000ms) + BLEScan* pBLEScan; + + class MyBLEExtAdvertisingCallbacks: public BLEExtAdvertisingCallbacks { +- void onResult(esp_ble_gap_ext_adv_reprot_t report) { ++ void onResult(esp_ble_gap_ext_adv_report_t report) { + if(report.event_type & ESP_BLE_GAP_SET_EXT_ADV_PROP_LEGACY){ + // here we can receive regular advertising data from BLE4.x devices + Serial.println("BLE4.2"); +diff --git a/libraries/BLE/examples/BLE5_periodic_sync/BLE5_periodic_sync.ino b/libraries/BLE/examples/BLE5_periodic_sync/BLE5_periodic_sync.ino +index ac3a5e98..17fd8596 100644 +--- a/libraries/BLE/examples/BLE5_periodic_sync/BLE5_periodic_sync.ino ++++ b/libraries/BLE/examples/BLE5_periodic_sync/BLE5_periodic_sync.ino +@@ -27,7 +27,7 @@ static esp_ble_gap_periodic_adv_sync_params_t periodic_adv_sync_params = { + + class MyBLEExtAdvertisingCallbacks : public BLEExtAdvertisingCallbacks + { +- void onResult(esp_ble_gap_ext_adv_reprot_t params) ++ void onResult(esp_ble_gap_ext_adv_report_t params) + { + uint8_t *adv_name = NULL; + uint8_t adv_name_len = 0; +diff --git a/libraries/BLE/src/BLEAdvertisedDevice.h b/libraries/BLE/src/BLEAdvertisedDevice.h +index b785838c..155619c3 100644 +--- a/libraries/BLE/src/BLEAdvertisedDevice.h ++++ b/libraries/BLE/src/BLEAdvertisedDevice.h +@@ -135,7 +135,7 @@ public: + * As we are scanning, we will find new devices. When found, this call back is invoked with a reference to the + * device that was found. During any individual scan, a device will only be detected one time. + */ +- virtual void onResult(esp_ble_gap_ext_adv_reprot_t report) = 0; ++ virtual void onResult(esp_ble_gap_ext_adv_report_t report) = 0; + }; + #endif // CONFIG_BT_BLE_50_FEATURES_SUPPORTED + +diff --git a/tools/sdk/esp32/include/bt/host/bluedroid/api/include/api/esp_gap_ble_api.h b/tools/sdk/esp32/include/bt/host/bluedroid/api/include/api/esp_gap_ble_api.h +index 0c06c5e8..06c72514 100644 +--- a/tools/sdk/esp32/include/bt/host/bluedroid/api/include/api/esp_gap_ble_api.h ++++ b/tools/sdk/esp32/include/bt/host/bluedroid/api/include/api/esp_gap_ble_api.h +@@ -896,7 +896,7 @@ typedef struct { + esp_ble_gap_ext_adv_data_status_t data_status; /*!< data type */ + uint8_t adv_data_len; /*!< extend advertising data length */ + uint8_t adv_data[251]; /*!< extend advertising data */ +-} esp_ble_gap_ext_adv_reprot_t; ++} esp_ble_gap_ext_adv_report_t; + + /** + * @brief periodic adv report parameters +@@ -1340,7 +1340,7 @@ typedef union { + * @brief ESP_GAP_BLE_EXT_ADV_REPORT_EVT + */ + struct ble_ext_adv_report_param { +- esp_ble_gap_ext_adv_reprot_t params; /*!< extend advertising report parameters */ ++ esp_ble_gap_ext_adv_report_t params; /*!< extend advertising report parameters */ + } ext_adv_report; /*!< Event parameter of ESP_GAP_BLE_EXT_ADV_REPORT_EVT */ + /** + * @brief ESP_GAP_BLE_PERIODIC_ADV_REPORT_EVT +diff --git a/tools/sdk/esp32c3/include/bt/host/bluedroid/api/include/api/esp_gap_ble_api.h b/tools/sdk/esp32c3/include/bt/host/bluedroid/api/include/api/esp_gap_ble_api.h +index 0c06c5e8..06c72514 100644 +--- a/tools/sdk/esp32c3/include/bt/host/bluedroid/api/include/api/esp_gap_ble_api.h ++++ b/tools/sdk/esp32c3/include/bt/host/bluedroid/api/include/api/esp_gap_ble_api.h +@@ -896,7 +896,7 @@ typedef struct { + esp_ble_gap_ext_adv_data_status_t data_status; /*!< data type */ + uint8_t adv_data_len; /*!< extend advertising data length */ + uint8_t adv_data[251]; /*!< extend advertising data */ +-} esp_ble_gap_ext_adv_reprot_t; ++} esp_ble_gap_ext_adv_report_t; + + /** + * @brief periodic adv report parameters +@@ -1340,7 +1340,7 @@ typedef union { + * @brief ESP_GAP_BLE_EXT_ADV_REPORT_EVT + */ + struct ble_ext_adv_report_param { +- esp_ble_gap_ext_adv_reprot_t params; /*!< extend advertising report parameters */ ++ esp_ble_gap_ext_adv_report_t params; /*!< extend advertising report parameters */ + } ext_adv_report; /*!< Event parameter of ESP_GAP_BLE_EXT_ADV_REPORT_EVT */ + /** + * @brief ESP_GAP_BLE_PERIODIC_ADV_REPORT_EVT +diff --git a/tools/sdk/esp32s3/include/bt/host/bluedroid/api/include/api/esp_gap_ble_api.h b/tools/sdk/esp32s3/include/bt/host/bluedroid/api/include/api/esp_gap_ble_api.h +index 0c06c5e8..06c72514 100644 +--- a/tools/sdk/esp32s3/include/bt/host/bluedroid/api/include/api/esp_gap_ble_api.h ++++ b/tools/sdk/esp32s3/include/bt/host/bluedroid/api/include/api/esp_gap_ble_api.h +@@ -896,7 +896,7 @@ typedef struct { + esp_ble_gap_ext_adv_data_status_t data_status; /*!< data type */ + uint8_t adv_data_len; /*!< extend advertising data length */ + uint8_t adv_data[251]; /*!< extend advertising data */ +-} esp_ble_gap_ext_adv_reprot_t; ++} esp_ble_gap_ext_adv_report_t; + + /** + * @brief periodic adv report parameters +@@ -1340,7 +1340,7 @@ typedef union { + * @brief ESP_GAP_BLE_EXT_ADV_REPORT_EVT + */ + struct ble_ext_adv_report_param { +- esp_ble_gap_ext_adv_reprot_t params; /*!< extend advertising report parameters */ ++ esp_ble_gap_ext_adv_report_t params; /*!< extend advertising report parameters */ + } ext_adv_report; /*!< Event parameter of ESP_GAP_BLE_EXT_ADV_REPORT_EVT */ + /** + * @brief ESP_GAP_BLE_PERIODIC_ADV_REPORT_EVT From 8d5c4d171171fc0202cd963d9d1f984e9e75d30a Mon Sep 17 00:00:00 2001 From: m1nl Date: Wed, 23 Apr 2025 12:32:01 +0200 Subject: [PATCH 3/6] enable pm settings for all esp targets --- configs/defconfig.common | 19 ++++++++++++++++++- configs/defconfig.esp32 | 3 ++- configs/defconfig.esp32c3 | 1 + configs/defconfig.esp32s2 | 3 ++- configs/defconfig.esp32s3 | 3 ++- 5 files changed, 25 insertions(+), 4 deletions(-) diff --git a/configs/defconfig.common b/configs/defconfig.common index cbcfd8d2c..79934dd51 100644 --- a/configs/defconfig.common +++ b/configs/defconfig.common @@ -67,7 +67,7 @@ CONFIG_PTHREAD_TASK_STACK_SIZE_DEFAULT=2048 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_MASTER_ISR_IN_IRAM=y # CONFIG_SPI_SLAVE_ISR_IN_IRAM is not set CONFIG_SPIRAM_MALLOC_ALWAYSINTERNAL=4096 CONFIG_SPIRAM_MALLOC_RESERVE_INTERNAL=0 @@ -92,3 +92,20 @@ 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 + +# Power Management +CONFIG_PM_ENABLE=y +CONFIG_PM_SLP_IRAM_OPT=y +CONFIG_PM_RTOS_IDLE_OPT=y +CONFIG_PM_SLP_DISABLE_GPIO=y +CONFIG_PM_SLP_DEFAULT_PARAMS_OPT=y +CONFIG_PM_LIGHTSLEEP_RTC_OSC_CAL_INTERVAL=1 +CONFIG_FREERTOS_USE_TICKLESS_IDLE=y +CONFIG_FREERTOS_IDLE_TIME_BEFORE_SLEEP=3 +CONFIG_BT_CTRL_MODEM_SLEEP=y +CONFIG_BT_CTRL_MODEM_SLEEP_MODE_1=y +CONFIG_BT_CTRL_LPCLK_SEL_MAIN_XTAL=y +CONFIG_BT_CTRL_MAIN_XTAL_PU_DURING_LIGHT_SLEEP=y +CONFIG_ESP_PHY_MAC_BB_PD=y +CONFIG_ESP_WIFI_SLP_BEACON_LOST_OPT=y +CONFIG_ESP_WIFI_SLP_IRAM_OPT=y diff --git a/configs/defconfig.esp32 b/configs/defconfig.esp32 index bd38b4829..0b455e3e0 100644 --- a/configs/defconfig.esp32 +++ b/configs/defconfig.esp32 @@ -20,4 +20,5 @@ 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 \ No newline at end of file +CONFIG_FREERTOS_WATCHPOINT_END_OF_STACK=y +CONFIG_ESP32_RTC_CLK_SRC_INT_8MD256=y diff --git a/configs/defconfig.esp32c3 b/configs/defconfig.esp32c3 index 31c42f7a0..76604d8ae 100644 --- a/configs/defconfig.esp32c3 +++ b/configs/defconfig.esp32c3 @@ -2,3 +2,4 @@ CONFIG_BT_BLE_BLUFI_ENABLE=y CONFIG_ESP32C3_RTC_CLK_CAL_CYCLES=576 # CONFIG_ESP_TASK_WDT_CHECK_IDLE_TASK_CPU0 is not set CONFIG_FREERTOS_IDLE_TASK_STACKSIZE=2304 +CONFIG_ESP32C3_RTC_CLK_SRC_INT_8MD256=y diff --git a/configs/defconfig.esp32s2 b/configs/defconfig.esp32s2 index 6dc619a9f..d70acb706 100644 --- a/configs/defconfig.esp32s2 +++ b/configs/defconfig.esp32s2 @@ -5,4 +5,5 @@ 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 -CONFIG_FREERTOS_WATCHPOINT_END_OF_STACK=y \ No newline at end of file +CONFIG_FREERTOS_WATCHPOINT_END_OF_STACK=y +CONFIG_ESP32S2_RTC_CLK_SRC_INT_8MD256=y diff --git a/configs/defconfig.esp32s3 b/configs/defconfig.esp32s3 index 981e224fd..88a9c448c 100644 --- a/configs/defconfig.esp32s3 +++ b/configs/defconfig.esp32s3 @@ -10,4 +10,5 @@ CONFIG_SR_WN_WN8_HIESP=y CONFIG_SR_MN_ENGLISH=y CONFIG_SR_MN_EN_MULTINET5_SINGLE_RECOGNITION_QUANT8=y CONFIG_FREERTOS_WATCHPOINT_END_OF_STACK=y -CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=3120 \ No newline at end of file +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=3120 +CONFIG_ESP32S3_RTC_CLK_SRC_INT_8MD256=y From 7776d44a7fdc86a016b1766bff4d1747378b4c39 Mon Sep 17 00:00:00 2001 From: m1nl Date: Wed, 23 Apr 2025 23:43:22 +0200 Subject: [PATCH 4/6] update dependency references --- patches/arduino_typo.diff | 105 ------------------------------------- tools/update-components.sh | 5 +- 2 files changed, 2 insertions(+), 108 deletions(-) delete mode 100644 patches/arduino_typo.diff diff --git a/patches/arduino_typo.diff b/patches/arduino_typo.diff deleted file mode 100644 index 06ec83880..000000000 --- a/patches/arduino_typo.diff +++ /dev/null @@ -1,105 +0,0 @@ -diff --git a/libraries/BLE/examples/BLE5_extended_scan/BLE5_extended_scan.ino b/libraries/BLE/examples/BLE5_extended_scan/BLE5_extended_scan.ino -index d3606e69..1439b998 100644 ---- a/libraries/BLE/examples/BLE5_extended_scan/BLE5_extended_scan.ino -+++ b/libraries/BLE/examples/BLE5_extended_scan/BLE5_extended_scan.ino -@@ -19,7 +19,7 @@ uint32_t scanTime = 100; //In 10ms (1000ms) - BLEScan* pBLEScan; - - class MyBLEExtAdvertisingCallbacks: public BLEExtAdvertisingCallbacks { -- void onResult(esp_ble_gap_ext_adv_reprot_t report) { -+ void onResult(esp_ble_gap_ext_adv_report_t report) { - if(report.event_type & ESP_BLE_GAP_SET_EXT_ADV_PROP_LEGACY){ - // here we can receive regular advertising data from BLE4.x devices - Serial.println("BLE4.2"); -diff --git a/libraries/BLE/examples/BLE5_periodic_sync/BLE5_periodic_sync.ino b/libraries/BLE/examples/BLE5_periodic_sync/BLE5_periodic_sync.ino -index ac3a5e98..17fd8596 100644 ---- a/libraries/BLE/examples/BLE5_periodic_sync/BLE5_periodic_sync.ino -+++ b/libraries/BLE/examples/BLE5_periodic_sync/BLE5_periodic_sync.ino -@@ -27,7 +27,7 @@ static esp_ble_gap_periodic_adv_sync_params_t periodic_adv_sync_params = { - - class MyBLEExtAdvertisingCallbacks : public BLEExtAdvertisingCallbacks - { -- void onResult(esp_ble_gap_ext_adv_reprot_t params) -+ void onResult(esp_ble_gap_ext_adv_report_t params) - { - uint8_t *adv_name = NULL; - uint8_t adv_name_len = 0; -diff --git a/libraries/BLE/src/BLEAdvertisedDevice.h b/libraries/BLE/src/BLEAdvertisedDevice.h -index b785838c..155619c3 100644 ---- a/libraries/BLE/src/BLEAdvertisedDevice.h -+++ b/libraries/BLE/src/BLEAdvertisedDevice.h -@@ -135,7 +135,7 @@ public: - * As we are scanning, we will find new devices. When found, this call back is invoked with a reference to the - * device that was found. During any individual scan, a device will only be detected one time. - */ -- virtual void onResult(esp_ble_gap_ext_adv_reprot_t report) = 0; -+ virtual void onResult(esp_ble_gap_ext_adv_report_t report) = 0; - }; - #endif // CONFIG_BT_BLE_50_FEATURES_SUPPORTED - -diff --git a/tools/sdk/esp32/include/bt/host/bluedroid/api/include/api/esp_gap_ble_api.h b/tools/sdk/esp32/include/bt/host/bluedroid/api/include/api/esp_gap_ble_api.h -index 0c06c5e8..06c72514 100644 ---- a/tools/sdk/esp32/include/bt/host/bluedroid/api/include/api/esp_gap_ble_api.h -+++ b/tools/sdk/esp32/include/bt/host/bluedroid/api/include/api/esp_gap_ble_api.h -@@ -896,7 +896,7 @@ typedef struct { - esp_ble_gap_ext_adv_data_status_t data_status; /*!< data type */ - uint8_t adv_data_len; /*!< extend advertising data length */ - uint8_t adv_data[251]; /*!< extend advertising data */ --} esp_ble_gap_ext_adv_reprot_t; -+} esp_ble_gap_ext_adv_report_t; - - /** - * @brief periodic adv report parameters -@@ -1340,7 +1340,7 @@ typedef union { - * @brief ESP_GAP_BLE_EXT_ADV_REPORT_EVT - */ - struct ble_ext_adv_report_param { -- esp_ble_gap_ext_adv_reprot_t params; /*!< extend advertising report parameters */ -+ esp_ble_gap_ext_adv_report_t params; /*!< extend advertising report parameters */ - } ext_adv_report; /*!< Event parameter of ESP_GAP_BLE_EXT_ADV_REPORT_EVT */ - /** - * @brief ESP_GAP_BLE_PERIODIC_ADV_REPORT_EVT -diff --git a/tools/sdk/esp32c3/include/bt/host/bluedroid/api/include/api/esp_gap_ble_api.h b/tools/sdk/esp32c3/include/bt/host/bluedroid/api/include/api/esp_gap_ble_api.h -index 0c06c5e8..06c72514 100644 ---- a/tools/sdk/esp32c3/include/bt/host/bluedroid/api/include/api/esp_gap_ble_api.h -+++ b/tools/sdk/esp32c3/include/bt/host/bluedroid/api/include/api/esp_gap_ble_api.h -@@ -896,7 +896,7 @@ typedef struct { - esp_ble_gap_ext_adv_data_status_t data_status; /*!< data type */ - uint8_t adv_data_len; /*!< extend advertising data length */ - uint8_t adv_data[251]; /*!< extend advertising data */ --} esp_ble_gap_ext_adv_reprot_t; -+} esp_ble_gap_ext_adv_report_t; - - /** - * @brief periodic adv report parameters -@@ -1340,7 +1340,7 @@ typedef union { - * @brief ESP_GAP_BLE_EXT_ADV_REPORT_EVT - */ - struct ble_ext_adv_report_param { -- esp_ble_gap_ext_adv_reprot_t params; /*!< extend advertising report parameters */ -+ esp_ble_gap_ext_adv_report_t params; /*!< extend advertising report parameters */ - } ext_adv_report; /*!< Event parameter of ESP_GAP_BLE_EXT_ADV_REPORT_EVT */ - /** - * @brief ESP_GAP_BLE_PERIODIC_ADV_REPORT_EVT -diff --git a/tools/sdk/esp32s3/include/bt/host/bluedroid/api/include/api/esp_gap_ble_api.h b/tools/sdk/esp32s3/include/bt/host/bluedroid/api/include/api/esp_gap_ble_api.h -index 0c06c5e8..06c72514 100644 ---- a/tools/sdk/esp32s3/include/bt/host/bluedroid/api/include/api/esp_gap_ble_api.h -+++ b/tools/sdk/esp32s3/include/bt/host/bluedroid/api/include/api/esp_gap_ble_api.h -@@ -896,7 +896,7 @@ typedef struct { - esp_ble_gap_ext_adv_data_status_t data_status; /*!< data type */ - uint8_t adv_data_len; /*!< extend advertising data length */ - uint8_t adv_data[251]; /*!< extend advertising data */ --} esp_ble_gap_ext_adv_reprot_t; -+} esp_ble_gap_ext_adv_report_t; - - /** - * @brief periodic adv report parameters -@@ -1340,7 +1340,7 @@ typedef union { - * @brief ESP_GAP_BLE_EXT_ADV_REPORT_EVT - */ - struct ble_ext_adv_report_param { -- esp_ble_gap_ext_adv_reprot_t params; /*!< extend advertising report parameters */ -+ esp_ble_gap_ext_adv_report_t params; /*!< extend advertising report parameters */ - } ext_adv_report; /*!< Event parameter of ESP_GAP_BLE_EXT_ADV_REPORT_EVT */ - /** - * @brief ESP_GAP_BLE_PERIODIC_ADV_REPORT_EVT diff --git a/tools/update-components.sh b/tools/update-components.sh index db0d09c77..e96ddb9e4 100755 --- a/tools/update-components.sh +++ b/tools/update-components.sh @@ -32,7 +32,7 @@ if [ -z $AR_BRANCH ]; then if [[ "$current_branch" != "master" && `git_branch_exists "$AR_COMPS/arduino" "$current_branch"` == "1" ]]; then export AR_BRANCH="$current_branch" else - if [ -z "$IDF_COMMIT" ]; then #commit was not specified at build time + if [ -z "$IDF_COMMIT" ]; then # commit was not specified at build time AR_BRANCH_NAME="idf-$IDF_BRANCH" else AR_BRANCH_NAME="idf-$IDF_COMMIT" @@ -52,7 +52,6 @@ fi if [ "$AR_BRANCH" ]; then git -C "$AR_COMPS/arduino" checkout "$AR_BRANCH" fi -patch --directory="$AR_COMPS/arduino" -p1 < patches/arduino_typo.diff # # CLONE/UPDATE ESP32-CAMERA @@ -101,7 +100,7 @@ else git -C "$AR_COMPS/esp-rainmaker" fetch git -C "$AR_COMPS/esp-rainmaker" reset --hard fi -git -C "$AR_COMPS/esp-rainmaker" checkout 0414a8530ec1ac8714269302503c71c238b68836 +git -C "$AR_COMPS/esp-rainmaker" checkout d8e93454f495bd8a414829ec5e86842b373ff555 git -C "$AR_COMPS/esp-rainmaker" submodule update --init --recursive # From 8b831d5995046ffb604985b4e10c2cc995d84c60 Mon Sep 17 00:00:00 2001 From: m1nl Date: Thu, 24 Apr 2025 11:19:25 +0200 Subject: [PATCH 5/6] enable WiFi and SPI IRAM optimizations --- configs/defconfig.common | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/configs/defconfig.common b/configs/defconfig.common index 79934dd51..6b88399f6 100644 --- a/configs/defconfig.common +++ b/configs/defconfig.common @@ -26,8 +26,8 @@ CONFIG_ESP32_WIFI_STATIC_TX_BUFFER_NUM=8 CONFIG_ESP32_WIFI_CACHE_TX_BUFFER_NUM=16 CONFIG_ESP32_WIFI_CSI_ENABLED=y CONFIG_ESP32_WIFI_ENABLE_WPA3_SAE=y -# CONFIG_ESP32_WIFI_IRAM_OPT is not set -# CONFIG_ESP32_WIFI_RX_IRAM_OPT is not set +CONFIG_ESP32_WIFI_IRAM_OPT=y +CONFIG_ESP32_WIFI_RX_IRAM_OPT=y CONFIG_ETH_SPI_ETHERNET_DM9051=y CONFIG_ETH_SPI_ETHERNET_W5500=y CONFIG_FATFS_CODEPAGE_850=y @@ -67,6 +67,7 @@ CONFIG_PTHREAD_TASK_STACK_SIZE_DEFAULT=2048 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_IN_IRAM=y CONFIG_SPI_MASTER_ISR_IN_IRAM=y # CONFIG_SPI_SLAVE_ISR_IN_IRAM is not set CONFIG_SPIRAM_MALLOC_ALWAYSINTERNAL=4096 From c9dea836456306d48e108ae2b8a770074df79993 Mon Sep 17 00:00:00 2001 From: m1nl Date: Fri, 25 Apr 2025 09:12:12 +0200 Subject: [PATCH 6/6] disable WiFi IRAM optimizations for better stability on esp32s2 --- configs/defconfig.common | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configs/defconfig.common b/configs/defconfig.common index 6b88399f6..801ca376c 100644 --- a/configs/defconfig.common +++ b/configs/defconfig.common @@ -26,8 +26,8 @@ CONFIG_ESP32_WIFI_STATIC_TX_BUFFER_NUM=8 CONFIG_ESP32_WIFI_CACHE_TX_BUFFER_NUM=16 CONFIG_ESP32_WIFI_CSI_ENABLED=y CONFIG_ESP32_WIFI_ENABLE_WPA3_SAE=y -CONFIG_ESP32_WIFI_IRAM_OPT=y -CONFIG_ESP32_WIFI_RX_IRAM_OPT=y +# CONFIG_ESP32_WIFI_IRAM_OPT is not set +# CONFIG_ESP32_WIFI_RX_IRAM_OPT is not set CONFIG_ETH_SPI_ETHERNET_DM9051=y CONFIG_ETH_SPI_ETHERNET_W5500=y CONFIG_FATFS_CODEPAGE_850=y