Root/lpc111x-isp/test/Makefile

1PREFIX = arm-linux-gnueabi-
2
3CC = $(PREFIX)gcc
4OBJCOPY = $(PREFIX)objcopy
5OBJDUMP = $(PREFIX)objdump
6
7CFLAGS = -Wall -mcpu=cortex-m0 -march=armv6-m -mthumb \
8     -nostdlib
9LDFLAGS = -Tlpc1112fxx2xx.lds
10
11OBJS = test.o
12
13.PHONY: dump clean
14
15test.bin: test.elf
16        $(OBJCOPY) -j .text -j .data -O binary $< $@ || \
17            { rm -f $@; exit 1; }
18
19test.elf: $(OBJS)
20        $(CC) $(CFLAGS) -o $@ $(OBJS) $(LDFLAGS)
21
22dump: test.elf
23        $(OBJDUMP) -d test.elf
24
25clean:
26        rm -f $(OBJS) test.elf test.bin
27

Archive Download this file

Branches:
master



interactive