ESP INSIGHT Enable issue
Posted: Wed May 28, 2025 10:12 am
Build Fails with ESP Insights Enabled — Undefined References to esp_diag_* Functions
Board: ESP32-S3
ESP-IDF Version: v5.3
Toolchain: xtensa-esp-elf-gcc 13.2.0
Custom Components Path: /home/dnk133/HONEYKOMB_MERGE/components/esp-insights/
Problem: Build fails when ESP Insights is enabled via menuconfig.
Description:
When I enable ESP Insights from menuconfig, the project fails to build with linker errors for undefined references to diagnostic functions such as:
esp_diag_heap_metrics_init
esp_diag_heap_metrics_deinit
esp_diag_wifi_metrics_init
esp_diag_wifi_metrics_deinit
esp_diag_network_variables_init
esp_diag_network_variables_deinit
These originate from esp_insights.c:
esp-idf/esp_insights/libesp_insights.a(esp_insights.c.obj): in function `metrics_init':
esp_insights.c:702:(.text.metrics_init+0x16): undefined reference to `esp_diag_heap_metrics_init'
...
esp_insights.c:746:(.text.variables_init+0x15): undefined reference to `esp_diag_network_variables_init'
Steps to Reproduce:
Clone a working ESP-IDF project.
Enable ESP Insights via idf.py menuconfig.
Build the project: idf.py build
Observe the linker errors.
What I’ve Tried:
Cleaned the build: idf.py fullclean
Verified that esp-insights is added under components/
Checked that the functions do not exist in any other components
Ensured all submodules are updated: git submodule update --init --recursive
Questions:
Are the esp_diag_* functions part of another component I need to explicitly include?
Is there a specific component or config that must be enabled alongside ESP Insights?
Are these APIs deprecated or moved in ESP-IDF v5.3?
Any guidance or example of a working config using esp_insights?
Any help would be appreciated! If needed, I can provide a minimal reproducible example.
Thanks!
Board: ESP32-S3
ESP-IDF Version: v5.3
Toolchain: xtensa-esp-elf-gcc 13.2.0
Custom Components Path: /home/dnk133/HONEYKOMB_MERGE/components/esp-insights/
Problem: Build fails when ESP Insights is enabled via menuconfig.
Description:
When I enable ESP Insights from menuconfig, the project fails to build with linker errors for undefined references to diagnostic functions such as:
esp_diag_heap_metrics_init
esp_diag_heap_metrics_deinit
esp_diag_wifi_metrics_init
esp_diag_wifi_metrics_deinit
esp_diag_network_variables_init
esp_diag_network_variables_deinit
These originate from esp_insights.c:
esp-idf/esp_insights/libesp_insights.a(esp_insights.c.obj): in function `metrics_init':
esp_insights.c:702:(.text.metrics_init+0x16): undefined reference to `esp_diag_heap_metrics_init'
...
esp_insights.c:746:(.text.variables_init+0x15): undefined reference to `esp_diag_network_variables_init'
Steps to Reproduce:
Clone a working ESP-IDF project.
Enable ESP Insights via idf.py menuconfig.
Build the project: idf.py build
Observe the linker errors.
What I’ve Tried:
Cleaned the build: idf.py fullclean
Verified that esp-insights is added under components/
Checked that the functions do not exist in any other components
Ensured all submodules are updated: git submodule update --init --recursive
Questions:
Are the esp_diag_* functions part of another component I need to explicitly include?
Is there a specific component or config that must be enabled alongside ESP Insights?
Are these APIs deprecated or moved in ESP-IDF v5.3?
Any guidance or example of a working config using esp_insights?
Any help would be appreciated! If needed, I can provide a minimal reproducible example.
Thanks!