From 113e87f73cd11bbad568e8cc39e5bb7d8de0ab5c Mon Sep 17 00:00:00 2001 From: dewagter Date: Sat, 9 May 2015 16:35:18 +0200 Subject: [PATCH] blackmagic firmware update: show error on zero file length that can happen in wget when the file does not exist anymore and update the path the the latest firmware --- sw/ext/blackmagic/Makefile | 2 +- sw/ext/blackmagic/stm32_mem.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/sw/ext/blackmagic/Makefile b/sw/ext/blackmagic/Makefile index ba15bd3b15..f886c40a48 100644 --- a/sw/ext/blackmagic/Makefile +++ b/sw/ext/blackmagic/Makefile @@ -1,6 +1,6 @@ # Hey Emacs, this is a -*- makefile -*- -BLACKSPHERE = http://blacksphere.co.nz/builds +BLACKSPHERE = http://blacksphere.co.nz/builds/archive/2014 BLACKMAGIC = blackmagic-20141017.bin Q=@ diff --git a/sw/ext/blackmagic/stm32_mem.py b/sw/ext/blackmagic/stm32_mem.py index 9bf20d9c99..11c9e2f6c0 100755 --- a/sw/ext/blackmagic/stm32_mem.py +++ b/sw/ext/blackmagic/stm32_mem.py @@ -93,6 +93,8 @@ if __name__ == "__main__": dfudev.make_idle() bin = open(argv[1], "rb").read() + if len(bin) == 0: + print ("ERROR: File length is zero! (Try downloading again)\r") addr = 0x8002000 while bin: