diff --git a/cpu/esp32/include/sdk_conf.h b/cpu/esp32/include/sdk_conf.h index 6581737ce040..21b9ba02890e 100644 --- a/cpu/esp32/include/sdk_conf.h +++ b/cpu/esp32/include/sdk_conf.h @@ -28,6 +28,15 @@ extern "C" { #endif +/** + * @brief SDK version number + * + * Determined with `git describe --tags` in `$ESP32_SDK_DIR` + */ +#if !defined(IDF_VER) || DOXYGEN +#include "esp32_idf_version.h" +#endif + /** * @name Clock configuration * @{ diff --git a/cpu/esp32/startup.c b/cpu/esp32/startup.c index 432387e26c56..5c3e5887db00 100644 --- a/cpu/esp32/startup.c +++ b/cpu/esp32/startup.c @@ -156,6 +156,9 @@ NORETURN void IRAM call_start_cpu0 (void) ets_printf("%02x", cpu_id[i]); } ets_printf("\n"); + + extern char* esp_get_idf_version(void); + LOG_STARTUP("ESP-IDF SDK Version %s\n\n", esp_get_idf_version()); #endif if (reset_reason == DEEPSLEEP_RESET) { diff --git a/cpu/esp32/vendor/esp-idf/esp_funcs.c b/cpu/esp32/vendor/esp-idf/esp_funcs.c index 303bed26b3f7..81ce4f5d46b9 100644 --- a/cpu/esp32/vendor/esp-idf/esp_funcs.c +++ b/cpu/esp32/vendor/esp-idf/esp_funcs.c @@ -482,6 +482,11 @@ void IRAM_ATTR esp_restart_noos(void) } } +const char* esp_get_idf_version(void) +{ + return IDF_VER; +} + /* * source: /path/to/esp-idf/components/wpa_supplicant/port/os_xtensa.c */