mirror of https://github.com/ARMmbed/mbed-os.git
added support for features array to toolchains
parent
2904e10924
commit
90ecda6b73
|
@ -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 = {}
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue