allow for saving the board dump in .uf2 format
Signed-off-by: Brian S. Stephan <bss@incorporeal.org>
This commit is contained in:
parent
dace99b9e0
commit
733b49676c
@ -338,7 +338,11 @@ def dump_gp2040ce():
|
|||||||
args, _ = parser.parse_known_args()
|
args, _ = parser.parse_known_args()
|
||||||
content, _, _ = get_gp2040ce_from_usb()
|
content, _, _ = get_gp2040ce_from_usb()
|
||||||
with open(args.binary_filename, 'wb') as out_file:
|
with open(args.binary_filename, 'wb') as out_file:
|
||||||
out_file.write(content)
|
if args.binary_filename[-4:] == '.uf2':
|
||||||
|
# we must pad to storage start in order for the UF2 write addresses to make sense
|
||||||
|
out_file.write(storage.convert_binary_to_uf2([(0, content)]))
|
||||||
|
else:
|
||||||
|
out_file.write(content)
|
||||||
|
|
||||||
|
|
||||||
def summarize_gp2040ce():
|
def summarize_gp2040ce():
|
||||||
|
Loading…
x
Reference in New Issue
Block a user