mirror of https://github.com/ARMmbed/mbed-os.git
IAR: Fixed #6670
parent
f3424da060
commit
dcd17935e3
|
@ -111,6 +111,8 @@ class IAR(Exporter):
|
|||
self.resources.c_sources + self.resources.cpp_sources + \
|
||||
self.resources.objects + self.resources.libraries
|
||||
flags = self.flags
|
||||
_, macros = self.toolchain.config.get_config_data()
|
||||
defines = ['-D%s' % d for d in macros] if macros else [""]
|
||||
c_flags = list(set(flags['common_flags']
|
||||
+ flags['c_flags']
|
||||
+ flags['cxx_flags']))
|
||||
|
@ -133,7 +135,8 @@ class IAR(Exporter):
|
|||
'include_paths': [self.format_file(src) for src in self.resources.inc_dirs],
|
||||
'device': self.iar_device(),
|
||||
'ewp': sep+self.project_name + ".ewp",
|
||||
'debugger': debugger
|
||||
'debugger': debugger,
|
||||
'defines': defines
|
||||
}
|
||||
ctx.update(flags)
|
||||
|
||||
|
@ -200,5 +203,3 @@ class IAR(Exporter):
|
|||
return -1
|
||||
else:
|
||||
return 0
|
||||
|
||||
|
||||
|
|
|
@ -479,7 +479,9 @@
|
|||
</option>
|
||||
<option>
|
||||
<name>ADefines</name>
|
||||
<state></state>
|
||||
{% for d in defines %}
|
||||
<state>{{d}}</state>
|
||||
{% endfor %}
|
||||
</option>
|
||||
<option>
|
||||
<name>AList</name>
|
||||
|
|
|
@ -154,8 +154,10 @@ class IAR(mbedToolchain):
|
|||
|
||||
@hook_tool
|
||||
def assemble(self, source, object, includes):
|
||||
_, macros = self.config.get_config_data()
|
||||
defines = ['-D%s' % d for d in macros] if macros else [""]
|
||||
# Build assemble command
|
||||
cmd = self.asm + self.get_compile_options(self.get_symbols(True), includes, True) + ["-o", object, source]
|
||||
cmd = self.asm + self.get_compile_options(self.get_symbols(True), includes, True) + defines + ["-o", object, source]
|
||||
|
||||
# Call cmdline hook
|
||||
cmd = self.hook.get_cmdline_assembler(cmd)
|
||||
|
|
Loading…
Reference in New Issue