File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -58,7 +58,7 @@ def wrapper(*args, **kwargs):
58
58
class Target :
59
59
# Cumulative attributes can have values appended to them, so they
60
60
# need to be computed differently than regular attributes
61
- __cumulative_attributes = ['extra_labels' , 'macros' ]
61
+ __cumulative_attributes = ['extra_labels' , 'macros' , 'features' ]
62
62
63
63
# Utility function: traverse a dictionary and change all the strings in the dictionary to
64
64
# ASCII from Unicode. Needed because the original mbed target definitions were written in
Original file line number Diff line number Diff line change @@ -298,6 +298,11 @@ def get_symbols(self):
298
298
299
299
# Add target's symbols
300
300
self .symbols += self .target .macros
301
+ # Add target's hardware
302
+ try :
303
+ self .symbols += ["DEVICE_" + feature + "=1" for feature in self .target .features ]
304
+ except AttributeError :
305
+ pass
301
306
# Add extra symbols passed via 'macros' parameter
302
307
self .symbols += self .macros
303
308
You can’t perform that action at this time.
0 commit comments