Skip to content

Commit 24c7b1a

Browse files
committed
Move Mbed 5 support check so that it affects the exporters
1 parent 773fb90 commit 24c7b1a

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

tools/build_api.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -486,11 +486,6 @@ def scan_resources(src_paths, toolchain, dependencies_paths=None,
486486
# Set the toolchain's configuration data
487487
toolchain.set_config_data(toolchain.config.get_config_data())
488488

489-
if (hasattr(toolchain.target, "release_versions") and
490-
"5" not in toolchain.target.release_versions and
491-
"rtos" in toolchain.config.lib_config_data):
492-
raise NotSupportedException("Target does not support mbed OS 5")
493-
494489
return resources
495490

496491
def build_project(src_paths, build_path, target, toolchain_name,

tools/config/__init__.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@
3030
from jinja2.environment import Environment
3131
from jsonschema import Draft4Validator, RefResolver
3232

33-
from ..utils import json_file_to_dict, intelhex_offset, integer
33+
from ..utils import (json_file_to_dict, intelhex_offset, integer,
34+
NotSupportedException)
3435
from ..arm_pack_manager import Cache
3536
from ..targets import (CUMULATIVE_ATTRIBUTES, TARGET_MAP, generate_py_target,
3637
get_resolution_order, Target)
@@ -1029,6 +1030,11 @@ def load_resources(self, resources):
10291030
prev_features = features
10301031
self.validate_config()
10311032

1033+
if (hasattr(self.target, "release_versions") and
1034+
"5" not in self.target.release_versions and
1035+
"rtos" in self.lib_config_data):
1036+
raise NotSupportedException("Target does not support mbed OS 5")
1037+
10321038
return resources
10331039

10341040
@staticmethod

0 commit comments

Comments
 (0)