Skip to content

Commit

Permalink
cpu/esp32: print SDK version with esp_log_startup
Browse files Browse the repository at this point in the history
  • Loading branch information
gschorcht committed Jan 1, 2022
1 parent 3b4c5e9 commit 0c56a2d
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 0 deletions.
9 changes: 9 additions & 0 deletions cpu/esp32/include/sdk_conf.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
* @{
Expand Down
3 changes: 3 additions & 0 deletions cpu/esp32/startup.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
5 changes: 5 additions & 0 deletions cpu/esp32/vendor/esp-idf/esp_funcs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down

0 comments on commit 0c56a2d

Please sign in to comment.