Browse Source

add Platform

Signed-off-by: surenyi <surenyi82@163.com>
master
surenyi 6 months ago
parent
commit
4b44afdaad
  1. 2
      scripts/cmake/Platform/STM32F4.cmake
  2. 10
      scripts/cmake/arm-eabi.cmake
  3. 2
      targets/open429i/CMakeLists.txt

2
scripts/cmake/Platform/STM32F4.cmake

@ -0,0 +1,2 @@
set_property(GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS FALSE)
set(CMAKE_EXECUTABLE_SUFFIX .elf)

10
scripts/cmake/arm-eabi.cmake

@ -1,6 +1,6 @@
# the name of the target operating system # the name of the target operating system
set (CMAKE_SYSTEM_NAME Generic) set(CMAKE_SYSTEM_NAME STM32F4)
set(CMAKE_SYSTEM_PROCESSOR arm) set(CMAKE_SYSTEM_PROCESSOR cortex-m4)
set(CROSS_COMPILE arm-none-eabi-) set(CROSS_COMPILE arm-none-eabi-)
@ -43,9 +43,9 @@ set (CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set (CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) set (CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set (CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) set (CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
set(CMAKE_EXECUTABLE_SUFFIX_C .elf) #set(CMAKE_EXECUTABLE_SUFFIX_C .elf)
set(CMAKE_EXECUTABLE_SUFFIX_CXX .elf) #set(CMAKE_EXECUTABLE_SUFFIX_CXX .elf)
set(CMAKE_EXECUTABLE_SUFFIX_ASM .elf) #set(CMAKE_EXECUTABLE_SUFFIX_ASM .elf)
function(tgt_add_linker_script TARGET VISIBILITY SCRIPT) function(tgt_add_linker_script TARGET VISIBILITY SCRIPT)
get_filename_component(SCRIPT "${SCRIPT}" ABSOLUTE) get_filename_component(SCRIPT "${SCRIPT}" ABSOLUTE)

2
targets/open429i/CMakeLists.txt

@ -5,6 +5,8 @@ set_target_properties(${tgt_name}
PROPERTIES PROPERTIES
CXX_STANDARD 20) CXX_STANDARD 20)
set(CHIP_TYPE STM32F429_439xx PARENT_SCOPE)
file(GLOB_RECURSE _tgt_srcs file(GLOB_RECURSE _tgt_srcs
${CMAKE_CURRENT_LIST_DIR}/*.c ${CMAKE_CURRENT_LIST_DIR}/*.c
${CMAKE_CURRENT_LIST_DIR}/*.cpp ${CMAKE_CURRENT_LIST_DIR}/*.cpp

Loading…
Cancel
Save