From 1e8392730d13834b50d465c87cefc0be71842cff Mon Sep 17 00:00:00 2001 From: Larry Snizek Date: Thu, 1 Mar 2018 09:53:16 +0000 Subject: [PATCH 1/2] Handle libusb_control_transfer errors from dfu_upload --- host/xmosdfu/xmosdfu.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/host/xmosdfu/xmosdfu.cpp b/host/xmosdfu/xmosdfu.cpp index a0aca676..52199198 100644 --- a/host/xmosdfu/xmosdfu.cpp +++ b/host/xmosdfu/xmosdfu.cpp @@ -311,6 +311,11 @@ int read_dfu_image(char *file) { break; } + else if (numBytes < 0) + { + fprintf(stderr,"dfu_upload error (%d)\n", numBytes); + break; + } fwrite(block_data, 1, block_size, outFile); block_count++; } From da969fa610411756f0c8ba5db452dedadf29fed3 Mon Sep 17 00:00:00 2001 From: Larry Snizek Date: Fri, 2 Mar 2018 13:03:42 +0000 Subject: [PATCH 2/2] Git ignore files --- .gitignore | 2 ++ tests/.gitignore | 1 + 2 files changed, 3 insertions(+) create mode 100644 tests/.gitignore diff --git a/.gitignore b/.gitignore index ff869912..1783b37b 100644 --- a/.gitignore +++ b/.gitignore @@ -22,3 +22,5 @@ module_dfu/host/xmosdfu/xmosdfu .waf-*/ build/ host/xmosdfu/xmosdfu +.build* +*.pyc diff --git a/tests/.gitignore b/tests/.gitignore new file mode 100644 index 00000000..f0bcfb69 --- /dev/null +++ b/tests/.gitignore @@ -0,0 +1 @@ +test_results.csv