
ARMGNU?=arm-none-eabi

COPS = -Wall  -Os -nostdlib -nostartfiles -ffreestanding -save-temps
AOPS = --warn --fatal-warnings

all : myfirst.bin

myfirst.o : myfirst.s
	$(ARMGNU)-as -g -al myfirst.s -o myfirst.o >myfirst.lst

myfirst.bin : memmap myfirst.o
	$(ARMGNU)-ld  -g -e Reset -o myfirst.elf -T memmap myfirst.o
	$(ARMGNU)-objdump -D myfirst.elf > myfirst.list
	$(ARMGNU)-objcopy myfirst.elf myfirst.bin -O binary
	cp myfirst.elf firmware.elf

clean:
	rm -f *.bin
	rm -f *.o
	rm -f *.list
	rm -f *.elf
