You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

33 lines
515 B

  1. BIN2C = ../../../../src/helper/bin2char.sh
  2. CROSS_COMPILE ?= arm-none-eabi-
  3. CC=$(CROSS_COMPILE)gcc
  4. OBJCOPY=$(CROSS_COMPILE)objcopy
  5. OBJDUMP=$(CROSS_COMPILE)objdump
  6. CFLAGS = -static -nostartfiles -mlittle-endian -Wa,-EL
  7. all: erase.inc write.inc
  8. .PHONY: clean
  9. .INTERMEDIATE: erase.elf write.elf
  10. erase.elf write.elf: fm4.h
  11. %.elf: %.S
  12. $(CC) $(CFLAGS) $< -o $@
  13. %.lst: %.elf
  14. $(OBJDUMP) -S $< > $@
  15. %.bin: %.elf
  16. $(OBJCOPY) -Obinary $< $@
  17. %.inc: %.bin
  18. $(BIN2C) < $< > $@
  19. clean:
  20. -rm -f *.elf *.lst *.bin *.inc