Keyboard firmwares for Atmel AVR and Cortex-M
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

gcc_arm_nucleo_f091rc.tmpl 2.1KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. # This file was automagically generated by mbed.org. For more information,
  2. # see http://mbed.org/handbook/Exporting-to-GCC-ARM-Embedded
  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. AS = $(GCC_BIN)arm-none-eabi-as
  13. CC = $(GCC_BIN)arm-none-eabi-gcc
  14. CPP = $(GCC_BIN)arm-none-eabi-g++
  15. LD = $(GCC_BIN)arm-none-eabi-gcc
  16. OBJCOPY = $(GCC_BIN)arm-none-eabi-objcopy
  17. OBJDUMP = $(GCC_BIN)arm-none-eabi-objdump
  18. SIZE = $(GCC_BIN)arm-none-eabi-size
  19. CPU = -mcpu=cortex-m0 -mthumb
  20. CC_FLAGS = $(CPU) -c -g -fno-common -fmessage-length=0 -Wall -fno-exceptions -ffunction-sections -fdata-sections
  21. CC_FLAGS += -MMD -MP
  22. CC_SYMBOLS = {% for s in symbols %}-D{{s}} {% endfor %}
  23. LD_FLAGS = $(CPU) -Wl,--gc-sections --specs=nano.specs -u _printf_float -u _scanf_float -Wl,--wrap,main
  24. LD_FLAGS += -Wl,-Map=$(PROJECT).map,--cref
  25. LD_SYS_LIBS = -lstdc++ -lsupc++ -lm -lc -lgcc -lnosys
  26. ifeq ($(DEBUG), 1)
  27. CC_FLAGS += -DDEBUG -O0
  28. else
  29. CC_FLAGS += -DNDEBUG -Os
  30. endif
  31. all: $(PROJECT).bin $(PROJECT).hex size
  32. clean:
  33. rm -f $(PROJECT).bin $(PROJECT).elf $(PROJECT).hex $(PROJECT).map $(PROJECT).lst $(OBJECTS) $(DEPS)
  34. .s.o:
  35. $(AS) $(CPU) -o $@ $<
  36. .c.o:
  37. $(CC) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu99 $(INCLUDE_PATHS) -o $@ $<
  38. .cpp.o:
  39. $(CPP) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu++98 -fno-rtti $(INCLUDE_PATHS) -o $@ $<
  40. $(PROJECT).elf: $(OBJECTS) $(SYS_OBJECTS)
  41. $(LD) $(LD_FLAGS) -T$(LINKER_SCRIPT) $(LIBRARY_PATHS) -o $@ $^ $(LIBRARIES) $(LD_SYS_LIBS) $(LIBRARIES) $(LD_SYS_LIBS)
  42. $(PROJECT).bin: $(PROJECT).elf
  43. @$(OBJCOPY) -O binary $< $@
  44. $(PROJECT).hex: $(PROJECT).elf
  45. @$(OBJCOPY) -O ihex $< $@
  46. $(PROJECT).lst: $(PROJECT).elf
  47. @$(OBJDUMP) -Sdh $< > $@
  48. lst: $(PROJECT).lst
  49. size:
  50. $(SIZE) $(PROJECT).elf
  51. DEPS = $(OBJECTS:.o=.d) $(SYS_OBJECTS:.o=.d)
  52. -include $(DEPS)