From 48b50327a0931311f0979bbc301e3fb3bc56cb7b Mon Sep 17 00:00:00 2001 From: Akos Vandra-Meyer Date: Sun, 2 Oct 2022 18:46:46 +0200 Subject: [PATCH] Make esp_app_desc a weak symbol By doing so, the application will be able to define its own esp_app_desc generated at their discretion, with help of whatever build process they use, and removes the necessity to rebuild esp-idf every time only to have the esp_app_desc updated. Removes the patch necessary for https://github.com/esp-rs/esp-idf-sys/pull/136, where we are building esp-idf and basically linking it as a static library. The process building the library doesn't have access to the real application version or the build time, since we are only rebuilding esp-idf if the sdkconfig changes. --- components/esp_app_format/esp_app_desc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/esp_app_format/esp_app_desc.c b/components/esp_app_format/esp_app_desc.c index 909bb94a4c..edb22d0893 100644 --- a/components/esp_app_format/esp_app_desc.c +++ b/components/esp_app_format/esp_app_desc.c @@ -12,7 +12,7 @@ // Application version info -const __attribute__((section(".rodata_desc"))) esp_app_desc_t esp_app_desc = { +const __attribute__((weak)) __attribute__((section(".rodata_desc"))) esp_app_desc_t esp_app_desc = { .magic_word = ESP_APP_DESC_MAGIC_WORD, #ifdef CONFIG_APP_EXCLUDE_PROJECT_VER_VAR .version = "",