mirror of https://github.com/ARMmbed/mbed-os.git
added features support to all of the toolchains
parent
76e6c885a2
commit
2fe708d526
|
|
@ -58,7 +58,7 @@ def cached(func):
|
||||||
class Target:
|
class Target:
|
||||||
# Cumulative attributes can have values appended to them, so they
|
# Cumulative attributes can have values appended to them, so they
|
||||||
# need to be computed differently than regular attributes
|
# 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
|
# 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
|
# ASCII from Unicode. Needed because the original mbed target definitions were written in
|
||||||
|
|
|
||||||
|
|
@ -298,6 +298,11 @@ class mbedToolchain:
|
||||||
|
|
||||||
# Add target's symbols
|
# Add target's symbols
|
||||||
self.symbols += self.target.macros
|
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
|
# Add extra symbols passed via 'macros' parameter
|
||||||
self.symbols += self.macros
|
self.symbols += self.macros
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue