From: SnickerSun Date: Mon, 18 Mar 2024 07:45:52 +0000 (+0800) Subject: 优化宏定义,取消无用的脚本 X-Git-Tag: release_V1.2.70_20241020_135402~1274^2~8^2~1 X-Git-Url: http://git.snicker.com.cn/Users/apple/Desktop/static/gitweb.css?a=commitdiff_plain;h=08e44cd19c6a9ed6f7394f0d2a595da05c843f4c;p=mirrors%2FFD230.git 优化宏定义,取消无用的脚本 保证连接的三方库只有 宏定义的情况下才编译进来。 --- diff --git a/code/sdk/autuobuild.sh b/code/sdk/autuobuild.sh deleted file mode 100644 index 2d17bf543..000000000 --- a/code/sdk/autuobuild.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash - -if [ "$1" == "" ] -then -TARGET_PACK_NAME=pack_brandy_native_js -else -TARGET_PACK_NAME=$1 -fi -./build.py -nhso -c -debug $TARGET_PACK_NAME diff --git a/code/sdk/drivers/peripheral/cywee/CMakeLists.txt b/code/sdk/drivers/peripheral/cywee/CMakeLists.txt index 31984772b..f2beb18d2 100644 --- a/code/sdk/drivers/peripheral/cywee/CMakeLists.txt +++ b/code/sdk/drivers/peripheral/cywee/CMakeLists.txt @@ -46,8 +46,11 @@ set(MAIN_COMPONENT false ) -# find_library(LIB_PATH_CWM_LIB_DML Lib/CWM_LIB_DML_clang_riscv.a ${CMAKE_CURRENT_SOURCE_DIR}) -# find_library(LIB_PATH_CWM_LIB Lib/CWM_LIB_clang_riscv.a ${CMAKE_CURRENT_SOURCE_DIR}) -# target_link_libraries(${TARGET_NAME} PRIVATE -Wl,--whole-archive ${LIB_PATH_CWM_LIB_DML} ${LIB_PATH_CWM_LIB} PRIVATE -Wl,--whole-archive) + +if("SUPPORT_AT_CYWEE" IN_LIST DEFINES) + find_library(LIB_PATH_CWM_LIB_DML Lib/CWM_LIB_DML_clang_riscv.a ${CMAKE_CURRENT_SOURCE_DIR}) + find_library(LIB_PATH_CWM_LIB Lib/CWM_LIB_clang_riscv.a ${CMAKE_CURRENT_SOURCE_DIR}) + target_link_libraries(${TARGET_NAME} PRIVATE -Wl,--whole-archive ${LIB_PATH_CWM_LIB_DML} ${LIB_PATH_CWM_LIB} PRIVATE -Wl,--whole-archive) +endif() build_component() diff --git a/code/sdk/drivers/peripheral/ppg/hx3695/CMakeLists.txt b/code/sdk/drivers/peripheral/ppg/hx3695/CMakeLists.txt index ae485d716..c55141c0d 100644 --- a/code/sdk/drivers/peripheral/ppg/hx3695/CMakeLists.txt +++ b/code/sdk/drivers/peripheral/ppg/hx3695/CMakeLists.txt @@ -36,7 +36,6 @@ set(PRIVATE_DEFINES ) set(PUBLIC_DEFINES -# SUPPORT_AT_HX3695 ) # use this when you want to add ccflags like -include xxx @@ -54,7 +53,9 @@ set(MAIN_COMPONENT false ) +if("PPG_HX3695" IN_LIST DEFINES) + find_library(LIB_PATH_HX3695 libhx3695.a ${CMAKE_CURRENT_SOURCE_DIR}) + target_link_libraries(${TARGET_NAME} PRIVATE -Wl,--whole-archive ${LIB_PATH_HX3695} PRIVATE -Wl,--whole-archive) +endif() build_component() -find_library(LIB_PATH_HX3695 libhx3695.a ${CMAKE_CURRENT_SOURCE_DIR}) -target_link_libraries(${TARGET_NAME} PRIVATE -Wl,--whole-archive ${LIB_PATH_HX3695} PRIVATE -Wl,--whole-archive) \ No newline at end of file diff --git a/code/sdk/drivers/peripheral/ppg/service/ppg_service.cpp b/code/sdk/drivers/peripheral/ppg/service/ppg_service.cpp index d484249a8..8a3eaa247 100644 --- a/code/sdk/drivers/peripheral/ppg/service/ppg_service.cpp +++ b/code/sdk/drivers/peripheral/ppg/service/ppg_service.cpp @@ -255,7 +255,9 @@ static void ppg_service_check_task(void const *arg) int32_t ret; uint32_t mail; uint32_t msgsize = (uint32_t)sizeof(PPG_CMD_TYPE_T); +#ifdef PPG_HX3695 hx3695_register_msg_callback(hx3695_msg_callback);//注册驱动回调 +#endif while (1) { ret = osal_msg_queue_read_copy(g_app_queue, (void *)&mail, &msgsize, OSAL_MSGQ_WAIT_FOREVER); @@ -298,8 +300,10 @@ static void ppg_service_check_task(void const *arg) PRINT_ERR("ppg service already stopped! \r\n"); continue ; } - ppg_send_cmd_to_driver(cmd,enable); - if(enable == 1) +#ifdef PPG_HX3695 + ppg_send_cmd_to_driver(cmd,enable); +#endif + if(enable == 1) ppg_service_running_stat = true; else ppg_service_running_stat = false;