Skip to content

Commit 0e7eda0

Browse files
committed
Remove IAR assembler macros containing quotes
IAR assembler 7.80 has some problems handling difficult macros, leading to immediate exit with return value -11. In particular, a URL string has been causing problems, presumably due to the "//" resembling a comment. A previous escaping workaround in 0d97803 seemed to work, but the crash has still been seen with a particular target. Previous creation of the extended command line file for the IAR assembler was stripping quotes from macros. This rendered the resulting definitions for string-containing macros incorrect, which means that we can assume no assembler code is currently relying on them. Therefore, as a precautionary measure to avoid the crash, simply remove all macros containing strings when creating them for IAR. This apparently clears the crashes seen during testing of #8023
1 parent 736fc2a commit 0e7eda0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/toolchains/iar.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ def get_compile_options(self, defines, includes, for_asm=False):
167167
opts = ['-D%s' % d for d in defines]
168168
if for_asm:
169169
config_macros = self.config.get_config_data_macros()
170-
macros_cmd = ['"-D%s"' % d.replace('"', '').replace('//','/\/') for d in config_macros]
170+
macros_cmd = ['"-D%s"' % d for d in config_macros if not '"' in d]
171171
if self.RESPONSE_FILES:
172172
via_file = self.make_option_file(
173173
macros_cmd, "asm_macros_{}.xcl")

0 commit comments

Comments
 (0)