ports: Standardise arguments and output for make-pins.py script.
All ports now use `--board-csv`, `--prefix`, `--output-souce`, `--output-header` and no longer write to stdout. This matches the esp32 implementation. Ports that have an AF input use `--af-csv` (to match `--board-csv`). Any additional output files are now prefixed with `output-` (e.g. `--output-af-const`). Default arguments are removed (all makefiles should always specify all arguments, using default values is likely an error). Replaced the `af-defs-cmp-strings` and `hdr-obj-decls` args for stm32 with just `mboot-mode`. Previously they were set on the regular build, now the logic is reversed so mboot sets it. This work was funded through GitHub Sponsors. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
This commit is contained in:
committed by
Damien George
parent
1ee5731122
commit
9cabee8252
@@ -154,20 +154,18 @@ def main():
|
||||
parser.add_argument("--prefix")
|
||||
parser.add_argument("--output-source")
|
||||
parser.add_argument("--output-header")
|
||||
args = parser.parse_args(sys.argv[1:])
|
||||
args = parser.parse_args()
|
||||
|
||||
pins = Pins()
|
||||
pins.create_pins()
|
||||
|
||||
if args.board_csv:
|
||||
pins.parse_board_file(args.board_csv)
|
||||
|
||||
with open(args.output_source, "w") as out_source:
|
||||
print("// This file was automatically generated by make-pins.py", file=out_source)
|
||||
print("//", file=out_source)
|
||||
|
||||
if args.board_csv:
|
||||
print("// --board-csv {:s}".format(args.board_csv), file=out_source)
|
||||
pins.parse_board_file(args.board_csv)
|
||||
|
||||
if args.prefix:
|
||||
print("// --prefix {:s}".format(args.prefix), file=out_source)
|
||||
|
||||
Reference in New Issue
Block a user