mirror of https://github.com/ARMmbed/mbed-os.git
Disallow building of mbed OS 2 + rtos
parent
07a6c07408
commit
d8caee9077
|
@ -478,12 +478,10 @@ def build_project(src_paths, build_path, target, toolchain_name,
|
|||
src_paths.extend(libraries_paths)
|
||||
inc_dirs.extend(map(dirname, libraries_paths))
|
||||
|
||||
# Build Directory
|
||||
if clean and exists(build_path):
|
||||
rmtree(build_path)
|
||||
mkdir(build_path)
|
||||
|
||||
# Pass all params to the unified prepare_toolchain()
|
||||
toolchain = prepare_toolchain(
|
||||
src_paths, build_path, target, toolchain_name, macros=macros,
|
||||
clean=clean, jobs=jobs, notify=notify, silent=silent, verbose=verbose,
|
||||
|
@ -513,6 +511,10 @@ def build_project(src_paths, build_path, target, toolchain_name,
|
|||
try:
|
||||
# Call unified scan_resources
|
||||
resources = scan_resources(src_paths, toolchain, inc_dirs=inc_dirs)
|
||||
if (hasattr(toolchain.target, "release_versions") and
|
||||
"5" not in toolchain.target.release_versions and
|
||||
"rtos" in toolchain.config.lib_config_data):
|
||||
raise NotSupportedException("Target does not support mbed OS 5")
|
||||
|
||||
# Change linker script if specified
|
||||
if linker_script is not None:
|
||||
|
|
|
@ -313,8 +313,8 @@ if __name__ == '__main__':
|
|||
|
||||
except KeyboardInterrupt, e:
|
||||
print "\n[CTRL+c] exit"
|
||||
except NotSupportedException, e:
|
||||
print "\nNot supported for selected target"
|
||||
except NotSupportedException as e:
|
||||
print "\nCould not compile for %s: %s" % (mcu, str(e))
|
||||
except Exception,e:
|
||||
if options.verbose:
|
||||
import traceback
|
||||
|
|
|
@ -131,7 +131,7 @@ class BuildApiTests(unittest.TestCase):
|
|||
mock_exists.return_value = False
|
||||
mock_prepare_toolchain().link_program.return_value = 1, 2
|
||||
mock_prepare_toolchain().config = namedtuple(
|
||||
"Config", "has_regions name")(None, None)
|
||||
"Config", "has_regions name lib_config_data")(None, None, {})
|
||||
|
||||
build_project(self.src_paths, self.build_path, self.target,
|
||||
self.toolchain_name, app_config=app_config)
|
||||
|
@ -160,7 +160,7 @@ class BuildApiTests(unittest.TestCase):
|
|||
# Needed for the unpacking of the returned value
|
||||
mock_prepare_toolchain().link_program.return_value = 1, 2
|
||||
mock_prepare_toolchain().config = namedtuple(
|
||||
"Config", "has_regions name")(None, None)
|
||||
"Config", "has_regions name lib_config_data")(None, None, {})
|
||||
|
||||
build_project(self.src_paths, self.build_path, self.target,
|
||||
self.toolchain_name)
|
||||
|
|
Loading…
Reference in New Issue