mirror of
https://github.com/sle118/squeezelite-esp32.git
synced 2025-12-09 13:07:03 +03:00
make some squeezelite symbol weak to force removal from recovery during link
This commit is contained in:
@@ -30,8 +30,19 @@ const __attribute__((section(".rodata_desc"))) esp_app_desc_t esp_app_desc = {
|
|||||||
int main(int argc, char **argv){
|
int main(int argc, char **argv){
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
void register_squeezelite(){
|
void register_squeezelite(){
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void register_external(void) {
|
||||||
|
}
|
||||||
|
|
||||||
|
void deregister_external(void) {
|
||||||
|
}
|
||||||
|
|
||||||
|
void decode_restore(int external) {
|
||||||
|
}
|
||||||
|
|
||||||
esp_err_t start_ota(const char * bin_url, char * bin_buffer, uint32_t length)
|
esp_err_t start_ota(const char * bin_url, char * bin_buffer, uint32_t length)
|
||||||
{
|
{
|
||||||
return process_recovery_ota(bin_url,bin_buffer,length);
|
return process_recovery_ota(bin_url,bin_buffer,length);
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
idf_component_register(SRC_DIRS .
|
idf_component_register(SRC_DIRS .
|
||||||
INCLUDE_DIRS . ${IDF_PATH}/components/driver
|
INCLUDE_DIRS . ${IDF_PATH}/components/driver
|
||||||
REQUIRES json tools platform_config display wifi-manager
|
REQUIRES json tools platform_config display wifi-manager
|
||||||
PRIV_REQUIRES soc esp32 squeezelite
|
PRIV_REQUIRES soc esp32
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -28,7 +28,6 @@
|
|||||||
#include "driver/gpio.h"
|
#include "driver/gpio.h"
|
||||||
#include "driver/spi_common_internal.h"
|
#include "driver/spi_common_internal.h"
|
||||||
#include "esp32/rom/efuse.h"
|
#include "esp32/rom/efuse.h"
|
||||||
#include "adac.h"
|
|
||||||
#include "tools.h"
|
#include "tools.h"
|
||||||
#include "monitor.h"
|
#include "monitor.h"
|
||||||
#include "messaging.h"
|
#include "messaging.h"
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
idf_component_register(SRCS operator.cpp tools.c trace.c
|
idf_component_register( SRCS operator.cpp tools.c trace.c
|
||||||
REQUIRES esp_common pthread
|
REQUIRES esp_common pthread
|
||||||
INCLUDE_DIRS .
|
INCLUDE_DIRS .
|
||||||
)
|
)
|
||||||
|
|
||||||
#doing our own implementation of new operator for some pre-compiled binaries
|
#doing our own implementation of new operator for some pre-compiled binaries
|
||||||
target_link_libraries(${COMPONENT_LIB} INTERFACE "-u _ZdlPv")
|
target_link_libraries(${COMPONENT_LIB} INTERFACE "-u _ZdlPv")
|
||||||
|
|||||||
@@ -32,15 +32,6 @@ extern "C" {
|
|||||||
|
|
||||||
#define ESP_LOG_DEBUG_EVENT(tag,e) ESP_LOGD(tag,"evt: " e)
|
#define ESP_LOG_DEBUG_EVENT(tag,e) ESP_LOGD(tag,"evt: " e)
|
||||||
|
|
||||||
#ifdef ENABLE_MEMTRACE
|
|
||||||
void memtrace_print_delta(const char * msg, const char * tag, const char * function);
|
|
||||||
#define MEMTRACE_PRINT_DELTA() memtrace_print_delta(NULL,TAG,__FUNCTION__);
|
|
||||||
#define MEMTRACE_PRINT_DELTA_MESSAGE(x) memtrace_print_delta(x,TAG,__FUNCTION__);
|
|
||||||
#else
|
|
||||||
#define MEMTRACE_PRINT_DELTA()
|
|
||||||
#define MEMTRACE_PRINT_DELTA_MESSAGE(x) ESP_LOGD(TAG,"%s",x);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef FREE_AND_NULL
|
#ifndef FREE_AND_NULL
|
||||||
#define FREE_AND_NULL(x) if(x) { free(x); x=NULL; }
|
#define FREE_AND_NULL(x) if(x) { free(x); x=NULL; }
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -9,8 +9,8 @@
|
|||||||
#include "freertos/queue.h"
|
#include "freertos/queue.h"
|
||||||
#include "freertos/task.h"
|
#include "freertos/task.h"
|
||||||
#include "esp_event.h"
|
#include "esp_event.h"
|
||||||
#include "trace.h"
|
|
||||||
#include "tools.h"
|
#include "tools.h"
|
||||||
|
#include "trace.h"
|
||||||
|
|
||||||
|
|
||||||
static const char TAG[] = "TRACE";
|
static const char TAG[] = "TRACE";
|
||||||
|
|||||||
@@ -135,6 +135,9 @@ add_custom_command(
|
|||||||
TARGET recovery.elf
|
TARGET recovery.elf
|
||||||
PRE_LINK
|
PRE_LINK
|
||||||
COMMAND xtensa-esp32-elf-objcopy --weaken-symbol esp_app_desc ${build_dir}/esp-idf/app_update/libapp_update.a
|
COMMAND xtensa-esp32-elf-objcopy --weaken-symbol esp_app_desc ${build_dir}/esp-idf/app_update/libapp_update.a
|
||||||
|
COMMAND xtensa-esp32-elf-objcopy --weaken-symbol register_external ${build_dir}/esp-idf/squeezelite/libsqueezelite.a
|
||||||
|
COMMAND xtensa-esp32-elf-objcopy --weaken-symbol deregister_external ${build_dir}/esp-idf/squeezelite/libsqueezelite.a
|
||||||
|
COMMAND xtensa-esp32-elf-objcopy --weaken-symbol decode_restore ${build_dir}/esp-idf/squeezelite/libsqueezelite.a
|
||||||
# COMMAND xtensa-esp32-elf-objcopy --strip-symbol start_ota ${build_dir}/esp-idf/app_squeezelite/libapp_squeezelite.a
|
# COMMAND xtensa-esp32-elf-objcopy --strip-symbol start_ota ${build_dir}/esp-idf/app_squeezelite/libapp_squeezelite.a
|
||||||
## IDF-V4.2+ COMMAND xtensa-esp32-elf-objcopy --weaken-symbol main ${build_dir}/esp-idf/squeezelite/libsqueezelite.a
|
## IDF-V4.2+ COMMAND xtensa-esp32-elf-objcopy --weaken-symbol main ${build_dir}/esp-idf/squeezelite/libsqueezelite.a
|
||||||
COMMAND xtensa-esp32-elf-objcopy --globalize-symbol find_command_by_name ${build_dir}/esp-idf/console/libconsole.a
|
COMMAND xtensa-esp32-elf-objcopy --globalize-symbol find_command_by_name ${build_dir}/esp-idf/console/libconsole.a
|
||||||
|
|||||||
Reference in New Issue
Block a user