32 lines
634 B
Makefile
32 lines
634 B
Makefile
|
|
ARMGNU ?= arm-none-eabi
|
|
|
|
COPS = -Wall -O2 -nostdlib -nostartfiles -ffreestanding
|
|
|
|
all : uart02.hex uart02.bin
|
|
|
|
clean :
|
|
rm -f *.o
|
|
rm -f *.bin
|
|
rm -f *.hex
|
|
rm -f *.elf
|
|
rm -f *.list
|
|
rm -f *.img
|
|
|
|
novectors.o : novectors.s
|
|
$(ARMGNU)-as novectors.s -o novectors.o
|
|
|
|
uart02.o : uart02.c
|
|
$(ARMGNU)-gcc $(COPS) -c uart02.c -o uart02.o
|
|
|
|
uart02.elf : memmap novectors.o uart02.o
|
|
$(ARMGNU)-ld novectors.o uart02.o -T memmap -o uart02.elf
|
|
$(ARMGNU)-objdump -D uart02.elf > uart02.list
|
|
|
|
uart02.bin : uart02.elf
|
|
$(ARMGNU)-objcopy uart02.elf -O binary uart02.bin
|
|
|
|
uart02.hex : uart02.elf
|
|
$(ARMGNU)-objcopy uart02.elf -O ihex uart02.hex
|
|
|