From be280fa4a8c851d774cf4581972bc99329c43e6b Mon Sep 17 00:00:00 2001 From: Fredrik Thulin Date: Tue, 24 May 2016 17:14:28 +0200 Subject: non-working code to upload an application and jump to it Committing my work in progress in case someone else wants to help. --- projects/cli-test/filetransfer | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'projects/cli-test/filetransfer') 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') -- cgit v1.2.3