diff options
| author | hathach <[email protected]> | 2023-05-08 17:25:47 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2023-05-08 17:25:47 +0700 |
| commit | 4fc4f35a8af6465eb2137f765e994de1029e9c5a (patch) | |
| tree | 9eff12d5246a7111a96607247e9244cf0b421e15 /examples/cmake/toolchain | |
| parent | 654f1821769f50c44f786032bedfe417a9ad4d0f (diff) | |
fix linking missing ivt symbol for imxrt with cmake
changed device port = 0, host port =1 for imxrt 1060 and 1064
Diffstat (limited to 'examples/cmake/toolchain')
| -rw-r--r-- | examples/cmake/toolchain/arm_gcc.cmake | 8 | ||||
| -rw-r--r-- | examples/cmake/toolchain/set_flags.cmake | 3 |
2 files changed, 10 insertions, 1 deletions
diff --git a/examples/cmake/toolchain/arm_gcc.cmake b/examples/cmake/toolchain/arm_gcc.cmake index c5937192e..c7b6cff98 100644 --- a/examples/cmake/toolchain/arm_gcc.cmake +++ b/examples/cmake/toolchain/arm_gcc.cmake @@ -25,7 +25,13 @@ list(APPEND TOOLCHAIN_COMMON_FLAGS -fno-strict-aliasing ) -set(TOOLCHAIN_WARNING_FLAGS +list(APPEND TOOLCHAIN_EXE_LINKER_FLAGS + -Wl,--print-memory-usage + -Wl,--gc-sections + -Wl,--cref + ) + +list(APPEND TOOLCHAIN_WARNING_FLAGS -Wall -Wextra -Werror diff --git a/examples/cmake/toolchain/set_flags.cmake b/examples/cmake/toolchain/set_flags.cmake index da381c254..27631abcd 100644 --- a/examples/cmake/toolchain/set_flags.cmake +++ b/examples/cmake/toolchain/set_flags.cmake @@ -11,6 +11,9 @@ foreach(LANG IN ITEMS C CXX ASM) set(CMAKE_${LANG}_FLAGS_DEBUG_INIT "-Og") endforeach() +# Linker +list(JOIN TOOLCHAIN_EXE_LINKER_FLAGS " " CMAKE_EXE_LINKER_FLAGS_INIT) + # try_compile is cmake test compiling its own example, # pass -nostdlib to skip stdlib linking get_property(IS_IN_TRY_COMPILE GLOBAL PROPERTY IN_TRY_COMPILE) |
