From 5e7de7483cb6c41015cb354f75f5f39485b58d2f Mon Sep 17 00:00:00 2001 From: OPTOC <9159397+optoc@user.noreply.gitee.com> Date: Tue, 19 Aug 2025 18:12:32 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=B3=E9=97=AD=E9=9D=99=E6=80=81=E5=BA=93?= =?UTF-8?q?=E3=80=81=E4=BB=A5=E5=8F=8AOTA=E3=80=81=E5=B0=84=E9=A2=91?= =?UTF-8?q?=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/app_main.c | 78 +++++++++++++++++------------------ components/lib/CMakeLists.txt | 32 +++++++------- 2 files changed, 55 insertions(+), 55 deletions(-) diff --git a/app/app_main.c b/app/app_main.c index 426de40..4e8dbb5 100644 --- a/app/app_main.c +++ b/app/app_main.c @@ -54,16 +54,16 @@ void work_app_main(void *arg) app_cfg_init(); // 应用配置 app_log_init(); // 应用记录 - /* 初始化 OTA 功能*/ - ota_partition_check(); + // /* 初始化 OTA 功能*/ + // ota_partition_check(); - /* 初始化 ws2812 */ - _init_ws2812(); - ws2812_spi_shell_register(); // 用于测试 ws2812 的 shell 命令 + // /* 初始化 ws2812 */ + // _init_ws2812(); + // ws2812_spi_shell_register(); // 用于测试 ws2812 的 shell 命令 - /* 启动静态库功能 */ - sblib_init(SBLIB_INIT_ADAPTER); - lib_shell_register(); // 静态库接口命令 + // /* 启动静态库功能 */ + // sblib_init(SBLIB_INIT_ADAPTER); + // lib_shell_register(); // 静态库接口命令 /* 初始化按键检测和控制 */ btn_attach(&g_cfg_board->key_reset, _change_mode_event_button, EVENT_PRESS_UP | EVENT_PRESS_DOWN | EVENT_LONG_PRESS_HOLD); @@ -110,34 +110,34 @@ static void _change_mode_event_button(button_hdl_t *handle, press_event_t event) } // 导出符号,供 linker script 使用 -#include "utils/sb_aes.h" -#include "drivers/data_port/sb_data_port.h" -#include "drivers/data_port/uart/uart_port.h" -#if defined(CONFIG_BUILD_BLE) -#include "drivers/data_port/ble_spp/ble_spp_server.h" -#endif -#if defined(CONFIG_BUILD_WIFI) -#include "drivers/data_port/socket_inet/socket_inet.h" -#endif -#if defined(CONFIG_IDF_TARGET_ESP32S3) -#include "drivers/data_port/usb-host/usbport.h" -#endif -void _exporter_reference_symbols(void) -{ - btn_attach(NULL, NULL, 0); - sb_aes_init(); - sb_data_port_start(NULL); - sb_uart_port_init(); - sh_init_vt100(NULL, NULL, NULL); - shell_start(NULL); - ws2812_spi_led_strip_init(0, 0); -#if defined(CONFIG_BUILD_BLE) - sb_ble_server_port_init(NULL); -#endif -#if defined(CONFIG_BUILD_WIFI) - socket_inet_init(); -#endif -#if defined(CONFIG_IDF_TARGET_ESP32S3) - usbport_init(); -#endif -} +// #include "utils/sb_aes.h" +// #include "drivers/data_port/sb_data_port.h" +// #include "drivers/data_port/uart/uart_port.h" +// #if defined(CONFIG_BUILD_BLE) +// #include "drivers/data_port/ble_spp/ble_spp_server.h" +// #endif +// #if defined(CONFIG_BUILD_WIFI) +// #include "drivers/data_port/socket_inet/socket_inet.h" +// #endif +// #if defined(CONFIG_IDF_TARGET_ESP32S3) +// #include "drivers/data_port/usb-host/usbport.h" +// #endif +// void _exporter_reference_symbols(void) +// { +// btn_attach(NULL, NULL, 0); +// sb_aes_init(); +// sb_data_port_start(NULL); +// sb_uart_port_init(); +// sh_init_vt100(NULL, NULL, NULL); +// shell_start(NULL); +// ws2812_spi_led_strip_init(0, 0); +// #if defined(CONFIG_BUILD_BLE) +// sb_ble_server_port_init(NULL); +// #endif +// #if defined(CONFIG_BUILD_WIFI) +// socket_inet_init(); +// #endif +// #if defined(CONFIG_IDF_TARGET_ESP32S3) +// usbport_init(); +// #endif +// } diff --git a/components/lib/CMakeLists.txt b/components/lib/CMakeLists.txt index 0f2eee7..a57aa52 100644 --- a/components/lib/CMakeLists.txt +++ b/components/lib/CMakeLists.txt @@ -1,19 +1,19 @@ -list(APPEND incs ".") -list(APPEND incs "../system/include") -list(APPEND incs "../system/source") -list(APPEND incs "../../app") +# list(APPEND incs ".") +# list(APPEND incs "../system/include") +# list(APPEND incs "../system/source") +# list(APPEND incs "../../app") -list(APPEND srcs "lib_shell.c") +# list(APPEND srcs "lib_shell.c") -idf_component_register( - INCLUDE_DIRS ${incs} - SRCS ${srcs} - ) +# idf_component_register( +# INCLUDE_DIRS ${incs} +# SRCS ${srcs} +# ) -if(CONFIG_IDF_TARGET_ESP32S3) -target_link_libraries(${COMPONENT_TARGET} INTERFACE "${CMAKE_CURRENT_LIST_DIR}/spbelib_s3.a") -elseif(CONFIG_IDF_TARGET_ESP32C2) -target_link_libraries(${COMPONENT_TARGET} INTERFACE "${CMAKE_CURRENT_LIST_DIR}/spbelib_c2.a") -else(CONFIG_IDF_TARGET_ESP32C3) -target_link_libraries(${COMPONENT_TARGET} INTERFACE "${CMAKE_CURRENT_LIST_DIR}/spbelib_c3.a") -endif() +# if(CONFIG_IDF_TARGET_ESP32S3) +# target_link_libraries(${COMPONENT_TARGET} INTERFACE "${CMAKE_CURRENT_LIST_DIR}/spbelib_s3.a") +# elseif(CONFIG_IDF_TARGET_ESP32C2) +# target_link_libraries(${COMPONENT_TARGET} INTERFACE "${CMAKE_CURRENT_LIST_DIR}/spbelib_c2.a") +# else(CONFIG_IDF_TARGET_ESP32C3) +# target_link_libraries(${COMPONENT_TARGET} INTERFACE "${CMAKE_CURRENT_LIST_DIR}/spbelib_c3.a") +# endif()