added features support to all of the toolchains

pull/1830/head
Jimmy Brisson 2016-06-02 14:19:51 -05:00
parent 76e6c885a2
commit 2fe708d526
2 changed files with 6 additions and 1 deletions

View File

@ -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']
# Utility function: traverse a dictionary and change all the strings in the dictionary to
# ASCII from Unicode. Needed because the original mbed target definitions were written in

View File

@ -298,6 +298,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