From fce43bcd98ee419720795f4c384f58e65896e0c8 Mon Sep 17 00:00:00 2001 From: Gareth McMullin Date: Mon, 19 Aug 2013 12:26:05 +1200 Subject: Fixed upgrade tool to build against current libusb-win32. --- upgrade/bindata.S | 2 +- upgrade/dfu.c | 6 +++++- upgrade/main.c | 6 +++++- upgrade/stm32mem.c | 3 ++- upgrade/stm32mem.h | 6 +++++- 5 files changed, 18 insertions(+), 5 deletions(-) diff --git a/upgrade/bindata.S b/upgrade/bindata.S index 1d94da5..585a670 100644 --- a/upgrade/bindata.S +++ b/upgrade/bindata.S @@ -24,5 +24,5 @@ _bindata: .incbin "../src/blackmagic.bin" _bindatalen: - .word . - _bindata + .long (. - _bindata) diff --git a/upgrade/dfu.c b/upgrade/dfu.c index 2ab16ed..598780a 100644 --- a/upgrade/dfu.c +++ b/upgrade/dfu.c @@ -18,7 +18,11 @@ * along with this program. If not, see . */ -#include +#ifdef WIN32 +# include +#else +# include +#endif #include "dfu.h" diff --git a/upgrade/main.c b/upgrade/main.c index dd92a2e..f029545 100644 --- a/upgrade/main.c +++ b/upgrade/main.c @@ -18,8 +18,12 @@ * along with this program. If not, see . */ #include -#include #include +#ifdef WIN32 +# include +#else +# include +#endif #include diff --git a/upgrade/stm32mem.c b/upgrade/stm32mem.c index 4731edc..53bbb5b 100644 --- a/upgrade/stm32mem.c +++ b/upgrade/stm32mem.c @@ -17,13 +17,14 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#include #include #ifdef WIN32 # include +# include #else # include +# include #endif #include "dfu.h" diff --git a/upgrade/stm32mem.h b/upgrade/stm32mem.h index 34cdfb1..fd99c65 100644 --- a/upgrade/stm32mem.h +++ b/upgrade/stm32mem.h @@ -20,7 +20,11 @@ #ifndef __STM32MEM_H #define __STM32MEM_H -#include +#ifdef WIN32 +# include +#else +# include +#endif int stm32_mem_erase(usb_dev_handle *dev, uint16_t iface, uint32_t addr); int stm32_mem_write(usb_dev_handle *dev, uint16_t iface, void *data, int size); -- cgit v1.2.3