From 4a7203d9699cded53c99519b58a041eedd2056a7 Mon Sep 17 00:00:00 2001 From: "Brian S. Stephan" Date: Fri, 12 Apr 2024 16:27:06 -0500 Subject: [PATCH] dump the board config via --board-config Signed-off-by: Brian S. Stephan --- gp2040ce_bintools/storage.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/gp2040ce_bintools/storage.py b/gp2040ce_bintools/storage.py index 13ee947..9fea627 100644 --- a/gp2040ce_bintools/storage.py +++ b/gp2040ce_bintools/storage.py @@ -361,10 +361,15 @@ def dump_config(): description="Read the configuration section from a USB device and save it to a binary file.", parents=[core_parser], ) + parser.add_argument('--board-config', action='store_true', default=False, + help="dump the board config rather than the user config") parser.add_argument('filename', help="file to save the GP2040-CE board's config section to --- if the " "suffix is .uf2, it is saved in UF2 format, else it is a raw binary") args, _ = parser.parse_known_args() - config, _, _ = get_user_config_from_usb() + if args.board_config: + config, _, _ = get_board_config_from_usb() + else: + config, _, _ = get_user_config_from_usb() binary_config = serialize_config_with_footer(config) with open(args.filename, 'wb') as out_file: if args.filename[-4:] == '.uf2':