From a4baaf8d5c87c59d83968d0cd0534fa208e2b360 Mon Sep 17 00:00:00 2001 From: Jimmy Brisson Date: Thu, 9 Jun 2016 14:40:57 -0500 Subject: [PATCH] Move IAR linker flags into the DEFAULT_FLAGS dict --- tools/toolchains/iar.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/toolchains/iar.py b/tools/toolchains/iar.py index 0862547f8d..2f48a5a983 100644 --- a/tools/toolchains/iar.py +++ b/tools/toolchains/iar.py @@ -42,7 +42,7 @@ class IAR(mbedToolchain): 'asm': [], 'c': [], 'cxx': ["--c++", "--no_rtti", "--no_exceptions", "--guard_calls"], - 'ld': [], + 'ld': ["--skip_dynamic_initialization", "--threaded_lib"], } def __init__(self, target, options=None, notify=None, macros=None, silent=False, extra_verbose=False): @@ -195,6 +195,10 @@ class IAR(mbedToolchain): self.default_cmd([self.ar, lib_path, '-f', archive_files]) + def link(self, output, objects, libraries, lib_dirs, mem_map): + args = [self.ld, "-o", output, "--config", mem_map] + self.flags['ld'] + self.default_cmd(self.hook.get_cmdline_linker(args + objects + libraries)) + @hook_tool def binary(self, resources, elf, bin): # Build binary command