修复STM32工程在linux上编译失败的问题

This commit is contained in:
zhangzheng
2024-02-28 19:03:47 +08:00
parent a7abe122ab
commit 07eaa699f6
18 changed files with 55 additions and 27 deletions

View File

@@ -90,9 +90,10 @@ endif()
add_executable(bootstrap.elf
${deps}
)
message("CONFIG_CPU_TYPE"=${CONFIG_CPU_TYPE})
string(TOUPPER ${CONFIG_CPU_TYPE} cpu_type)
set_target_properties(bootstrap.elf PROPERTIES LINK_FLAGS
"-T ${CMAKE_CURRENT_LIST_DIR}/bsp/${CONFIG_CPU_TYPE}/link.lds --gc-section ")
"-T ${CMAKE_CURRENT_LIST_DIR}/bsp/${cpu_type}/link.lds --gc-section ")
target_link_libraries(
bootstrap.elf