2022-12-13 12:16:56 -05:00
|
|
|
/*
|
2024-02-12 00:51:25 -05:00
|
|
|
* SPDX-FileCopyrightText: 2022-2024 Espressif Systems (Shanghai) CO LTD
|
2022-12-13 12:16:56 -05:00
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <assert.h>
|
|
|
|
#include <sys/param.h>
|
|
|
|
#include "esp_bootloader_desc.h"
|
|
|
|
#include "sdkconfig.h"
|
|
|
|
|
|
|
|
// Bootloader version info
|
2024-02-12 00:51:25 -05:00
|
|
|
#if BOOTLOADER_BUILD
|
|
|
|
__attribute__((section(".data_bootloader_desc")))
|
|
|
|
#endif
|
|
|
|
__attribute__((weak))
|
|
|
|
const esp_bootloader_desc_t esp_bootloader_desc = {
|
2022-12-13 12:16:56 -05:00
|
|
|
.magic_byte = ESP_BOOTLOADER_DESC_MAGIC_BYTE,
|
|
|
|
.reserved = { 0 },
|
|
|
|
.version = CONFIG_BOOTLOADER_PROJECT_VER,
|
|
|
|
.idf_ver = IDF_VER,
|
|
|
|
#ifdef CONFIG_BOOTLOADER_COMPILE_TIME_DATE
|
|
|
|
.date_time = __DATE__ " " __TIME__,
|
|
|
|
#else
|
|
|
|
.date_time = "",
|
|
|
|
#endif
|
|
|
|
.reserved2 = { 0 },
|
|
|
|
};
|
|
|
|
|
|
|
|
_Static_assert(sizeof(IDF_VER) <= sizeof(esp_bootloader_desc.idf_ver), "IDF_VER is longer than idf_ver field in structure");
|
|
|
|
|
|
|
|
const esp_bootloader_desc_t *esp_bootloader_get_description(void)
|
|
|
|
{
|
|
|
|
return &esp_bootloader_desc;
|
|
|
|
}
|