|
|
@@ -19,8 +19,17 @@
|
|
|
// Application version info
|
|
|
const __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 = "",
|
|
|
+#else
|
|
|
.version = PROJECT_VER,
|
|
|
+#endif
|
|
|
+
|
|
|
+#ifdef CONFIG_APP_EXCLUDE_PROJECT_NAME_VAR
|
|
|
+ .project_name = "",
|
|
|
+#else
|
|
|
.project_name = PROJECT_NAME,
|
|
|
+#endif
|
|
|
.idf_ver = IDF_VER,
|
|
|
|
|
|
#ifdef CONFIG_APP_SECURE_VERSION
|
|
|
@@ -39,9 +48,13 @@ const __attribute__((section(".rodata_desc"))) esp_app_desc_t esp_app_desc = {
|
|
|
};
|
|
|
|
|
|
|
|
|
+#ifndef CONFIG_APP_EXCLUDE_PROJECT_VER_VAR
|
|
|
_Static_assert(sizeof(PROJECT_VER) <= sizeof(esp_app_desc.version), "PROJECT_VER is longer than version field in structure");
|
|
|
+#endif
|
|
|
_Static_assert(sizeof(IDF_VER) <= sizeof(esp_app_desc.idf_ver), "IDF_VER is longer than idf_ver field in structure");
|
|
|
+#ifndef CONFIG_APP_EXCLUDE_PROJECT_NAME_VAR
|
|
|
_Static_assert(sizeof(PROJECT_NAME) <= sizeof(esp_app_desc.project_name), "PROJECT_NAME is longer than project_name field in structure");
|
|
|
+#endif
|
|
|
|
|
|
const esp_app_desc_t *esp_ota_get_app_description(void)
|
|
|
{
|