clang samd51 compile but does not run, rom is correct, but ram is lacking bss. Got stkerr -> hardfault

This commit is contained in:
hathach
2024-04-19 13:40:42 +07:00
parent 824e39ddeb
commit be0d62ba6c
7 changed files with 45 additions and 20 deletions

View File

@@ -219,8 +219,9 @@ function(family_configure_common TARGET RTOS)
if (CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 12.0)
target_link_options(${TARGET} PUBLIC "LINKER:--no-warn-rwx-segments")
endif ()
endif()
if (CMAKE_C_COMPILER_ID STREQUAL "IAR")
elseif (CMAKE_C_COMPILER_ID STREQUAL "Clang")
target_link_options(${TARGET} PUBLIC "LINKER:-Map=$<TARGET_FILE:${TARGET}>.map")
elseif (CMAKE_C_COMPILER_ID STREQUAL "IAR")
target_link_options(${TARGET} PUBLIC "LINKER:--map=$<TARGET_FILE:${TARGET}>.map")
endif()