1 Star 0 Fork 21

MyGitee/mkrtos-real

forked from ATShining/mkrtos-real 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
setting.cmake 2.07 KB
一键复制 编辑 原始数据 按行查看 历史
ATShining 提交于 2024-04-04 16:51 . 能够启动到init
set(CMAKE_TOOLCHAIN_PATH $ENV{TOOLCHAIN} CACHE STRING " " FORCE)
set(CROSS_COMPILE ${CMAKE_TOOLCHAIN_PATH}$ENV{CROSS_COMPILE_NAME} CACHE PATH "" FORCE)
set(GCC_LIB_PATH $ENV{TOOLCHAIN_LIB})
set(CMAKE_INSTALL_PATH "${CMAKE_BINARY_DIR}deploy" CACHE PATH "" FORCE)
set(CMAKE_C_COMPILER "${CROSS_COMPILE}gcc" CACHE PATH "" FORCE)
set(CMAKE_ASM_COMPILER "${CROSS_COMPILE}gcc" CACHE PATH "" FORCE)
set(CMAKE_CC_COMPILER "${CROSS_COMPILE}g++" CACHE PATH "" FORCE)
set(CMAKE_CXX_COMPILER "${CROSS_COMPILE}g++" CACHE PATH "" FORCE)
set(CMAKE_CPP_COMPILER "${CROSS_COMPILE}cpp" CACHE PATH "" FORCE)
set(CMAKE_LINKER "${CROSS_COMPILE}ld" CACHE PATH "" FORCE)
set(CMAKE_STRIP "${CROSS_COMPILE}strip" CACHE PATH "" FORCE)
set(CMAKE_OBJCOPY "${CROSS_COMPILE}objcopy" CACHE PATH "" FORCE)
set(CMAKE_OBJDUMP "${CROSS_COMPILE}objdump" CACHE PATH "" FORCE)
set(CMAKE_READELF "${CROSS_COMPILE}readelf" CACHE PATH "" FORCE)
set(CMAKE_SIZE "${CROSS_COMPILE}size" CACHE PATH "" FORCE)
set(CMAKE_NM "${CROSS_COMPILE}nm" CACHE PATH "" FORCE)
set(CMAKE_AR "${CROSS_COMPILE}ar" CACHE PATH "" FORCE)
set(CMAKE_SIZE "${CROSS_COMPILE}size" CACHE PATH "" FORCE)
set(PROJECT_BINARY_DIR ${CMAKE_SOURCE_DIR}/build)
# set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(BOARD $ENV{BOARD})
include(mkrtos_cmake/top.cmake)
set(ARCH ${CONFIG_ARCH} CACHE STRING "" FORCE)
message(======="ARCH=${ARCH}")
message(======="CPU_TYPE=${CONFIG_CPU_TYPE}")
# -mfloat-abi=soft -u _printf_float -lc -lrdimon
#-mfpu=fpv5-sp-d16
if (${CONFIG_ARCH} STREQUAL "cortex-m3" OR
${CONFIG_ARCH} STREQUAL "cortex-m4" OR
${CONFIG_ARCH} STREQUAL "cortex-m33"
)
include(armv7_8.cmake)
elseif(${CONFIG_ARCH} STREQUAL "aarch64" )
include(aarch64.cmake)
link_directories(${CMAKE_SOURCE_DIR}/build/libc/output/lib)
endif()
set(CMAKE_C_LINK_EXECUTABLE "${CMAKE_LINKER} <OBJECTS> <CMAKE_C_LINK_FLAGS> <LINK_FLAGS> --start-group <LINK_LIBRARIES> --end-group -o <TARGET>" CACHE INTERNAL " " FORCE)
set(CMAKE_CXX_LINK_EXECUTABLE "${CMAKE_LINKER} <OBJECTS> <CMAKE_C_LINK_FLAGS> <LINK_FLAGS> --start-group <LINK_LIBRARIES> --end-group -o <TARGET>" CACHE INTERNAL " " FORCE)
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C
1
https://gitee.com/dc00700/mkrtos-real.git
[email protected]:dc00700/mkrtos-real.git
dc00700
mkrtos-real
mkrtos-real
master

搜索帮助