cmake: Always use Dwarf 4 for IAR

The IAR linker does not handle Dwarf 5 and since it uses the GCC
assembler for assembler files, we need to make sure the assembler
output uses Dwarf 4.

Signed-off-by: Lars-Ove Karlsson <lars-ove.karlsson@iar.com>
This commit is contained in:
Lars-Ove Karlsson 2025-02-17 16:56:08 +01:00 committed by Benjamin Cabé
commit 4b40295e01

View file

@ -90,10 +90,8 @@ if("${IAR_TOOLCHAIN_VARIANT}" STREQUAL "iccarm")
)
endif()
if(CONFIG_DEBUG)
# GCC defaults to Dwarf 5 output
# IAR needs Dwarf 4 output
list(APPEND IAR_ASM_FLAGS -gdwarf-4)
endif()
if(DEFINED CONFIG_ARM_SECURE_FIRMWARE)
list(APPEND IAR_COMMON_FLAGS --cmse)