diff --git a/scripts/cmake/Platform/STM32F4.cmake b/scripts/cmake/Platform/STM32F4.cmake new file mode 100644 index 0000000..9e9513a --- /dev/null +++ b/scripts/cmake/Platform/STM32F4.cmake @@ -0,0 +1,2 @@ +set_property(GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS FALSE) +set(CMAKE_EXECUTABLE_SUFFIX .elf) \ No newline at end of file diff --git a/scripts/cmake/arm-eabi.cmake b/scripts/cmake/arm-eabi.cmake index 2c248bf..fba1fd1 100644 --- a/scripts/cmake/arm-eabi.cmake +++ b/scripts/cmake/arm-eabi.cmake @@ -1,6 +1,6 @@ # the name of the target operating system -set (CMAKE_SYSTEM_NAME Generic) -set(CMAKE_SYSTEM_PROCESSOR arm) +set(CMAKE_SYSTEM_NAME STM32F4) +set(CMAKE_SYSTEM_PROCESSOR cortex-m4) 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_INCLUDE ONLY) -set(CMAKE_EXECUTABLE_SUFFIX_C .elf) -set(CMAKE_EXECUTABLE_SUFFIX_CXX .elf) -set(CMAKE_EXECUTABLE_SUFFIX_ASM .elf) +#set(CMAKE_EXECUTABLE_SUFFIX_C .elf) +#set(CMAKE_EXECUTABLE_SUFFIX_CXX .elf) +#set(CMAKE_EXECUTABLE_SUFFIX_ASM .elf) function(tgt_add_linker_script TARGET VISIBILITY SCRIPT) get_filename_component(SCRIPT "${SCRIPT}" ABSOLUTE) diff --git a/targets/open429i/CMakeLists.txt b/targets/open429i/CMakeLists.txt index 7ba2c77..0ffc9cd 100644 --- a/targets/open429i/CMakeLists.txt +++ b/targets/open429i/CMakeLists.txt @@ -5,6 +5,8 @@ set_target_properties(${tgt_name} PROPERTIES CXX_STANDARD 20) +set(CHIP_TYPE STM32F429_439xx PARENT_SCOPE) + file(GLOB_RECURSE _tgt_srcs ${CMAKE_CURRENT_LIST_DIR}/*.c ${CMAKE_CURRENT_LIST_DIR}/*.cpp