File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -41,21 +41,26 @@ message(STATUS "Cross-compiling with the gcc-arm-embedded toolchain")
41
41
message (STATUS "Toolchain prefix: ${CMAKE_INSTALL_PREFIX} " )
42
42
43
43
set (CMAKE_FIND_ROOT_PATH ${CMAKE_INSTALL_PREFIX} )
44
-
45
44
set (CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
46
45
set (CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
47
46
set (CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
48
-
49
47
set (CMAKE_C_FLAGS "-fno-common -ffunction-sections -fdata-sections" )
50
-
51
48
if (CMAKE_SYSTEM_PROCESSOR STREQUAL "cortex-m4" )
52
49
53
50
set (CMAKE_C_FLAGS
54
51
"${CMAKE_C_FLAGS} "
55
52
"-mcpu=cortex-m4 -march=armv7e-m -mthumb"
56
53
"-mfloat-abi=hard -mfpu=fpv4-sp-d16"
57
54
)
55
+
56
+ elseif (CMAKE_SYSTEM_PROCESSOR STREQUAL "cortex-m7" )
58
57
58
+ set (CMAKE_C_FLAGS
59
+ "${CMAKE_C_FLAGS} "
60
+ "-mcpu=cortex-m7 -mthumb"
61
+ "-mfpu=fpv5-d16 -mfloat-abi=hard"
62
+ )
63
+
59
64
elseif (CMAKE_SYSTEM_PROCESSOR STREQUAL "cortex-m3" )
60
65
61
66
set (CMAKE_C_FLAGS
@@ -92,5 +97,6 @@ string(REGEX REPLACE ";" " " CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
92
97
93
98
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} " CACHE STRING "" )
94
99
95
- set (BUILD_SHARED_LIBS OFF )
100
+ set (BUILD_SHARED_LIBS OFF )
101
+
96
102
You can’t perform that action at this time.
0 commit comments