Keyboard firmwares for Atmel AVR and Cortex-M
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.

codesourcery_ublox_c027.tmpl 1.7KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. # This file was automagically generated by mbed.org. For more information,
  2. # see http://mbed.org/handbook/Exporting-to-CodeSourcery
  3. GCC_BIN =
  4. PROJECT = {{name}}
  5. OBJECTS = {% for f in to_be_compiled %}{{f}} {% endfor %}
  6. SYS_OBJECTS = {% for f in object_files %}{{f}} {% endfor %}
  7. INCLUDE_PATHS = {% for p in include_paths %}-I{{p}} {% endfor %}
  8. LIBRARY_PATHS = {% for p in library_paths %}-L{{p}} {% endfor %}
  9. LIBRARIES = {% for lib in libraries %}-l{{lib}} {% endfor %}
  10. LINKER_SCRIPT = {{linker_script}}
  11. ###############################################################################
  12. CC = $(GCC_BIN)arm-none-eabi-gcc
  13. CPP = $(GCC_BIN)arm-none-eabi-g++
  14. CC_FLAGS = -c -g -fno-common -fmessage-length=0 -Wall -fno-exceptions -fno-rtti -mcpu=cortex-m3 -mthumb -ffunction-sections -fdata-sections -fomit-frame-pointer
  15. ONLY_C_FLAGS = -std=gnu99
  16. ONLY_CPP_FLAGS = -std=gnu++98
  17. CC_SYMBOLS = {% for s in symbols %}-D{{s}} {% endfor %}
  18. AS = $(GCC_BIN)arm-none-eabi-as
  19. LD = $(GCC_BIN)arm-none-eabi-gcc
  20. LD_FLAGS = -mcpu=cortex-m3 -mthumb -Wl,--gc-sections
  21. LD_SYS_LIBS = -lstdc++ -lsupc++ -lm -lc -lgcc
  22. OBJCOPY = $(GCC_BIN)arm-none-eabi-objcopy
  23. ifeq ($(DEBUG), 1)
  24. CC_FLAGS += -DDEBUG -O0
  25. else
  26. CC_FLAGS += -DNDEBUG -Os
  27. endif
  28. all: $(PROJECT).bin
  29. clean:
  30. rm -f $(PROJECT).bin $(PROJECT).elf $(OBJECTS)
  31. .s.o:
  32. $(AS) $(CC_FLAGS) $(CC_SYMBOLS) -o $@ $<
  33. .c.o:
  34. $(CC) $(CC_FLAGS) $(CC_SYMBOLS) $(ONLY_C_FLAGS) $(INCLUDE_PATHS) -o $@ $<
  35. .cpp.o:
  36. $(CPP) $(CC_FLAGS) $(CC_SYMBOLS) $(ONLY_CPP_FLAGS) $(INCLUDE_PATHS) -o $@ $<
  37. $(PROJECT).elf: $(OBJECTS) $(SYS_OBJECTS)
  38. $(LD) $(LD_FLAGS) -T$(LINKER_SCRIPT) $(LIBRARY_PATHS) -o $@ $^ $(LIBRARIES) $(LD_SYS_LIBS) $(LIBRARIES) $(LD_SYS_LIBS)
  39. $(PROJECT).bin: $(PROJECT).elf
  40. $(OBJCOPY) -O binary $< $@