Skip to content

Commit 92f2c38

Browse files
authored
Merge pull request #3414 from bridadan/remove_unnecessary_includes_libs
Remove unnecessary absolute paths from IAR and ARM compilers
2 parents 6849fd9 + 105a9b3 commit 92f2c38

File tree

2 files changed

+10
-22
lines changed

2 files changed

+10
-22
lines changed

tools/toolchains/arm.py

Lines changed: 4 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,9 @@ def __init__(self, target, notify=None, macros=None,
6161

6262
self.flags['common'] += ["--cpu=%s" % cpu]
6363

64-
self.asm = [main_cc] + self.flags['common'] + self.flags['asm'] + ["-I \""+ARM_INC+"\""]
65-
self.cc = [main_cc] + self.flags['common'] + self.flags['c'] + ["-I \""+ARM_INC+"\""]
66-
self.cppc = [main_cc] + self.flags['common'] + self.flags['c'] + self.flags['cxx'] + ["-I \""+ARM_INC+"\""]
64+
self.asm = [main_cc] + self.flags['common'] + self.flags['asm']
65+
self.cc = [main_cc] + self.flags['common'] + self.flags['c']
66+
self.cppc = [main_cc] + self.flags['common'] + self.flags['c'] + self.flags['cxx']
6767

6868
self.ld = [join(ARM_BIN, "armlink")]
6969
self.sys_libs = []
@@ -223,22 +223,8 @@ def binary(self, resources, elf, bin):
223223

224224

225225
class ARM_STD(ARM):
226-
def __init__(self, target, notify=None, macros=None,
227-
silent=False, extra_verbose=False, build_profile=None):
228-
ARM.__init__(self, target, notify, macros, silent,
229-
extra_verbose=extra_verbose, build_profile=build_profile)
230-
231-
# Run-time values
232-
self.ld.extend(["--libpath", join(TOOLCHAIN_PATHS['ARM'], "lib")])
226+
pass
233227

234228

235229
class ARM_MICRO(ARM):
236230
PATCHED_LIBRARY = False
237-
238-
def __init__(self, target, notify=None, macros=None,
239-
silent=False, extra_verbose=False, build_profile=None):
240-
ARM.__init__(self, target, notify, macros, silent,
241-
extra_verbose=extra_verbose, build_profile=build_profile)
242-
243-
# Run-time values
244-
self.ld.extend(["--libpath", join(TOOLCHAIN_PATHS['ARM'], "lib")])

tools/toolchains/iar.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,14 +60,16 @@ def __init__(self, target, notify=None, macros=None,
6060
# custom c flags
6161
if target.core == "Cortex-M4F":
6262
c_flags_cmd = [
63-
"--cpu", "Cortex-M4F",
64-
"--thumb", "--dlib_config", join(TOOLCHAIN_PATHS['IAR'], "inc", "c", "DLib_Config_Full.h")
63+
"--cpu", "Cortex-M4F"
6564
]
6665
else:
6766
c_flags_cmd = [
68-
"--cpu", cpuchoice,
69-
"--thumb", "--dlib_config", join(TOOLCHAIN_PATHS['IAR'], "inc", "c", "DLib_Config_Full.h")
67+
"--cpu", cpuchoice
7068
]
69+
70+
c_flags_cmd.extend([
71+
"--thumb", "--dlib_config", "DLib_Config_Full.h"
72+
])
7173
# custom c++ cmd flags
7274
cxx_flags_cmd = [
7375
"--c++", "--no_rtti", "--no_exceptions"

0 commit comments

Comments
 (0)