summaryrefslogtreecommitdiff
path: root/examples/build_system/cmake/toolchain
diff options
context:
space:
mode:
authorhathach <[email protected]>2024-04-19 13:40:42 +0700
committerhathach <[email protected]>2024-04-19 23:17:00 +0700
commitbe0d62ba6c84e6c44416f5a837d830000f316505 (patch)
tree014f512d659ab2c3bb9ec130e13df31db285c552 /examples/build_system/cmake/toolchain
parent824e39ddeb762a0876702304ac95ea3b1d40cb5a (diff)
clang samd51 compile but does not run, rom is correct, but ram is lacking bss. Got stkerr -> hardfault
Diffstat (limited to 'examples/build_system/cmake/toolchain')
-rw-r--r--examples/build_system/cmake/toolchain/common.cmake4
1 files changed, 3 insertions, 1 deletions
diff --git a/examples/build_system/cmake/toolchain/common.cmake b/examples/build_system/cmake/toolchain/common.cmake
index bbd670b65..688715914 100644
--- a/examples/build_system/cmake/toolchain/common.cmake
+++ b/examples/build_system/cmake/toolchain/common.cmake
@@ -31,11 +31,13 @@ if (TOOLCHAIN STREQUAL "gcc")
-Wl,--gc-sections
-Wl,--cref
)
+
elseif (TOOLCHAIN STREQUAL "iar")
#list(APPEND TOOLCHAIN_COMMON_FLAGS)
list(APPEND TOOLCHAIN_EXE_LINKER_FLAGS
--diag_suppress=Li065
)
+
elseif (TOOLCHAIN STREQUAL "clang")
list(APPEND TOOLCHAIN_COMMON_FLAGS
-fdata-sections
@@ -45,7 +47,7 @@ elseif (TOOLCHAIN STREQUAL "clang")
list(APPEND TOOLCHAIN_EXE_LINKER_FLAGS
-Wl,--print-memory-usage
-Wl,--gc-sections
- #-Wl,--cref
+ -Wl,--cref
)
endif ()