diff options
author | Fredrik Thulin <fredrik@thulin.net> | 2016-05-24 17:14:28 +0200 |
---|---|---|
committer | Fredrik Thulin <fredrik@thulin.net> | 2016-05-24 17:14:28 +0200 |
commit | be280fa4a8c851d774cf4581972bc99329c43e6b (patch) | |
tree | ea7786cea0b4125e469c9d25b8ce66965ae68620 /projects/cli-test/filetransfer | |
parent | 640163be7e90aef968376cb5cdf6ab0b64ff52ef (diff) |
non-working code to upload an application and jump to it
Committing my work in progress in case someone else wants to help.
Diffstat (limited to 'projects/cli-test/filetransfer')
-rwxr-xr-x | projects/cli-test/filetransfer | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/projects/cli-test/filetransfer b/projects/cli-test/filetransfer index 2b74570..025a6ac 100755 --- a/projects/cli-test/filetransfer +++ b/projects/cli-test/filetransfer @@ -40,6 +40,7 @@ import argparse from binascii import crc32 CHUNK_SIZE = 256 +DFU_CHUNK_SIZE = 256 FPGA_CHUNK_SIZE = 4096 @@ -57,6 +58,11 @@ def parse_args(): action='store_true', default=False, help='Perform FPGA bitstream upload', ) + parser.add_argument('--dfu', + dest='dfu', + action='store_true', default=False, + help='Perform DFU application upload', + ) parser.add_argument('--device', dest='device', @@ -117,6 +123,9 @@ def send_file(filename, args, dst): src.read(0x64) chunk_size = FPGA_CHUNK_SIZE response = _execute(dst, 'fpga bitstream upload') + elif args.dfu: + chunk_size = DFU_CHUNK_SIZE + response = _execute(dst, 'dfu upload') else: chunk_size = CHUNK_SIZE response = _execute(dst, 'filetransfer') |