Skip to content

Commit b233da0

Browse files
authored
Merge pull request #2492 from theotherjimmy/fix-config-macros
Fix macros being the exact same when generating mbed_config.h
2 parents 133f16a + 096d17d commit b233da0

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

tools/config.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -774,14 +774,15 @@ def config_to_header(config, fname=None):
774774
if macro.macro_value:
775775
header_data += ("#define {0:<{1}} {2!s:<{3}}" +
776776
" // defined by {4}\n")\
777-
.format(m.macro_name, max_macro_name_len, m.macro_value,
778-
max_macro_val_len, m.defined_by)
777+
.format(macro.macro_name, max_macro_name_len,
778+
macro.macro_value, max_macro_val_len,
779+
macro.defined_by)
779780
else:
780781
header_data += ("#define {0:<{1}}" +
781782
" // defined by {2}\n")\
782-
.format(m.macro_name,
783+
.format(macro.macro_name,
783784
max_macro_name_len + max_macro_val_len + 1,
784-
m.defined_by)
785+
macro.defined_by)
785786
header_data += "\n#endif\n"
786787
# If fname is given, write "header_data" to it
787788
if fname:

0 commit comments

Comments
 (0)