aboutsummaryrefslogtreecommitdiff
path: root/projects/cli-test/filetransfer
diff options
context:
space:
mode:
Diffstat (limited to 'projects/cli-test/filetransfer')
-rwxr-xr-xprojects/cli-test/filetransfer9
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')