diff options
author | Fredrik Thulin <fredrik@thulin.net> | 2016-05-27 21:58:55 +0200 |
---|---|---|
committer | Fredrik Thulin <fredrik@thulin.net> | 2016-05-27 21:58:55 +0200 |
commit | 13d9bfb4bf1cfbb3d723c919763bc460c193ed3b (patch) | |
tree | 2454a8313689ce2ed92644bc4a449b7fa039f997 /projects/cli-test/filetransfer | |
parent | 0009ba29bbb3d7ff911b343bafb9a005114ea2d8 (diff) | |
parent | 854a8ba169d64a16f5466c0cac9e1aeeff50659d (diff) |
Merge branch 'ft-dfu-code-loading'
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') |