Merge pull request #204 from theotherjimmy/1830-counterpart

added support for features array to build tools
Martin Kojtal 2016-06-06 10:23:02 +01:00
commit c6b51d7fe3
3 changed files with 7 additions and 2 deletions

View File

@ -1 +1 @@
https://github.com/mbedmicro/mbed/#974ecf731c8a5de78acc9e40573f2a7c7641c2cd
https://github.com/mbedmicro/mbed/#d1ec4beabef320b48ec3cdad57e293ce7708f55f

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']
# {target_name: target_instance} map for all the targets in the system
__target_map = {}

View File

@ -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