]> git.zerfleddert.de Git - proxmark3-svn/blame_incremental - armsrc/Makefile.linux
- Added new Makefile.linux in bootrom directory
[proxmark3-svn] / armsrc / Makefile.linux
... / ...
CommitLineData
1# This makefile needs to be edited to reflect the location
2# of your own arm-elf-gcc toolchain (LIB variable)
3
4CC = arm-elf-gcc
5AS = arm-elf-as
6LD = arm-elf-ld
7OBJCOPY = arm-elf-objcopy
8
9# Indicate where your gnuarm toolchain libgcc.a library is located:
10LIB = /usr/local/new/gnuarm-4.3.0/lib/gcc/arm-elf/4.3.0/interwork
11
12# Add -DWITH_LCD to EXTRA_CFLAGS if you want support for LCD
13# in your firmware (add OBJLCD to OBJ too!)
14#EXTRA_CFLAGS = -DWITH_LCD
15EXTRA_CFLAGS =
16
17### You should not need to edit below this line
18
19INCLUDE = -I../include
20INCLUDES = ../include/proxmark3.h ../include/at91sam7s128.h ../include/config_gpio.h ../include/usb_cmd.h apps.h
21CFLAGS_COMMON = -O6 -c $(INCLUDE) -Wall -mthumb-interwork
22CFLAGS = $(CFLAGS_COMMON) $(EXTRA_CFLAGS) -mthumb
23
24
25OBJDIR = obj
26
27OBJLCD = $(OBJDIR)/LCD.o\
28 $(OBJDIR)/fonts.o
29
30OBJ = $(OBJDIR)/start.o \
31 $(OBJDIR)/appmain.o \
32 $(OBJDIR)/fpga.o \
33 $(OBJDIR)/iso15693.o \
34 $(OBJDIR)/iso14443.o \
35 $(OBJDIR)/util.o
36
37
38OBJFAST = $(OBJDIR)/iso14443a.o
39
40OBJFPGA = $(OBJDIR)/fpgaimg.o
41
42OBJCOMMON = $(OBJDIR)/usb.o
43
44all: osimage.s19 fpgaimage.s19 fullimage.s19
45
46fpgaimage.s19: $(OBJFPGA)
47 @echo fpgaimage.s19
48 $(LD) -g -Tldscript-fpga -o $(OBJDIR)/fpgaimage.elf $^
49 $(OBJCOPY) -Osrec --srec-forceS3 $(OBJDIR)/fpgaimage.elf fpgaimage.s19
50
51osimage.s19: $(OBJ) $(OBJFAST) $(OBJCOMMON)
52 @echo osimage.s19
53 $(LD) -g -Tldscript -o $(OBJDIR)/osimage.elf $^ $(LIB)/libgcc.a
54 $(OBJCOPY) -Osrec --srec-forceS3 $(OBJDIR)/osimage.elf osimage.s19
55
56fullimage.s19: $(OBJ) $(OBJFAST) $(OBJCOMMON) $(OBJFAST) $(OBJFPGA)
57 @echo fullimage.s19
58 $(LD) -g -Tldscript-full -o $(OBJDIR)/fullimage.elf $^ $(LIB)/libgcc.a
59 $(OBJCOPY) -Osrec --srec-forceS3 $(OBJDIR)/fullimage.elf fullimage.s19
60
61# Directives to put the *.o in the OBJDIR directory:
62$(OBJ): $(OBJDIR)/%.o : %.c
63 $(CC) $(CFLAGS) $< -o $@
64
65$(OBJFPGA): $(OBJDIR)/%.o : %.c
66 $(CC) $(CFLAGS) $< -o $@
67
68$(OBJFAST): $(OBJDIR)/%.o : %.c
69 $(CC) $(CFLAGS_COMMON) $< -o $@
70
71$(OBJCOMMON): $(OBJDIR)/%.o : ../common/%.c
72 $(CC) $(CFLAGS) $< -o $@
73
74# Those do not work on the current firmware !
75flash-fpga: fpgaimage.s19
76 ../linux/flasher fpga fpgaimage.s19
77
78flash: osimage.s19
79 ../linux/flasher os osimage.s19
80
81jtag-flash-full: fullimage.s19
82 ../../OpenOCD/openocd -c "halt; flash write_image fullimage.s19 0x00100000; halt; reset; resume; poll; exit"
83
84jtag-flash-fpga: fpgaimage.s19
85 ../../OpenOCD/openocd -c "halt; flash write_image fpgaimage.s19 0x00100000; halt; reset; resume; poll; exit"
86
87jtag-flash: osimage.s19
88 ../../OpenOCD/openocd -c "halt; flash write_image osimage.s19 0x00100000; halt; reset; resume; poll; exit"
89
90clean:
91 rm -f $(OBJDIR)/*.o $(OBJDIR)/*.elf *.s19
92
93.PHONY: all clean
Impressum, Datenschutz