From 8595750e47f742ef347ddb2e7533150554609253 Mon Sep 17 00:00:00 2001 From: Pablo Clemente Date: Fri, 11 Nov 2022 10:18:53 +0100 Subject: [PATCH 1/3] Added esp-insights to esp32 target build --- CMakeLists.txt | 2 +- configs/builds.json | 2 +- configs/defconfig.insights | 21 +++++++++++++++++++++ tools/update-components.sh | 15 +++++++++++++++ 4 files changed, 38 insertions(+), 2 deletions(-) create mode 100644 configs/defconfig.insights diff --git a/CMakeLists.txt b/CMakeLists.txt index 7f99bc0f3..a3be4c620 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,7 +2,7 @@ # CMakeLists in this exact order for cmake to work correctly cmake_minimum_required(VERSION 3.5) -set(EXTRA_COMPONENT_DIRS ${CMAKE_SOURCE_DIR}/components/esp-rainmaker/components) +set(EXTRA_COMPONENT_DIRS ${CMAKE_SOURCE_DIR}/components/esp-rainmaker/components ${CMAKE_SOURCE_DIR}/components/esp-insights/components) include($ENV{IDF_PATH}/tools/cmake/project.cmake) project(arduino-lib-builder) diff --git a/configs/builds.json b/configs/builds.json index c32e465e4..e84cc3430 100644 --- a/configs/builds.json +++ b/configs/builds.json @@ -98,7 +98,7 @@ }, { "target": "esp32", - "features":["qio_ram"], + "features":["qio_ram","insights"], "idf_libs":["qio","80m"], "bootloaders":[ ["qio","80m"], diff --git a/configs/defconfig.insights b/configs/defconfig.insights new file mode 100644 index 000000000..6c5cdf0d1 --- /dev/null +++ b/configs/defconfig.insights @@ -0,0 +1,21 @@ +CONFIG_ESP_INSIGHTS_ENABLED=y +CONFIG_ESP_INSIGHTS_DEBUG_ENABLED=y +# CONFIG_ESP_INSIGHTS_TRANSPORT_MQTT is not set +CONFIG_ESP_INSIGHTS_TRANSPORT_HTTPS=y + +CONFIG_DIAG_ENABLE_METRICS=y +CONFIG_DIAG_ENABLE_WIFI_METRICS=y +CONFIG_DIAG_ENABLE_HEAP_METRICS=y +CONFIG_DIAG_ENABLE_VARIABLES=y +CONFIG_DIAG_ENABLE_NETWORK_VARIABLES=y + +CONFIG_ESP32_ENABLE_COREDUMP=y +CONFIG_ESP32_ENABLE_COREDUMP_TO_FLASH=y +CONFIG_ESP32_COREDUMP_DATA_FORMAT_ELF=y +CONFIG_ESP32_COREDUMP_CHECKSUM_CRC32=y +CONFIG_ESP32_CORE_DUMP_MAX_TASKS_NUM=64 +CONFIG_ESP32_CORE_DUMP_STACK_SIZE=1024 + +CONFIG_MBEDTLS_DYNAMIC_BUFFER=y +CONFIG_MBEDTLS_DYNAMIC_FREE_PEER_CERT=y +CONFIG_MBEDTLS_DYNAMIC_FREE_CONFIG_DATA=y \ No newline at end of file diff --git a/tools/update-components.sh b/tools/update-components.sh index 41149c000..f6ed3bd95 100755 --- a/tools/update-components.sh +++ b/tools/update-components.sh @@ -6,6 +6,7 @@ CAMERA_REPO_URL="https://github.com/espressif/esp32-camera.git" DL_REPO_URL="https://github.com/espressif/esp-dl.git" SR_REPO_URL="https://github.com/espressif/esp-sr.git" RMAKER_REPO_URL="https://github.com/espressif/esp-rainmaker.git" +INSIGHTS_REPO_URL="https://github.com/espressif/esp-insights.git" DSP_REPO_URL="https://github.com/espressif/esp-dsp.git" LITTLEFS_REPO_URL="https://github.com/joltwallet/esp_littlefs.git" TINYUSB_REPO_URL="https://github.com/hathach/tinyusb.git" @@ -121,6 +122,20 @@ else fi if [ $? -ne 0 ]; then exit 1; fi +# +# CLONE/UPDATE ESP-INSIGHTS +# + +if [ ! -d "$AR_COMPS/esp-insights" ]; then + git clone $INSIGHTS_REPO_URL "$AR_COMPS/esp-insights" && \ + git -C "$AR_COMPS/esp-insights" submodule update --init --recursive +else + git -C "$AR_COMPS/esp-insights" fetch && \ + git -C "$AR_COMPS/esp-insights" pull --ff-only && \ + git -C "$AR_COMPS/esp-insights" submodule update --init --recursive +fi +if [ $? -ne 0 ]; then exit 1; fi + # # CLONE/UPDATE ESP-DSP # From 6552c7ab5325d7b29ce10df0faf595788051787b Mon Sep 17 00:00:00 2001 From: Pablo Clemente Date: Fri, 11 Nov 2022 10:19:27 +0100 Subject: [PATCH 2/3] Enabled coredump partition for esp-insights --- configs/defconfig.insights | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/configs/defconfig.insights b/configs/defconfig.insights index 6c5cdf0d1..c87330d2c 100644 --- a/configs/defconfig.insights +++ b/configs/defconfig.insights @@ -1,5 +1,6 @@ CONFIG_ESP_INSIGHTS_ENABLED=y CONFIG_ESP_INSIGHTS_DEBUG_ENABLED=y +CONFIG_ESP_INSIGHTS_COREDUMP_ENABLE=y # CONFIG_ESP_INSIGHTS_TRANSPORT_MQTT is not set CONFIG_ESP_INSIGHTS_TRANSPORT_HTTPS=y @@ -18,4 +19,9 @@ CONFIG_ESP32_CORE_DUMP_STACK_SIZE=1024 CONFIG_MBEDTLS_DYNAMIC_BUFFER=y CONFIG_MBEDTLS_DYNAMIC_FREE_PEER_CERT=y -CONFIG_MBEDTLS_DYNAMIC_FREE_CONFIG_DATA=y \ No newline at end of file +CONFIG_MBEDTLS_DYNAMIC_FREE_CONFIG_DATA=y + +CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions.csv" +CONFIG_PARTITION_TABLE_FILENAME="partitions.csv" +CONFIG_PARTITION_TABLE_OFFSET=0x8000 +CONFIG_PARTITION_TABLE_MD5=y \ No newline at end of file From ad58b8d09dbff254da2e9bd53a8e976fe14c4b69 Mon Sep 17 00:00:00 2001 From: Pablo Clemente Maseda Date: Wed, 23 Nov 2022 15:50:23 +0100 Subject: [PATCH 3/3] Disabled ESP-Insights debug --- configs/defconfig.insights | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configs/defconfig.insights b/configs/defconfig.insights index c87330d2c..eb5d6ac43 100644 --- a/configs/defconfig.insights +++ b/configs/defconfig.insights @@ -1,5 +1,5 @@ CONFIG_ESP_INSIGHTS_ENABLED=y -CONFIG_ESP_INSIGHTS_DEBUG_ENABLED=y +# CONFIG_ESP_INSIGHTS_DEBUG_ENABLED is not set CONFIG_ESP_INSIGHTS_COREDUMP_ENABLE=y # CONFIG_ESP_INSIGHTS_TRANSPORT_MQTT is not set CONFIG_ESP_INSIGHTS_TRANSPORT_HTTPS=y