From e7c3c883de854564eabd5b9b4f1e321c06ac919d Mon Sep 17 00:00:00 2001 From: Mihail Stoyanov Date: Wed, 8 Jun 2016 13:25:06 +0100 Subject: [PATCH 1/2] Introduce FEATURE_ keyword which behaves like TARGET_ but is generated from targets features (see targets.json) --- workspace_tools/toolchains/__init__.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/workspace_tools/toolchains/__init__.py b/workspace_tools/toolchains/__init__.py index 56e8220a76f..16b9f4dfe2c 100644 --- a/workspace_tools/toolchains/__init__.py +++ b/workspace_tools/toolchains/__init__.py @@ -281,6 +281,7 @@ def get_symbols(self): # Target and Toolchain symbols labels = self.get_labels() self.symbols = ["TARGET_%s" % t for t in labels['TARGET']] + self.symbols.extend(["FEATURE_%s" % t for t in labels['FEATURE']]) self.symbols.extend(["TOOLCHAIN_%s" % t for t in labels['TOOLCHAIN']]) # Config support @@ -314,6 +315,7 @@ def get_labels(self): toolchain_labels.remove('mbedToolchain') self.labels = { 'TARGET': self.target.get_labels(), + 'FEATURE': self.target.features, 'TOOLCHAIN': toolchain_labels } return self.labels @@ -364,6 +366,7 @@ def scan_resources(self, path): if ((d.startswith('.') or d in self.legacy_ignore_dirs) or (d.startswith('TARGET_') and d[7:] not in labels['TARGET']) or + (d.startswith('FEATURE_') and d[8:] not in labels['FEATURE']) or (d.startswith('TOOLCHAIN_') and d[10:] not in labels['TOOLCHAIN'])): dirs.remove(d) From d71f0156594643230ca294f4c5d0b5d0c42cbb4b Mon Sep 17 00:00:00 2001 From: Sam Grove Date: Thu, 9 Jun 2016 15:00:36 +0100 Subject: [PATCH 2/2] Added features to Target description to support the changed names and build extensions --- hal/targets.json | 1 + 1 file changed, 1 insertion(+) diff --git a/hal/targets.json b/hal/targets.json index d43187c5762..a2a8f75ce03 100644 --- a/hal/targets.json +++ b/hal/targets.json @@ -7,6 +7,7 @@ "is_disk_virtual": false, "macros": [], "device_has": [], + "features": [], "detect_code": [], "public": false },