diff --git a/tools/export/uvision/__init__.py b/tools/export/uvision/__init__.py index 958d3a9bdf..8fbf2452c5 100644 --- a/tools/export/uvision/__init__.py +++ b/tools/export/uvision/__init__.py @@ -172,6 +172,7 @@ class Uvision(Exporter): flags['asm_flags'] = asm_flag_string # All non-asm flags are in one template field c_flags = list(set(flags['c_flags'] + flags['cxx_flags'] +flags['common_flags'])) + ld_flags = list(set(flags['ld_flags'] )) # These flags are in template to be set by user i n IDE template = ["--no_vla", "--cpp", "--c99"] # Flag is invalid if set in template @@ -179,6 +180,7 @@ class Uvision(Exporter): invalid_flag = lambda x: x in template or re.match("-O(\d|time)", x) flags['c_flags'] = [flag.replace('"','\\"') for flag in c_flags if not invalid_flag(flag)] flags['c_flags'] = " ".join(flags['c_flags']) + flags['ld_flags'] = " ".join(flags['ld_flags']) return flags def format_src(self, srcs): diff --git a/tools/export/uvision/uvision.tmpl b/tools/export/uvision/uvision.tmpl index 000fa236a6..f49c79659d 100644 --- a/tools/export/uvision/uvision.tmpl +++ b/tools/export/uvision/uvision.tmpl @@ -410,7 +410,7 @@ {{linker_script}} - + {{ld_flags}}