启动时等待usb连接

This commit is contained in:
zqm
2026-04-09 08:55:43 +08:00
parent 708a7c8bf0
commit cd7d033e3e
45 changed files with 7843 additions and 11716 deletions

View File

@@ -1,9 +1,14 @@
set(CMAKE_C_COMPILER gcc)
set(CMAKE_CXX_COMPILER g++)
# rust_app 组件的 CMake 配置
# 注意rust_app_wrapper.c 已经在 main 组件中编译
# 这里只提供 Rust 静态库的链接
idf_component_register(
SRCS "rust_app_wrapper.c"
INCLUDE_DIRS "."
)
target_link_libraries(${COMPONENT_LIB} INTERFACE "-L${CMAKE_CURRENT_LIST_DIR} -lrust_app")
# 链接 Rust 静态库
set(RUST_LIB_PATH "${COMPONENT_DIR}/target/xtensa-esp32s3-none-elf/release-debug/librust_app.a")
message(STATUS "Rust library path: ${RUST_LIB_PATH}")
add_prebuilt_library(rust_app_lib "${RUST_LIB_PATH}")
target_link_libraries(${COMPONENT_LIB} INTERFACE rust_app_lib)