Skip to content

Commit c0a6e95

Browse files
Oren CohenCruz Monrreal II
authored andcommitted
Add config header to assembly compilation
ARMC6 was not including mbed_config.h when compiling assembly files
1 parent cd4165b commit c0a6e95

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

tools/toolchains/arm.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -481,14 +481,13 @@ def get_config_option(self, config_header):
481481
def get_compile_options(self, defines, includes, for_asm=False):
482482
opts = ['-D%s' % d for d in defines]
483483
opts.extend(["-I%s" % i for i in includes if i])
484+
config_header = self.get_config_header()
485+
if config_header:
486+
opts.extend(self.get_config_option(config_header))
484487
if for_asm:
485488
return ["--cpreproc",
486489
"--cpreproc_opts=%s" % ",".join(self.flags['common'] + opts)]
487-
else:
488-
config_header = self.get_config_header()
489-
if config_header:
490-
opts.extend(self.get_config_option(config_header))
491-
return opts
490+
return opts
492491

493492
@hook_tool
494493
def assemble(self, source, object, includes):

0 commit comments

Comments
 (0)