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