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
472 B

  1. BIN2C = ../../../../src/helper/bin2char.sh
  2. CROSS_COMPILE ?= riscv64-unknown-elf-
  3. CC=$(CROSS_COMPILE)gcc
  4. OBJCOPY=$(CROSS_COMPILE)objcopy
  5. OBJDUMP=$(CROSS_COMPILE)objdump
  6. CFLAGS = -march=rv32i -mabi=ilp32 -x assembler-with-cpp -nostdlib -nostartfiles
  7. all: fespi.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