mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-01-23 16:38:04 +08:00
0e25ae1102
and LED A, B and C respectively show: - Receiving from reader - Transmitting to tag/reader - Receiving from tag Also, updated the snoop function to make full use of the DMA buffer, which removes (in my case) all the 'blew DMA buffer' issues. Last, moved the compilation of iso1443.c to ARM mode (not thumb) to make it faster on my Linux gcc 4.3 version, otherwise the 'blew DMA buffer' issue was systematic. Also: restored the "indalademod" command which had mysteriously disappeared from the prox.exe (proxmark3) client!
94 lines
2.7 KiB
Text
94 lines
2.7 KiB
Text
# This makefile needs to be edited to reflect the location
|
|
# of your own arm-elf-gcc toolchain (LIB variable)
|
|
|
|
CC = arm-elf-gcc
|
|
AS = arm-elf-as
|
|
LD = arm-elf-ld
|
|
OBJCOPY = arm-elf-objcopy
|
|
|
|
# Indicate where your gnuarm toolchain libgcc.a library is located:
|
|
LIB = /usr/local/new/gnuarm-4.3.0/lib/gcc/arm-elf/4.3.0/interwork
|
|
|
|
# Add -DWITH_LCD to EXTRA_CFLAGS if you want support for LCD
|
|
# in your firmware (add OBJLCD to OBJ too!)
|
|
#EXTRA_CFLAGS = -DWITH_LCD
|
|
EXTRA_CFLAGS =
|
|
|
|
### You should not need to edit below this line
|
|
|
|
INCLUDE = -I../include
|
|
INCLUDES = ../include/proxmark3.h ../include/at91sam7s128.h ../include/config_gpio.h ../include/usb_cmd.h apps.h
|
|
CFLAGS_COMMON = -O6 -c $(INCLUDE) -Wall -mthumb-interwork
|
|
CFLAGS = $(CFLAGS_COMMON) $(EXTRA_CFLAGS) -mthumb
|
|
|
|
|
|
OBJDIR = obj
|
|
|
|
OBJLCD = $(OBJDIR)/LCD.o\
|
|
$(OBJDIR)/fonts.o
|
|
|
|
OBJ = $(OBJDIR)/start.o \
|
|
$(OBJDIR)/appmain.o \
|
|
$(OBJDIR)/fpga.o \
|
|
$(OBJDIR)/iso15693.o \
|
|
$(OBJDIR)/util.o
|
|
|
|
# To be compiled in ARM mode, not thumb mode: larger but faster
|
|
# Alleviates the 'blew circular buffer' issues somehow...
|
|
OBJFAST = $(OBJDIR)/iso14443.o \
|
|
$(OBJDIR)/iso14443a.o
|
|
|
|
OBJFPGA = $(OBJDIR)/fpgaimg.o
|
|
|
|
OBJCOMMON = $(OBJDIR)/usb.o
|
|
|
|
all: osimage.s19 fpgaimage.s19 fullimage.s19
|
|
|
|
fpgaimage.s19: $(OBJFPGA)
|
|
@echo fpgaimage.s19
|
|
$(LD) -g -Tldscript-fpga -o $(OBJDIR)/fpgaimage.elf $^
|
|
$(OBJCOPY) -Osrec --srec-forceS3 $(OBJDIR)/fpgaimage.elf fpgaimage.s19
|
|
|
|
osimage.s19: $(OBJ) $(OBJFAST) $(OBJCOMMON)
|
|
@echo osimage.s19
|
|
$(LD) -g -Tldscript -o $(OBJDIR)/osimage.elf $^ $(LIB)/libgcc.a
|
|
$(OBJCOPY) -Osrec --srec-forceS3 $(OBJDIR)/osimage.elf osimage.s19
|
|
|
|
fullimage.s19: $(OBJ) $(OBJFAST) $(OBJCOMMON) $(OBJFAST) $(OBJFPGA)
|
|
@echo fullimage.s19
|
|
$(LD) -g -Tldscript-full -o $(OBJDIR)/fullimage.elf $^ $(LIB)/libgcc.a
|
|
$(OBJCOPY) -Osrec --srec-forceS3 $(OBJDIR)/fullimage.elf fullimage.s19
|
|
|
|
# Directives to put the *.o in the OBJDIR directory:
|
|
$(OBJ): $(OBJDIR)/%.o : %.c
|
|
$(CC) $(CFLAGS) $< -o $@
|
|
|
|
$(OBJFPGA): $(OBJDIR)/%.o : %.c
|
|
$(CC) $(CFLAGS) $< -o $@
|
|
|
|
$(OBJFAST): $(OBJDIR)/%.o : %.c
|
|
$(CC) $(CFLAGS_COMMON) $< -o $@
|
|
|
|
$(OBJCOMMON): $(OBJDIR)/%.o : ../common/%.c
|
|
$(CC) $(CFLAGS) $< -o $@
|
|
|
|
# Those do not work on the current firmware !
|
|
flash-fpga: fpgaimage.s19
|
|
../linux/flasher fpga fpgaimage.s19
|
|
|
|
flash: osimage.s19
|
|
../linux/flasher os osimage.s19
|
|
|
|
jtag-flash-full: fullimage.s19
|
|
../../OpenOCD/openocd -c "halt; flash write_image fullimage.s19 0x00100000; halt; reset; resume; poll; exit"
|
|
|
|
jtag-flash-fpga: fpgaimage.s19
|
|
../../OpenOCD/openocd -c "halt; flash write_image fpgaimage.s19 0x00100000; halt; reset; resume; poll; exit"
|
|
|
|
jtag-flash: osimage.s19
|
|
../../OpenOCD/openocd -c "halt; flash write_image osimage.s19 0x00100000; halt; reset; resume; poll; exit"
|
|
|
|
clean:
|
|
rm -f $(OBJDIR)/*.o $(OBJDIR)/*.elf *.s19
|
|
|
|
.PHONY: all clean
|