fixing the binary app_name for squeezelite

This commit is contained in:
Sebastien
2020-03-21 12:38:10 -04:00
parent 3870b86a31
commit 8a81fe821f
10 changed files with 157 additions and 47 deletions

View File

@@ -1,13 +1,9 @@
idf_component_register( SRC_DIRS .
INCLUDE_DIRS .
PRIV_REQUIRES bootloader_support
)
#idf_build_get_property(IS_RECOVERY 0 )
#target_link_options(__idf_platform_console PUBLIC $<$<EQUAL:${IS_RECOVERY},1>:${COMPONENT_LIB}>)
#add_library(libcmd_squeezelite STATIC cmd_squeezelite.c )
#__component_add_include_dirs(libcmd_squeezelite "${__INCLUDE_DIRS}" INTERFACE)
#set_property(TARGET libcmd_squeezelite APPEND PROPERTY LINK_LIBRARIES console)
#set_property(TARGET libcmd_squeezelite APPEND PROPERTY INTERFACE_LINK_LIBRARIES $<LINK_ONLY:console>)
#
#
#add_library(librecovery STATIC recovery.c )
#target_link_options(${COMPONENT_LIB} PUBLIC $<IF:${IS_RECOVERY},librecovery.a,libcmd_squeezelite.a>)
target_link_libraries(${COMPONENT_LIB} INTERFACE "-Wl,--undefined=esp_app_desc")
idf_build_get_property(project_ver PROJECT_VER)
string(SUBSTRING "${project_ver}" 0 31 PROJECT_VER_CUT)
set_source_files_properties(recovery.c PROPERTIES COMPILE_DEFINITIONS "PROJECT_VER=\"${PROJECT_VER_CUT}\"; PROJECT_NAME=\"recovery\"")

View File

@@ -0,0 +1,2 @@
#pragma once
#define PROJECT_NAME "recovery"

View File

@@ -1,3 +1,30 @@
#include <stdio.h>
#include <string.h>
#include "esp_app_format.h"
const __attribute__((section(".rodata_desc"))) esp_app_desc_t esp_app_desc = {
.magic_word = ESP_APP_DESC_MAGIC_WORD,
.version = PROJECT_VER,
.project_name = PROJECT_NAME,
.idf_ver = IDF_VER,
#ifdef CONFIG_BOOTLOADER_APP_SECURE_VERSION
.secure_version = CONFIG_BOOTLOADER_APP_SECURE_VERSION,
#else
.secure_version = 0,
#endif
#ifdef CONFIG_APP_COMPILE_TIME_DATE
.time = __TIME__,
.date = __DATE__,
#else
.time = "",
.date = "",
#endif
};
int main(int argc, char **argv){
return 1;
}