Skip to content

Commit 4b40295

Browse files
LoveKarlssonkartben
authored andcommitted
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 <[email protected]>
1 parent e1c8805 commit 4b40295

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

cmake/compiler/iar/target.cmake

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,8 @@ if("${IAR_TOOLCHAIN_VARIANT}" STREQUAL "iccarm")
9090
)
9191
endif()
9292

93-
if(CONFIG_DEBUG)
94-
# GCC defaults to Dwarf 5 output
95-
list(APPEND IAR_ASM_FLAGS -gdwarf-4)
96-
endif()
93+
# IAR needs Dwarf 4 output
94+
list(APPEND IAR_ASM_FLAGS -gdwarf-4)
9795

9896
if(DEFINED CONFIG_ARM_SECURE_FIRMWARE)
9997
list(APPEND IAR_COMMON_FLAGS --cmse)

0 commit comments

Comments
 (0)