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.
 
 
 
 
 
 

36 lines
714 B

  1. BIN2C = ../../../../src/helper/bin2char.sh
  2. CROSS_COMPILE ?= arm-none-eabi-
  3. GCC = $(CROSS_COMPILE)gcc
  4. OBJCOPY = $(CROSS_COMPILE)objcopy
  5. FLAGS = -mthumb -Os -ffunction-sections -fdata-sections -g -gdwarf-3
  6. FLAGS += -gstrict-dwarf -Wall -fno-strict-aliasing --asm
  7. CFLAGS = -c -I. -mcpu=cortex-m3
  8. OBJS := flashloader.o main.o startup.o flash.o
  9. all: cc2538_algo.inc
  10. %.o: %.c
  11. $(GCC) $(FLAGS) $(CFLAGS) -o $@ $<
  12. %.o: %.s
  13. $(GCC) $(FLAGS) $(CFLAGS) -o $@ $<
  14. cc2538_algo.out: $(OBJS)
  15. $(GCC) $(FLAGS) -o $@ $^ -Wl,-T"cc2538.lds"
  16. %.bin: %.out
  17. $(OBJCOPY) -Obinary $< $@
  18. %.inc: %.bin
  19. $(BIN2C) < $< > $@ || (rm -f $@ ; false)
  20. clean:
  21. rm -f *.inc *.bin *.out *.map *.o *.d
  22. .PRECIOUS: %.bin
  23. .PHONY: all clean