2016-04-17 12:26:30 -05:00
|
|
|
BIN2C = ../../../../src/helper/bin2char.sh
|
|
|
|
|
|
|
|
CROSS_COMPILE ?= arm-none-eabi-
|
|
|
|
|
|
|
|
CC=$(CROSS_COMPILE)gcc
|
|
|
|
OBJCOPY=$(CROSS_COMPILE)objcopy
|
|
|
|
OBJDUMP=$(CROSS_COMPILE)objdump
|
|
|
|
|
2016-05-21 17:41:15 -05:00
|
|
|
CFLAGS = -static -nostartfiles -mlittle-endian -Wa,-EL
|
|
|
|
|
2016-04-17 12:26:30 -05:00
|
|
|
all: erase.inc erase_check.inc write.inc
|
|
|
|
|
|
|
|
.PHONY: clean
|
|
|
|
|
|
|
|
.INTERMEDIATE: erase.elf erase_check.elf write.elf
|
|
|
|
|
|
|
|
erase.elf erase_check.elf write.elf: xmc1xxx.S
|
|
|
|
|
|
|
|
%.elf: %.S
|
2016-05-21 17:41:15 -05:00
|
|
|
$(CC) $(CFLAGS) $< -o $@
|
2016-04-17 12:26:30 -05:00
|
|
|
|
|
|
|
%.lst: %.elf
|
|
|
|
$(OBJDUMP) -S $< > $@
|
|
|
|
|
|
|
|
%.bin: %.elf
|
|
|
|
$(OBJCOPY) -Obinary $< $@
|
|
|
|
|
|
|
|
%.inc: %.bin
|
|
|
|
$(BIN2C) < $< > $@
|
|
|
|
|
|
|
|
clean:
|
|
|
|
-rm -f *.elf *.lst *.bin *.inc
|