mirror of https://github.com/ARMmbed/mbed-os.git
Use via file for ASM macros in IAR
parent
a775e6992e
commit
f87fab5f33
|
@ -140,15 +140,24 @@ class IAR(mbedToolchain):
|
||||||
|
|
||||||
def get_compile_options(self, defines, includes, for_asm=False):
|
def get_compile_options(self, defines, includes, for_asm=False):
|
||||||
opts = ['-D%s' % d for d in defines]
|
opts = ['-D%s' % d for d in defines]
|
||||||
config_header = self.get_config_header()
|
if for_asm:
|
||||||
if config_header is not None:
|
config_macros = self.config.get_config_data_macros()
|
||||||
opts = opts + self.get_config_option(config_header)
|
macros_cmd = ['"-D%s"' % d.replace('"', '') for d in config_macros]
|
||||||
if for_asm :
|
if self.RESPONSE_FILES:
|
||||||
|
via_file = self.make_option_file(
|
||||||
|
macros_cmd, "asm_macros_{}.xcl")
|
||||||
|
opts += ['-f', via_file]
|
||||||
|
else:
|
||||||
|
opts += macros_cmd
|
||||||
return opts
|
return opts
|
||||||
|
else:
|
||||||
if self.RESPONSE_FILES:
|
if self.RESPONSE_FILES:
|
||||||
opts += ['-f', self.get_inc_file(includes)]
|
opts += ['-f', self.get_inc_file(includes)]
|
||||||
else:
|
else:
|
||||||
opts += ["-I%s" % i for i in includes]
|
opts += ["-I%s" % i for i in includes]
|
||||||
|
config_header = self.get_config_header()
|
||||||
|
if config_header is not None:
|
||||||
|
opts = opts + self.get_config_option(config_header)
|
||||||
|
|
||||||
return opts
|
return opts
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue