mirror of https://github.com/ARMmbed/mbed-os.git
Fixing import issues with build.py
parent
8095f0e88a
commit
0621ffa03e
|
@ -28,7 +28,6 @@ sys.path.insert(0, ROOT)
|
||||||
|
|
||||||
|
|
||||||
from workspace_tools.toolchains import TOOLCHAINS
|
from workspace_tools.toolchains import TOOLCHAINS
|
||||||
from workspace_tools.toolchains import print_notify_verbose
|
|
||||||
from workspace_tools.targets import TARGET_NAMES, TARGET_MAP
|
from workspace_tools.targets import TARGET_NAMES, TARGET_MAP
|
||||||
from workspace_tools.options import get_default_options_parser
|
from workspace_tools.options import get_default_options_parser
|
||||||
from workspace_tools.build_api import build_mbed_libs, build_lib
|
from workspace_tools.build_api import build_mbed_libs, build_lib
|
||||||
|
@ -184,8 +183,6 @@ if __name__ == '__main__':
|
||||||
if options.cpputest_lib:
|
if options.cpputest_lib:
|
||||||
libraries.extend(["cpputest"])
|
libraries.extend(["cpputest"])
|
||||||
|
|
||||||
notify = print_notify_verbose if options.extra_verbose_notify else None # Special notify for CI (more verbose)
|
|
||||||
|
|
||||||
# Build results
|
# Build results
|
||||||
failures = []
|
failures = []
|
||||||
successes = []
|
successes = []
|
||||||
|
@ -203,7 +200,7 @@ if __name__ == '__main__':
|
||||||
# Static check for library
|
# Static check for library
|
||||||
static_analysis_scan_lib(lib_id, mcu, toolchain, CPPCHECK_CMD, CPPCHECK_MSG_FORMAT,
|
static_analysis_scan_lib(lib_id, mcu, toolchain, CPPCHECK_CMD, CPPCHECK_MSG_FORMAT,
|
||||||
options=options.options,
|
options=options.options,
|
||||||
notify=notify, verbose=options.verbose, jobs=options.jobs, clean=options.clean,
|
extra_verbose=options.extra_verbose_notify, verbose=options.verbose, jobs=options.jobs, clean=options.clean,
|
||||||
macros=options.macros)
|
macros=options.macros)
|
||||||
pass
|
pass
|
||||||
except Exception, e:
|
except Exception, e:
|
||||||
|
@ -221,17 +218,16 @@ if __name__ == '__main__':
|
||||||
mcu = TARGET_MAP[target]
|
mcu = TARGET_MAP[target]
|
||||||
lib_build_res = build_mbed_libs(mcu, toolchain,
|
lib_build_res = build_mbed_libs(mcu, toolchain,
|
||||||
options=options.options,
|
options=options.options,
|
||||||
notify=notify,
|
extra_verbose=options.extra_verbose_notify,
|
||||||
verbose=options.verbose,
|
verbose=options.verbose,
|
||||||
silent=options.silent,
|
silent=options.silent,
|
||||||
jobs=options.jobs,
|
jobs=options.jobs,
|
||||||
clean=options.clean,
|
clean=options.clean,
|
||||||
macros=options.macros)
|
macros=options.macros)
|
||||||
for lib_id in libraries:
|
for lib_id in libraries:
|
||||||
notify = print_notify_verbose if options.extra_verbose_notify else None # Special notify for CI (more verbose)
|
|
||||||
build_lib(lib_id, mcu, toolchain,
|
build_lib(lib_id, mcu, toolchain,
|
||||||
options=options.options,
|
options=options.options,
|
||||||
notify=notify,
|
extra_verbose=options.extra_verbose_notify,
|
||||||
verbose=options.verbose,
|
verbose=options.verbose,
|
||||||
silent=options.silent,
|
silent=options.silent,
|
||||||
clean=options.clean,
|
clean=options.clean,
|
||||||
|
|
|
@ -77,11 +77,11 @@ def add_result_to_report(report, result):
|
||||||
def build_project(src_path, build_path, target, toolchain_name,
|
def build_project(src_path, build_path, target, toolchain_name,
|
||||||
libraries_paths=None, options=None, linker_script=None,
|
libraries_paths=None, options=None, linker_script=None,
|
||||||
clean=False, notify=None, verbose=False, name=None, macros=None, inc_dirs=None,
|
clean=False, notify=None, verbose=False, name=None, macros=None, inc_dirs=None,
|
||||||
jobs=1, silent=False, report=None, properties=None, project_id=None, project_description=None):
|
jobs=1, silent=False, report=None, properties=None, project_id=None, project_description=None, extra_verbose=False):
|
||||||
""" This function builds project. Project can be for example one test / UT
|
""" This function builds project. Project can be for example one test / UT
|
||||||
"""
|
"""
|
||||||
# Toolchain instance
|
# Toolchain instance
|
||||||
toolchain = TOOLCHAIN_CLASSES[toolchain_name](target, options, notify, macros, silent)
|
toolchain = TOOLCHAIN_CLASSES[toolchain_name](target, options, notify, macros, silent, extra_verbose=extra_verbose)
|
||||||
toolchain.VERBOSE = verbose
|
toolchain.VERBOSE = verbose
|
||||||
toolchain.jobs = jobs
|
toolchain.jobs = jobs
|
||||||
toolchain.build_all = clean
|
toolchain.build_all = clean
|
||||||
|
@ -100,12 +100,12 @@ def build_project(src_path, build_path, target, toolchain_name,
|
||||||
# User used custom global project name to have the same name for the
|
# User used custom global project name to have the same name for the
|
||||||
toolchain.info("Building project %s to %s (%s, %s)" % (PROJECT_BASENAME.upper(), name, target.name, toolchain_name))
|
toolchain.info("Building project %s to %s (%s, %s)" % (PROJECT_BASENAME.upper(), name, target.name, toolchain_name))
|
||||||
|
|
||||||
|
|
||||||
|
if report != None:
|
||||||
start = time()
|
start = time()
|
||||||
id_name = project_id.upper()
|
id_name = project_id.upper()
|
||||||
description = project_description
|
description = project_description
|
||||||
cur_result = None
|
cur_result = None
|
||||||
|
|
||||||
if report != None:
|
|
||||||
prep_report(report, target.name, toolchain_name, id_name)
|
prep_report(report, target.name, toolchain_name, id_name)
|
||||||
cur_result = create_result(target.name, toolchain_name, id_name, description)
|
cur_result = create_result(target.name, toolchain_name, id_name, description)
|
||||||
|
|
||||||
|
@ -158,6 +158,7 @@ def build_project(src_path, build_path, target, toolchain_name,
|
||||||
return res
|
return res
|
||||||
|
|
||||||
except Exception, e:
|
except Exception, e:
|
||||||
|
if report != None:
|
||||||
end = time()
|
end = time()
|
||||||
cur_result["result"] = "FAIL"
|
cur_result["result"] = "FAIL"
|
||||||
cur_result["elapsed_time"] = end - start
|
cur_result["elapsed_time"] = end - start
|
||||||
|
@ -177,7 +178,7 @@ def build_project(src_path, build_path, target, toolchain_name,
|
||||||
def build_library(src_paths, build_path, target, toolchain_name,
|
def build_library(src_paths, build_path, target, toolchain_name,
|
||||||
dependencies_paths=None, options=None, name=None, clean=False,
|
dependencies_paths=None, options=None, name=None, clean=False,
|
||||||
notify=None, verbose=False, macros=None, inc_dirs=None, inc_dirs_ext=None,
|
notify=None, verbose=False, macros=None, inc_dirs=None, inc_dirs_ext=None,
|
||||||
jobs=1, silent=False, report=None, properties=None):
|
jobs=1, silent=False, report=None, properties=None, extra_verbose=False):
|
||||||
""" src_path: the path of the source directory
|
""" src_path: the path of the source directory
|
||||||
build_path: the path of the build directory
|
build_path: the path of the build directory
|
||||||
target: ['LPC1768', 'LPC11U24', 'LPC2368']
|
target: ['LPC1768', 'LPC11U24', 'LPC2368']
|
||||||
|
@ -195,12 +196,11 @@ def build_library(src_paths, build_path, target, toolchain_name,
|
||||||
# The first path will give the name to the library
|
# The first path will give the name to the library
|
||||||
name = basename(src_paths[0])
|
name = basename(src_paths[0])
|
||||||
|
|
||||||
|
if report != None:
|
||||||
start = time()
|
start = time()
|
||||||
id_name = name.upper()
|
id_name = name.upper()
|
||||||
description = name
|
description = name
|
||||||
cur_result = None
|
cur_result = None
|
||||||
|
|
||||||
if report != None:
|
|
||||||
prep_report(report, target.name, toolchain_name, id_name)
|
prep_report(report, target.name, toolchain_name, id_name)
|
||||||
cur_result = create_result(target.name, toolchain_name, id_name, description)
|
cur_result = create_result(target.name, toolchain_name, id_name, description)
|
||||||
|
|
||||||
|
@ -220,7 +220,7 @@ def build_library(src_paths, build_path, target, toolchain_name,
|
||||||
|
|
||||||
try:
|
try:
|
||||||
# Toolchain instance
|
# Toolchain instance
|
||||||
toolchain = TOOLCHAIN_CLASSES[toolchain_name](target, options, macros=macros, notify=notify, silent=silent)
|
toolchain = TOOLCHAIN_CLASSES[toolchain_name](target, options, macros=macros, notify=notify, silent=silent, extra_verbose=extra_verbose)
|
||||||
toolchain.VERBOSE = verbose
|
toolchain.VERBOSE = verbose
|
||||||
toolchain.jobs = jobs
|
toolchain.jobs = jobs
|
||||||
toolchain.build_all = clean
|
toolchain.build_all = clean
|
||||||
|
@ -293,7 +293,7 @@ def build_library(src_paths, build_path, target, toolchain_name,
|
||||||
# Let Exception propagate
|
# Let Exception propagate
|
||||||
raise e
|
raise e
|
||||||
|
|
||||||
def build_lib(lib_id, target, toolchain, options=None, verbose=False, clean=False, macros=None, notify=None, jobs=1, silent=False, report=None, properties=None):
|
def build_lib(lib_id, target, toolchain, options=None, verbose=False, clean=False, macros=None, notify=None, jobs=1, silent=False, report=None, properties=None, extra_verbose=False):
|
||||||
""" Wrapper for build_library function.
|
""" Wrapper for build_library function.
|
||||||
Function builds library in proper directory using all dependencies and macros defined by user.
|
Function builds library in proper directory using all dependencies and macros defined by user.
|
||||||
"""
|
"""
|
||||||
|
@ -314,21 +314,22 @@ def build_lib(lib_id, target, toolchain, options=None, verbose=False, clean=Fals
|
||||||
inc_dirs_ext=lib.inc_dirs_ext,
|
inc_dirs_ext=lib.inc_dirs_ext,
|
||||||
jobs=jobs,
|
jobs=jobs,
|
||||||
report=report,
|
report=report,
|
||||||
properties=properties)
|
properties=properties,
|
||||||
|
extra_verbose=extra_verbose)
|
||||||
else:
|
else:
|
||||||
print 'Library "%s" is not yet supported on target %s with toolchain %s' % (lib_id, target.name, toolchain)
|
print 'Library "%s" is not yet supported on target %s with toolchain %s' % (lib_id, target.name, toolchain)
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
|
||||||
# We do have unique legacy conventions about how we build and package the mbed library
|
# We do have unique legacy conventions about how we build and package the mbed library
|
||||||
def build_mbed_libs(target, toolchain_name, options=None, verbose=False, clean=False, macros=None, notify=None, jobs=1, silent=False, report=None, properties=None):
|
def build_mbed_libs(target, toolchain_name, options=None, verbose=False, clean=False, macros=None, notify=None, jobs=1, silent=False, report=None, properties=None, extra_verbose=False):
|
||||||
""" Function returns True is library was built and false if building was skipped """
|
""" Function returns True is library was built and false if building was skipped """
|
||||||
|
|
||||||
|
if report != None:
|
||||||
start = time()
|
start = time()
|
||||||
id_name = "MBED"
|
id_name = "MBED"
|
||||||
description = "mbed SDK"
|
description = "mbed SDK"
|
||||||
cur_result = None
|
cur_result = None
|
||||||
|
|
||||||
if report != None:
|
|
||||||
prep_report(report, target.name, toolchain_name, id_name)
|
prep_report(report, target.name, toolchain_name, id_name)
|
||||||
cur_result = create_result(target.name, toolchain_name, id_name, description)
|
cur_result = create_result(target.name, toolchain_name, id_name, description)
|
||||||
|
|
||||||
|
@ -349,7 +350,7 @@ def build_mbed_libs(target, toolchain_name, options=None, verbose=False, clean=F
|
||||||
|
|
||||||
try:
|
try:
|
||||||
# Toolchain
|
# Toolchain
|
||||||
toolchain = TOOLCHAIN_CLASSES[toolchain_name](target, options, macros=macros, notify=notify, silent=silent)
|
toolchain = TOOLCHAIN_CLASSES[toolchain_name](target, options, macros=macros, notify=notify, silent=silent, extra_verbose=extra_verbose)
|
||||||
toolchain.VERBOSE = verbose
|
toolchain.VERBOSE = verbose
|
||||||
toolchain.jobs = jobs
|
toolchain.jobs = jobs
|
||||||
toolchain.build_all = clean
|
toolchain.build_all = clean
|
||||||
|
@ -500,9 +501,9 @@ def get_target_supported_toolchains(target):
|
||||||
return TARGET_MAP[target].supported_toolchains if target in TARGET_MAP else None
|
return TARGET_MAP[target].supported_toolchains if target in TARGET_MAP else None
|
||||||
|
|
||||||
|
|
||||||
def static_analysis_scan(target, toolchain_name, CPPCHECK_CMD, CPPCHECK_MSG_FORMAT, options=None, verbose=False, clean=False, macros=None, notify=None, jobs=1):
|
def static_analysis_scan(target, toolchain_name, CPPCHECK_CMD, CPPCHECK_MSG_FORMAT, options=None, verbose=False, clean=False, macros=None, notify=None, jobs=1, extra_verbose=False):
|
||||||
# Toolchain
|
# Toolchain
|
||||||
toolchain = TOOLCHAIN_CLASSES[toolchain_name](target, options, macros=macros, notify=notify)
|
toolchain = TOOLCHAIN_CLASSES[toolchain_name](target, options, macros=macros, notify=notify, extra_verbose=extra_verbose)
|
||||||
toolchain.VERBOSE = verbose
|
toolchain.VERBOSE = verbose
|
||||||
toolchain.jobs = jobs
|
toolchain.jobs = jobs
|
||||||
toolchain.build_all = clean
|
toolchain.build_all = clean
|
||||||
|
@ -613,19 +614,19 @@ def static_analysis_scan(target, toolchain_name, CPPCHECK_CMD, CPPCHECK_MSG_FORM
|
||||||
|
|
||||||
|
|
||||||
def static_analysis_scan_lib(lib_id, target, toolchain, cppcheck_cmd, cppcheck_msg_format,
|
def static_analysis_scan_lib(lib_id, target, toolchain, cppcheck_cmd, cppcheck_msg_format,
|
||||||
options=None, verbose=False, clean=False, macros=None, notify=None, jobs=1):
|
options=None, verbose=False, clean=False, macros=None, notify=None, jobs=1, extra_verbose=False):
|
||||||
lib = Library(lib_id)
|
lib = Library(lib_id)
|
||||||
if lib.is_supported(target, toolchain):
|
if lib.is_supported(target, toolchain):
|
||||||
static_analysis_scan_library(lib.source_dir, lib.build_dir, target, toolchain, cppcheck_cmd, cppcheck_msg_format,
|
static_analysis_scan_library(lib.source_dir, lib.build_dir, target, toolchain, cppcheck_cmd, cppcheck_msg_format,
|
||||||
lib.dependencies, options,
|
lib.dependencies, options,
|
||||||
verbose=verbose, clean=clean, macros=macros, notify=notify, jobs=jobs)
|
verbose=verbose, clean=clean, macros=macros, notify=notify, jobs=jobs, extra_verbose=extra_verbose)
|
||||||
else:
|
else:
|
||||||
print 'Library "%s" is not yet supported on target %s with toolchain %s'% (lib_id, target.name, toolchain)
|
print 'Library "%s" is not yet supported on target %s with toolchain %s'% (lib_id, target.name, toolchain)
|
||||||
|
|
||||||
|
|
||||||
def static_analysis_scan_library(src_paths, build_path, target, toolchain_name, cppcheck_cmd, cppcheck_msg_format,
|
def static_analysis_scan_library(src_paths, build_path, target, toolchain_name, cppcheck_cmd, cppcheck_msg_format,
|
||||||
dependencies_paths=None, options=None, name=None, clean=False,
|
dependencies_paths=None, options=None, name=None, clean=False,
|
||||||
notify=None, verbose=False, macros=None, jobs=1):
|
notify=None, verbose=False, macros=None, jobs=1, extra_verbose=False):
|
||||||
""" Function scans library (or just some set of sources/headers) for staticly detectable defects """
|
""" Function scans library (or just some set of sources/headers) for staticly detectable defects """
|
||||||
if type(src_paths) != ListType:
|
if type(src_paths) != ListType:
|
||||||
src_paths = [src_paths]
|
src_paths = [src_paths]
|
||||||
|
@ -635,7 +636,7 @@ def static_analysis_scan_library(src_paths, build_path, target, toolchain_name,
|
||||||
raise Exception("The library source folder does not exist: %s", src_path)
|
raise Exception("The library source folder does not exist: %s", src_path)
|
||||||
|
|
||||||
# Toolchain instance
|
# Toolchain instance
|
||||||
toolchain = TOOLCHAIN_CLASSES[toolchain_name](target, options, macros=macros, notify=notify)
|
toolchain = TOOLCHAIN_CLASSES[toolchain_name](target, options, macros=macros, notify=notify, extra_verbose=extra_verbose)
|
||||||
toolchain.VERBOSE = verbose
|
toolchain.VERBOSE = verbose
|
||||||
toolchain.jobs = jobs
|
toolchain.jobs = jobs
|
||||||
|
|
||||||
|
|
|
@ -180,7 +180,7 @@ class mbedToolchain:
|
||||||
GOANNA_FORMAT = "[Goanna] warning [%FILENAME%:%LINENO%] - [%CHECKNAME%(%SEVERITY%)] %MESSAGE%"
|
GOANNA_FORMAT = "[Goanna] warning [%FILENAME%:%LINENO%] - [%CHECKNAME%(%SEVERITY%)] %MESSAGE%"
|
||||||
GOANNA_DIAGNOSTIC_PATTERN = re.compile(r'"\[Goanna\] (?P<severity>warning) \[(?P<file>[^:]+):(?P<line>\d+)\] \- (?P<message>.*)"')
|
GOANNA_DIAGNOSTIC_PATTERN = re.compile(r'"\[Goanna\] (?P<severity>warning) \[(?P<file>[^:]+):(?P<line>\d+)\] \- (?P<message>.*)"')
|
||||||
|
|
||||||
def __init__(self, target, options=None, notify=None, macros=None, silent=False):
|
def __init__(self, target, options=None, notify=None, macros=None, silent=False, extra_verbose=False):
|
||||||
self.target = target
|
self.target = target
|
||||||
self.name = self.__class__.__name__
|
self.name = self.__class__.__name__
|
||||||
self.hook = hooks.Hook(target, self)
|
self.hook = hooks.Hook(target, self)
|
||||||
|
@ -189,7 +189,13 @@ class mbedToolchain:
|
||||||
|
|
||||||
self.legacy_ignore_dirs = LEGACY_IGNORE_DIRS - set([target.name, LEGACY_TOOLCHAIN_NAMES[self.name]])
|
self.legacy_ignore_dirs = LEGACY_IGNORE_DIRS - set([target.name, LEGACY_TOOLCHAIN_NAMES[self.name]])
|
||||||
|
|
||||||
self.notify_fun = notify if notify is not None else self.print_notify
|
if notify:
|
||||||
|
self.notify_fun = notify
|
||||||
|
elif extra_verbose:
|
||||||
|
self.notify_fun = self.print_notify_verbose
|
||||||
|
else:
|
||||||
|
self.notify_fun = self.print_notify
|
||||||
|
|
||||||
self.options = options if options is not None else []
|
self.options = options if options is not None else []
|
||||||
|
|
||||||
self.macros = macros or []
|
self.macros = macros or []
|
||||||
|
|
|
@ -30,8 +30,8 @@ class ARM(mbedToolchain):
|
||||||
DIAGNOSTIC_PATTERN = re.compile('"(?P<file>[^"]+)", line (?P<line>\d+)( \(column (?P<column>\d+)\)|): (?P<severity>Warning|Error): (?P<message>.+)')
|
DIAGNOSTIC_PATTERN = re.compile('"(?P<file>[^"]+)", line (?P<line>\d+)( \(column (?P<column>\d+)\)|): (?P<severity>Warning|Error): (?P<message>.+)')
|
||||||
DEP_PATTERN = re.compile('\S+:\s(?P<file>.+)\n')
|
DEP_PATTERN = re.compile('\S+:\s(?P<file>.+)\n')
|
||||||
|
|
||||||
def __init__(self, target, options=None, notify=None, macros=None, silent=False):
|
def __init__(self, target, options=None, notify=None, macros=None, silent=False, extra_verbose=False):
|
||||||
mbedToolchain.__init__(self, target, options, notify, macros, silent)
|
mbedToolchain.__init__(self, target, options, notify, macros, silent, extra_verbose=extra_verbose)
|
||||||
|
|
||||||
if target.core == "Cortex-M0+":
|
if target.core == "Cortex-M0+":
|
||||||
cpu = "Cortex-M0"
|
cpu = "Cortex-M0"
|
||||||
|
@ -149,8 +149,8 @@ class ARM(mbedToolchain):
|
||||||
self.default_cmd(args)
|
self.default_cmd(args)
|
||||||
|
|
||||||
class ARM_STD(ARM):
|
class ARM_STD(ARM):
|
||||||
def __init__(self, target, options=None, notify=None, macros=None, silent=False):
|
def __init__(self, target, options=None, notify=None, macros=None, silent=False, extra_verbose=False):
|
||||||
ARM.__init__(self, target, options, notify, macros, silent)
|
ARM.__init__(self, target, options, notify, macros, silent, extra_verbose=extra_verbose)
|
||||||
self.cc += ["-D__ASSERT_MSG"]
|
self.cc += ["-D__ASSERT_MSG"]
|
||||||
self.cppc += ["-D__ASSERT_MSG"]
|
self.cppc += ["-D__ASSERT_MSG"]
|
||||||
self.ld.append("--libpath=%s" % ARM_LIB)
|
self.ld.append("--libpath=%s" % ARM_LIB)
|
||||||
|
@ -159,8 +159,8 @@ class ARM_STD(ARM):
|
||||||
class ARM_MICRO(ARM):
|
class ARM_MICRO(ARM):
|
||||||
PATCHED_LIBRARY = False
|
PATCHED_LIBRARY = False
|
||||||
|
|
||||||
def __init__(self, target, options=None, notify=None, macros=None, silent=False):
|
def __init__(self, target, options=None, notify=None, macros=None, silent=False, extra_verbose=False):
|
||||||
ARM.__init__(self, target, options, notify, macros, silent)
|
ARM.__init__(self, target, options, notify, macros, silent, extra_verbose=extra_verbose)
|
||||||
|
|
||||||
# Compiler
|
# Compiler
|
||||||
self.asm += ["-D__MICROLIB"]
|
self.asm += ["-D__MICROLIB"]
|
||||||
|
|
|
@ -30,8 +30,8 @@ class GCC(mbedToolchain):
|
||||||
CIRCULAR_DEPENDENCIES = True
|
CIRCULAR_DEPENDENCIES = True
|
||||||
DIAGNOSTIC_PATTERN = re.compile('((?P<line>\d+):)(\d+:)? (?P<severity>warning|error): (?P<message>.+)')
|
DIAGNOSTIC_PATTERN = re.compile('((?P<line>\d+):)(\d+:)? (?P<severity>warning|error): (?P<message>.+)')
|
||||||
|
|
||||||
def __init__(self, target, options=None, notify=None, macros=None, silent=False, tool_path=""):
|
def __init__(self, target, options=None, notify=None, macros=None, silent=False, tool_path="", extra_verbose=False):
|
||||||
mbedToolchain.__init__(self, target, options, notify, macros, silent)
|
mbedToolchain.__init__(self, target, options, notify, macros, silent, extra_verbose=extra_verbose)
|
||||||
|
|
||||||
if target.core == "Cortex-M0+":
|
if target.core == "Cortex-M0+":
|
||||||
cpu = "cortex-m0plus"
|
cpu = "cortex-m0plus"
|
||||||
|
@ -179,8 +179,8 @@ class GCC(mbedToolchain):
|
||||||
|
|
||||||
|
|
||||||
class GCC_ARM(GCC):
|
class GCC_ARM(GCC):
|
||||||
def __init__(self, target, options=None, notify=None, macros=None, silent=False):
|
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)
|
GCC.__init__(self, target, options, notify, macros, silent, GCC_ARM_PATH, extra_verbose=extra_verbose)
|
||||||
|
|
||||||
# Use latest gcc nanolib
|
# Use latest gcc nanolib
|
||||||
self.ld.append("--specs=nano.specs")
|
self.ld.append("--specs=nano.specs")
|
||||||
|
@ -193,8 +193,8 @@ class GCC_ARM(GCC):
|
||||||
|
|
||||||
|
|
||||||
class GCC_CR(GCC):
|
class GCC_CR(GCC):
|
||||||
def __init__(self, target, options=None, notify=None, macros=None, silent=False):
|
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)
|
GCC.__init__(self, target, options, notify, macros, silent, GCC_CR_PATH, extra_verbose=extra_verbose)
|
||||||
|
|
||||||
additional_compiler_flags = [
|
additional_compiler_flags = [
|
||||||
"-D__NEWLIB__", "-D__CODE_RED", "-D__USE_CMSIS", "-DCPP_USE_HEAP",
|
"-D__NEWLIB__", "-D__CODE_RED", "-D__USE_CMSIS", "-DCPP_USE_HEAP",
|
||||||
|
@ -210,8 +210,8 @@ class GCC_CR(GCC):
|
||||||
|
|
||||||
|
|
||||||
class GCC_CS(GCC):
|
class GCC_CS(GCC):
|
||||||
def __init__(self, target, options=None, notify=None, macros=None, silent=False):
|
def __init__(self, target, options=None, notify=None, macros=None, silent=False, extra_verbose=False):
|
||||||
GCC.__init__(self, target, options, notify, macros, silent, GCC_CS_PATH)
|
GCC.__init__(self, target, options, notify, macros, silent, GCC_CS_PATH, extra_verbose=extra_verbose)
|
||||||
|
|
||||||
|
|
||||||
class GCC_CW(GCC):
|
class GCC_CW(GCC):
|
||||||
|
@ -219,13 +219,13 @@ class GCC_CW(GCC):
|
||||||
"Cortex-M0+": "armv6-m",
|
"Cortex-M0+": "armv6-m",
|
||||||
}
|
}
|
||||||
|
|
||||||
def __init__(self, target, options=None, notify=None, macros=None, silent=False):
|
def __init__(self, target, options=None, notify=None, macros=None, silent=False, extra_verbose=False):
|
||||||
GCC.__init__(self, target, options, notify, macros, silent, CW_GCC_PATH)
|
GCC.__init__(self, target, options, notify, macros, silent, CW_GCC_PATH, extra_verbose=extra_verbose)
|
||||||
|
|
||||||
|
|
||||||
class GCC_CW_EWL(GCC_CW):
|
class GCC_CW_EWL(GCC_CW):
|
||||||
def __init__(self, target, options=None, notify=None, macros=None, silent=False):
|
def __init__(self, target, options=None, notify=None, macros=None, silent=False, extra_verbose=False):
|
||||||
GCC_CW.__init__(self, target, options, notify, macros, silent)
|
GCC_CW.__init__(self, target, options, notify, macros, silent, extra_verbose=extra_verbose)
|
||||||
|
|
||||||
# Compiler
|
# Compiler
|
||||||
common = [
|
common = [
|
||||||
|
@ -253,5 +253,5 @@ class GCC_CW_EWL(GCC_CW):
|
||||||
|
|
||||||
|
|
||||||
class GCC_CW_NEWLIB(GCC_CW):
|
class GCC_CW_NEWLIB(GCC_CW):
|
||||||
def __init__(self, target, options=None, notify=None, macros=None, silent=False):
|
def __init__(self, target, options=None, notify=None, macros=None, silent=False, extra_verbose=False):
|
||||||
GCC_CW.__init__(self, target, options, notify, macros, silent)
|
GCC_CW.__init__(self, target, options, notify, macros, silent, extra_verbose=extra_verbose)
|
||||||
|
|
|
@ -30,8 +30,8 @@ class IAR(mbedToolchain):
|
||||||
|
|
||||||
DIAGNOSTIC_PATTERN = re.compile('"(?P<file>[^"]+)",(?P<line>[\d]+)\s+(?P<severity>Warning|Error)(?P<message>.+)')
|
DIAGNOSTIC_PATTERN = re.compile('"(?P<file>[^"]+)",(?P<line>[\d]+)\s+(?P<severity>Warning|Error)(?P<message>.+)')
|
||||||
|
|
||||||
def __init__(self, target, options=None, notify=None, macros=None, silent=False):
|
def __init__(self, target, options=None, notify=None, macros=None, silent=False, extra_verbose=False):
|
||||||
mbedToolchain.__init__(self, target, options, notify, macros, silent)
|
mbedToolchain.__init__(self, target, options, notify, macros, silent, extra_verbose=extra_verbose)
|
||||||
|
|
||||||
c_flags = [
|
c_flags = [
|
||||||
"--cpu=%s" % target.core, "--thumb",
|
"--cpu=%s" % target.core, "--thumb",
|
||||||
|
|
Loading…
Reference in New Issue