启动时等待usb连接
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user