Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of mbed-sdk-tools by
Diff: toolchains/gcc.py
- Revision:
- 20:835f6355470d
- Parent:
- 13:ab47a20b66f0
- Child:
- 21:4fdf0dd04f6f
diff -r 3604ee113e2d -r 835f6355470d toolchains/gcc.py --- a/toolchains/gcc.py Fri Jul 15 13:11:30 2016 +0100 +++ b/toolchains/gcc.py Fri Jul 15 15:28:09 2016 +0100 @@ -17,8 +17,7 @@ import re from os.path import join, basename, splitext, dirname, exists -from tools.toolchains import mbedToolchain -from tools.settings import GCC_ARM_PATH, GCC_CR_PATH +from tools.toolchains import mbedToolchain, TOOLCHAIN_PATHS from tools.settings import GOANNA_PATH from tools.hooks import hook_tool @@ -236,15 +235,8 @@ cmd = self.hook.get_cmdline_linker(cmd) # Split link command to linker executable + response file - link_files = join(dirname(output), ".link_files.txt") - with open(link_files, "wb") as f: - cmd_linker = cmd[0] - cmd_list = [] - for c in cmd[1:]: - if c: - cmd_list.append(('"%s"' % c) if not c.startswith('-') else c) - string = " ".join(cmd_list).replace("\\", "/") - f.write(string) + cmd_linker = cmd[0] + link_files = self.get_link_file(cmd[1:]) # Exec command self.default_cmd([cmd_linker, "@%s" % link_files]) @@ -276,7 +268,7 @@ class GCC_ARM(GCC): def __init__(self, target, options=None, notify=None, macros=None, silent=False, extra_verbose=False): - GCC.__init__(self, target, options, notify, macros, silent, GCC_ARM_PATH, extra_verbose=extra_verbose) + GCC.__init__(self, target, options, notify, macros, silent, TOOLCHAIN_PATHS['GCC_ARM'], extra_verbose=extra_verbose) # Use latest gcc nanolib if "big-build" in self.options: @@ -309,7 +301,7 @@ class GCC_CR(GCC): def __init__(self, target, options=None, notify=None, macros=None, silent=False, extra_verbose=False): - GCC.__init__(self, target, options, notify, macros, silent, GCC_CR_PATH, extra_verbose=extra_verbose) + GCC.__init__(self, target, options, notify, macros, silent, TOOLCHAIN_PATHS['GCC_CR'], extra_verbose=extra_verbose) additional_compiler_flags = [ "-D__NEWLIB__", "-D__CODE_RED", "-D__USE_CMSIS", "-DCPP_USE_HEAP",