From 0e7eda07492ad3cc27e3d6fc17a190898608d869 Mon Sep 17 00:00:00 2001 From: Kevin Bracey Date: Thu, 20 Sep 2018 13:19:24 +0300 Subject: [PATCH] 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 https://github.com/ARMmbed/mbed-os/pull/8023 --- tools/toolchains/iar.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/toolchains/iar.py b/tools/toolchains/iar.py index b54487869a..ecfd6c8de5 100644 --- a/tools/toolchains/iar.py +++ b/tools/toolchains/iar.py @@ -167,7 +167,7 @@ class IAR(mbedToolchain): opts = ['-D%s' % d for d in defines] if for_asm: config_macros = self.config.get_config_data_macros() - macros_cmd = ['"-D%s"' % d.replace('"', '').replace('//','/\/') for d in config_macros] + macros_cmd = ['"-D%s"' % d for d in config_macros if not '"' in d] if self.RESPONSE_FILES: via_file = self.make_option_file( macros_cmd, "asm_macros_{}.xcl")