mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-16 08:38:26 +00:00
add arg to specify file (optionally) in backup
This commit is contained in:
parent
46c53d9612
commit
3a5e385b9a
1 changed files with 4 additions and 1 deletions
|
|
@ -428,6 +428,9 @@ def main():
|
|||
parser.add_argument(
|
||||
"--peek", required=False, help="Inspect an address", type=auto_int, metavar=('ADDR')
|
||||
)
|
||||
parser.add_argument(
|
||||
"--output", help="Output file name", type=str, default="backup.pddb"
|
||||
)
|
||||
args = parser.parse_args()
|
||||
|
||||
dev = usb.core.find(idProduct=0x5bf0, idVendor=0x1209)
|
||||
|
|
@ -493,7 +496,7 @@ def main():
|
|||
if args.peek:
|
||||
pc_usb.peek(args.peek + flash_region, display=True)
|
||||
else:
|
||||
with open("backup.pddb", "wb") as file:
|
||||
with open(args.output, "wb") as file:
|
||||
start_addr = locs['LOC_PDDB'][0] - 0x1000
|
||||
total_length = locs['LOC_WF200'][0] - locs['LOC_PDDB'][0] + 0x1000
|
||||
progress = ProgressBar(min_value=0, max_value=total_length, prefix='Backing up ').start()
|
||||
|
|
|
|||
Loading…
Reference in a new issue