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.
 
 
 
 
 
 

29 lines
495 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: stm32f1x.inc stm32f2x.inc stm32h7x.inc stm32l4x.inc stm32lx.inc
  8. .PHONY: clean
  9. %.elf: %.S
  10. $(CC) $(CFLAGS) $< -o $@
  11. %.lst: %.elf
  12. $(OBJDUMP) -S $< > $@
  13. %.bin: %.elf
  14. $(OBJCOPY) -Obinary $< $@
  15. %.inc: %.bin
  16. $(BIN2C) < $< > $@
  17. clean:
  18. -rm -f *.elf *.lst *.bin *.inc