Merge pull request #2303 from theotherjimmy/export-asm-symbols

Add missing --preinclude and -input on assembly files
pull/2304/head
Bogdan Marinescu 2016-08-02 20:57:39 +03:00 committed by GitHub
commit c6c8d42b0f
3 changed files with 9 additions and 3 deletions

View File

@ -62,6 +62,7 @@ class Exporter(object):
if self.config_header:
self._progen_flag_cache['c_flags'] += self.toolchain.get_config_option(self.config_header)
self._progen_flag_cache['cxx_flags'] += self.toolchain.get_config_option(self.config_header)
self._progen_flag_cache['asm_flags'] += self.toolchain.get_config_option(self.config_header)
return self._progen_flag_cache
def __scan_and_copy(self, src_path, trg_path):
@ -196,6 +197,7 @@ class Exporter(object):
self.config_header = self.toolchain.MBED_CONFIG_FILE_NAME
config.get_config_data_header(join(trg_path, self.config_header))
self.config_macros = []
self.resources.inc_dirs.append(".")
else:
# And add the configuration macros to the toolchain
self.config_macros = config.get_config_data_macros()

View File

@ -89,13 +89,13 @@ all: $(PROJECT).bin $(PROJECT).hex size
.asm.o:
+@$(call MAKEDIR,$(dir $@))
$(CC) $(CPU) -c $(ASM_FLAGS) -o $@ $<
$(CC) $(CPU) -c $(ASM_FLAGS) $(CC_SYMBOLS) $(INCLUDE_PATHS) -o $@ $<
.s.o:
+@$(call MAKEDIR,$(dir $@))
$(CC) $(CPU) -c $(ASM_FLAGS) -o $@ $<
$(CC) $(CPU) -c $(ASM_FLAGS) $(CC_SYMBOLS) $(INCLUDE_PATHS) -o $@ $<
.S.o:
+@$(call MAKEDIR,$(dir $@))
$(CC) $(CPU) -c $(ASM_FLAGS) -o $@ $<
$(CC) $(CPU) -c $(ASM_FLAGS) $(CC_SYMBOLS) $(INCLUDE_PATHS) -o $@ $<
.c.o:
+@$(call MAKEDIR,$(dir $@))

View File

@ -76,6 +76,10 @@ class IAREmbeddedWorkbench(Exporter):
project_data['tool_specific']['iar'].setdefault("misc", {})
project_data['tool_specific']['iar'].update(tool_specific['iar'])
project_data['tool_specific']['iar']['misc'].update(self.progen_flags)
project_data['tool_specific']['iar']['misc']['asm_flags'].remove(
self.toolchain.get_config_option(self.config_header)[0])
project_data['tool_specific']['iar']['misc']['asm_flags'].extend(
['-D%s' % d for d in self.toolchain.get_symbols()])
# VLA is enabled via template IccAllowVLA
project_data['tool_specific']['iar']['misc']['c_flags'].remove("--vla")
project_data['common']['build_dir'] = os.path.join(project_data['common']['build_dir'], 'iar_arm')