HAL_ChibiOS: make hwdef.h the same on python2 and python3

and output to /tmp by default to prevent accidental use of old hwdef.h
in the build
This commit is contained in:
Andrew Tridgell 2018-02-05 05:22:31 +11:00
parent e002fbdb8d
commit bc49c0d2c5
1 changed files with 2 additions and 2 deletions

View File

@ -660,7 +660,7 @@ def write_GPIO_config(f):
# and write #defines for use by config code # and write #defines for use by config code
f.write('}\n\n') f.write('}\n\n')
f.write('// full pin define list\n') f.write('// full pin define list\n')
for l in bylabel: for l in sorted(bylabel.keys()):
p = bylabel[l] p = bylabel[l]
label = p.label label = p.label
label = label.replace('-', '_') label = label.replace('-', '_')
@ -886,7 +886,7 @@ process_file(args.hwdef)
outdir = args.outdir outdir = args.outdir
if outdir is None: if outdir is None:
outdir = '.' outdir = '/tmp'
if not "MCU" in config: if not "MCU" in config:
error("Missing MCU type in config") error("Missing MCU type in config")