Skip to content

Move Mbed 5 support check so that it affects the exporters #6512

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 3, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions tools/build_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -486,11 +486,6 @@ def scan_resources(src_paths, toolchain, dependencies_paths=None,
# Set the toolchain's configuration data
toolchain.set_config_data(toolchain.config.get_config_data())

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")

return resources

def build_project(src_paths, build_path, target, toolchain_name,
Expand Down
8 changes: 7 additions & 1 deletion tools/config/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@
from jinja2.environment import Environment
from jsonschema import Draft4Validator, RefResolver

from ..utils import json_file_to_dict, intelhex_offset, integer
from ..utils import (json_file_to_dict, intelhex_offset, integer,
NotSupportedException)
from ..arm_pack_manager import Cache
from ..targets import (CUMULATIVE_ATTRIBUTES, TARGET_MAP, generate_py_target,
get_resolution_order, Target)
Expand Down Expand Up @@ -1029,6 +1030,11 @@ def load_resources(self, resources):
prev_features = features
self.validate_config()

if (hasattr(self.target, "release_versions") and
"5" not in self.target.release_versions and
"rtos" in self.lib_config_data):
raise NotSupportedException("Target does not support mbed OS 5")

return resources

@staticmethod
Expand Down