From 90ecda6b73c5b2b878772e2484fdfca263b24a06 Mon Sep 17 00:00:00 2001 From: Jimmy Brisson Date: Fri, 3 Jun 2016 16:07:30 -0500 Subject: [PATCH 1/2] added support for features array to toolchains --- tools/targets.py | 2 +- tools/toolchains/__init__.py | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/tools/targets.py b/tools/targets.py index 1125ae3d82..3656b87fe8 100755 --- a/tools/targets.py +++ b/tools/targets.py @@ -58,7 +58,7 @@ def cached(func): class Target: # Cumulative attributes can have values appended to them, so they # need to be computed differently than regular attributes - __cumulative_attributes = ['extra_labels', 'macros'] + __cumulative_attributes = ['extra_labels', 'macros', 'features'] # {target_name: target_instance} map for all the targets in the system __target_map = {} diff --git a/tools/toolchains/__init__.py b/tools/toolchains/__init__.py index 67ee57a2cf..82e0fd526e 100644 --- a/tools/toolchains/__init__.py +++ b/tools/toolchains/__init__.py @@ -324,6 +324,11 @@ class mbedToolchain: # Add target's symbols self.symbols += self.target.macros + # Add target's hardware + try : + self.symbols += ["DEVICE_" + feature + "=1" for feature in self.target.features] + except AttributeError : + pass # Add extra symbols passed via 'macros' parameter self.symbols += self.macros From 1e71a28aff82dd76e274bc2f2773fc08047ffb75 Mon Sep 17 00:00:00 2001 From: Jimmy Brisson Date: Fri, 3 Jun 2016 16:42:35 -0500 Subject: [PATCH 2/2] updated mbed.lib to point to the last commit from mbedmicro/mbed#1830 --- mbed.lib | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mbed.lib b/mbed.lib index fd9e93d6a4..a5027bbf98 100644 --- a/mbed.lib +++ b/mbed.lib @@ -1 +1 @@ -https://github.com/mbedmicro/mbed/#974ecf731c8a5de78acc9e40573f2a7c7641c2cd +https://github.com/mbedmicro/mbed/#d1ec4beabef320b48ec3cdad57e293ce7708f55f