From 8f649493a316787b3e5cfdfc440efc1fbee43664 Mon Sep 17 00:00:00 2001 From: Brian Daniels Date: Fri, 9 Dec 2016 11:29:36 -0600 Subject: [PATCH 1/2] Removing extra paths for standard the library for the ARM compiler --- tools/toolchains/arm.py | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) diff --git a/tools/toolchains/arm.py b/tools/toolchains/arm.py index 5eb5387187..135e8b09b3 100644 --- a/tools/toolchains/arm.py +++ b/tools/toolchains/arm.py @@ -61,9 +61,9 @@ class ARM(mbedToolchain): self.flags['common'] += ["--cpu=%s" % cpu] - self.asm = [main_cc] + self.flags['common'] + self.flags['asm'] + ["-I \""+ARM_INC+"\""] - self.cc = [main_cc] + self.flags['common'] + self.flags['c'] + ["-I \""+ARM_INC+"\""] - self.cppc = [main_cc] + self.flags['common'] + self.flags['c'] + self.flags['cxx'] + ["-I \""+ARM_INC+"\""] + self.asm = [main_cc] + self.flags['common'] + self.flags['asm'] + self.cc = [main_cc] + self.flags['common'] + self.flags['c'] + self.cppc = [main_cc] + self.flags['common'] + self.flags['c'] + self.flags['cxx'] self.ld = [join(ARM_BIN, "armlink")] self.sys_libs = [] @@ -223,22 +223,8 @@ class ARM(mbedToolchain): class ARM_STD(ARM): - def __init__(self, target, notify=None, macros=None, - silent=False, extra_verbose=False, build_profile=None): - ARM.__init__(self, target, notify, macros, silent, - extra_verbose=extra_verbose, build_profile=build_profile) - - # Run-time values - self.ld.extend(["--libpath", join(TOOLCHAIN_PATHS['ARM'], "lib")]) + pass class ARM_MICRO(ARM): PATCHED_LIBRARY = False - - def __init__(self, target, notify=None, macros=None, - silent=False, extra_verbose=False, build_profile=None): - ARM.__init__(self, target, notify, macros, silent, - extra_verbose=extra_verbose, build_profile=build_profile) - - # Run-time values - self.ld.extend(["--libpath", join(TOOLCHAIN_PATHS['ARM'], "lib")]) From 105a9b3ea616d490f658895da46d81254d2672c7 Mon Sep 17 00:00:00 2001 From: Brian Daniels Date: Fri, 9 Dec 2016 12:02:51 -0600 Subject: [PATCH 2/2] Removing aboslute path to Dlib config for IAR compiler This fixes an issue where the absolute path causes a file error if the compiler paths are configured incorrectly. It uses a relative path instead now (the files appears to be in the default search path). --- tools/toolchains/iar.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tools/toolchains/iar.py b/tools/toolchains/iar.py index 46ada3a703..cf4db9ee5e 100644 --- a/tools/toolchains/iar.py +++ b/tools/toolchains/iar.py @@ -60,14 +60,16 @@ class IAR(mbedToolchain): # custom c flags if target.core == "Cortex-M4F": c_flags_cmd = [ - "--cpu", "Cortex-M4F", - "--thumb", "--dlib_config", join(TOOLCHAIN_PATHS['IAR'], "inc", "c", "DLib_Config_Full.h") + "--cpu", "Cortex-M4F" ] else: c_flags_cmd = [ - "--cpu", cpuchoice, - "--thumb", "--dlib_config", join(TOOLCHAIN_PATHS['IAR'], "inc", "c", "DLib_Config_Full.h") + "--cpu", cpuchoice ] + + c_flags_cmd.extend([ + "--thumb", "--dlib_config", "DLib_Config_Full.h" + ]) # custom c++ cmd flags cxx_flags_cmd = [ "--c++", "--no_rtti", "--no_exceptions"