archive and fix hid-flasher

This commit is contained in:
Philippe Teuwen 2019-04-26 00:04:32 +02:00
commit 7d6f971db4
14 changed files with 7 additions and 10 deletions

View file

@ -3,26 +3,23 @@
# at your option, any later version. See the LICENSE.txt file for the text of # at your option, any later version. See the LICENSE.txt file for the text of
# the license. # the license.
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
include ../../common/Makefile.common
CC=gcc CC=gcc
CXX=g++ CXX=g++
#COMMON_FLAGS = -m32 #COMMON_FLAGS = -m32
VPATH = ../../common
OBJDIR = obj OBJDIR = obj
LDLIBS = -lreadline -lpthread
CFLAGS = -std=gnu99 -Wall -Wno-unused-function $(COMMON_FLAGS) -g -O3
ifeq ($(platform),Darwin) ifeq ($(platform),Darwin)
LDLIBS = -L/opt/local/lib -L/usr/local/lib -lusb-1.0 -lreadline -lpthread LDLIBS += -lusb-1.0
CFLAGS = -std=gnu99 -I. -I../include -I../common -I/usr/local/include -I/opt/local/include -Wall -Wno-unused-function $(COMMON_FLAGS) -g -O3
else else
LDLIBS = -L/opt/local/lib -L/usr/local/lib -lusb -lreadline -lpthread LDLIBS += -lusb
CFLAGS = -std=gnu99 -I. -I../include -I../common -I/opt/local/include -Wall -Wno-unused-function $(COMMON_FLAGS) -g -O3
endif endif
LDFLAGS = $(COMMON_FLAGS) LDFLAGS = $(COMMON_FLAGS)
CXXFLAGS = CXXFLAGS =
QTLDLIBS =
RM = rm -f RM = rm -f
BINS = flasher BINS = flasher

View file

@ -11,11 +11,11 @@
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
#include <stdlib.h> #include <stdlib.h>
#include "util_posix.h"
#include "proxusb.h" #include "proxusb.h"
#include "flash.h" #include "flash.h"
#include "elf.h" #include "elf.h"
#include "proxendian.h" #include "proxendian.h"
#include "sleep.h"
#define FLASH_START 0x100000 #define FLASH_START 0x100000
#define FLASH_SIZE (256*1024) #define FLASH_SIZE (256*1024)

View file

@ -9,9 +9,9 @@
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include "util_posix.h"
#include "proxusb.h" #include "proxusb.h"
#include "flash.h" #include "flash.h"
#include "sleep.h"
static void usage(char *argv0) { static void usage(char *argv0) {
fprintf(stderr, "Usage: %s [-b] image.elf [image.elf...]\n\n", argv0); fprintf(stderr, "Usage: %s [-b] image.elf [image.elf...]\n\n", argv0);

View file

@ -9,6 +9,7 @@
// USB utilities // USB utilities
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
#include "proxusb.h" #include "proxusb.h"
#include "sleep.h"
// It seems to be missing for mingw // It seems to be missing for mingw
#ifndef ETIMEDOUT #ifndef ETIMEDOUT

View file

@ -22,7 +22,6 @@
#include <errno.h> #include <errno.h>
#include "proxmark3.h" #include "proxmark3.h"
#include "usb_cmd.h" #include "usb_cmd.h"
#include "util_posix.h"
extern unsigned char return_on_error; extern unsigned char return_on_error;
extern unsigned char error_occured; extern unsigned char error_occured;