diff --git a/workspace_tools/export/gcc_arm_arch_ble.tmpl b/workspace_tools/export/gcc_arm_arch_ble.tmpl index b507516f41..2f4c03f687 100644 --- a/workspace_tools/export/gcc_arm_arch_ble.tmpl +++ b/workspace_tools/export/gcc_arm_arch_ble.tmpl @@ -1,76 +1,14 @@ -# This file was automagically generated by mbed.org. For more information, -# see http://mbed.org/handbook/Exporting-to-GCC-ARM-Embedded +{% extends "gcc_arm_common.tmpl" %} -GCC_BIN = -PROJECT = {{name}} -OBJECTS = {% for f in to_be_compiled %}{{f}} {% endfor %} -SYS_OBJECTS = {% for f in object_files %}{{f}} {% endfor %} -INCLUDE_PATHS = {% for p in include_paths %}-I{{p}} {% endfor %} -LIBRARY_PATHS = {% for p in library_paths %}-L{{p}} {% endfor %} -LIBRARIES = {% for lib in libraries %}-l{{lib}} {% endfor %} -LINKER_SCRIPT = {{linker_script}} +{% block additional_variables %} SOFTDEVICE = mbed/TARGET_ARCH_BLE/TARGET_NORDIC/TARGET_MCU_NRF51822/Lib/s110_nrf51822_7_1_0/s110_nrf51822_7.1.0_softdevice.hex +{% endblock %} -############################################################################### -AS = $(GCC_BIN)arm-none-eabi-as -CC = $(GCC_BIN)arm-none-eabi-gcc -CPP = $(GCC_BIN)arm-none-eabi-g++ -LD = $(GCC_BIN)arm-none-eabi-gcc -OBJCOPY = $(GCC_BIN)arm-none-eabi-objcopy -OBJDUMP = $(GCC_BIN)arm-none-eabi-objdump -SIZE = $(GCC_BIN)arm-none-eabi-size +{% block additional_executables %} SREC_CAT = srec_cat +{% endblock %} -CPU = -mcpu=cortex-m0 -mthumb -CC_FLAGS = $(CPU) -c -g -fno-common -fmessage-length=0 -Wall -fno-exceptions -ffunction-sections -fdata-sections -fomit-frame-pointer -CC_FLAGS += -MMD -MP -CC_SYMBOLS = {% for s in symbols %}-D{{s}} {% endfor %} - -LD_FLAGS = $(CPU) -Wl,--gc-sections -Wl,--wrap=main --specs=nano.specs -u _printf_float -u _scanf_float -LD_FLAGS += -Wl,-Map=$(PROJECT).map,--cref -LD_SYS_LIBS = -lstdc++ -lsupc++ -lm -lc -lgcc -lnosys - -ifeq ($(DEBUG), 1) - CC_FLAGS += -DDEBUG -O0 -else - CC_FLAGS += -DNDEBUG -Os -endif - -all: $(PROJECT).bin $(PROJECT).hex - -clean: - rm -f $(PROJECT).bin $(PROJECT).elf $(PROJECT).hex $(PROJECT).map $(PROJECT).lst $(OBJECTS) $(DEPS) - -.s.o: - $(AS) $(CPU) -o $@ $< - -.c.o: - $(CC) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu99 $(INCLUDE_PATHS) -o $@ $< - -.cpp.o: - $(CPP) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu++98 -fno-rtti $(INCLUDE_PATHS) -o $@ $< - - -$(PROJECT).elf: $(OBJECTS) $(SYS_OBJECTS) - $(LD) $(LD_FLAGS) -T$(LINKER_SCRIPT) $(LIBRARY_PATHS) -o $@ $^ $(LIBRARIES) $(LD_SYS_LIBS) $(LIBRARIES) $(LD_SYS_LIBS) - $(SIZE) $@ - -$(PROJECT).bin: $(PROJECT).elf - @$(OBJCOPY) -O binary $< $@ - -$(PROJECT).hex: $(PROJECT).elf - @$(OBJCOPY) -O ihex $< $@ - -$(PROJECT).lst: $(PROJECT).elf - @$(OBJDUMP) -Sdh $< > $@ - -lst: $(PROJECT).lst - -size: - $(SIZE) $(PROJECT).elf - -DEPS = $(OBJECTS:.o=.d) $(SYS_OBJECTS:.o=.d) --include $(DEPS) - +{% block additional_targets %} merge: $(SREC_CAT) $(SOFTDEVICE) -intel $(PROJECT).hex -intel -o combined.hex -intel --line-length=44 +{% endblock %} diff --git a/workspace_tools/export/gcc_arm_arch_max.tmpl b/workspace_tools/export/gcc_arm_arch_max.tmpl index cebeca9dc5..6e616cc884 100644 --- a/workspace_tools/export/gcc_arm_arch_max.tmpl +++ b/workspace_tools/export/gcc_arm_arch_max.tmpl @@ -1,77 +1 @@ -# This file was automagically generated by mbed.org. For more information, -# see http://mbed.org/handbook/Exporting-to-GCC-ARM-Embedded - -GCC_BIN = -PROJECT = {{name}} -OBJECTS = {% for f in to_be_compiled %}{{f}} {% endfor %} -SYS_OBJECTS = {% for f in object_files %}{{f}} {% endfor %} -INCLUDE_PATHS = {% for p in include_paths %}-I{{p}} {% endfor %} -LIBRARY_PATHS = {% for p in library_paths %}-L{{p}} {% endfor %} -LIBRARIES = {% for lib in libraries %}-l{{lib}} {% endfor %} -LINKER_SCRIPT = {{linker_script}} - -############################################################################### -AS = $(GCC_BIN)arm-none-eabi-as -CC = $(GCC_BIN)arm-none-eabi-gcc -CPP = $(GCC_BIN)arm-none-eabi-g++ -LD = $(GCC_BIN)arm-none-eabi-gcc -OBJCOPY = $(GCC_BIN)arm-none-eabi-objcopy -OBJDUMP = $(GCC_BIN)arm-none-eabi-objdump -SIZE = $(GCC_BIN)arm-none-eabi-size - -CPU = -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=$(FLOAT_ABI) -CC_FLAGS = $(CPU) -c -g -fno-common -fmessage-length=0 -Wall -fno-exceptions -ffunction-sections -fdata-sections -fomit-frame-pointer -fno-rtti -CC_FLAGS += -MMD -MP -CC_SYMBOLS = {% for s in symbols %}-D{{s}} {% endfor %} - -LD_FLAGS = $(CPU) -Wl,--gc-sections --specs=nano.specs -u _printf_float -u _scanf_float -Wl,--wrap,main -LD_FLAGS += -Wl,-Map=$(PROJECT).map,--cref -LD_SYS_LIBS = -lstdc++ -lsupc++ -lm -lc -lgcc -lnosys - -ifeq ($(HARDFP),1) - FLOAT_ABI = hard -else - FLOAT_ABI = softfp -endif - -ifeq ($(DEBUG), 1) - CC_FLAGS += -DDEBUG -O0 -else - CC_FLAGS += -DNDEBUG -Os -endif - -all: $(PROJECT).bin $(PROJECT).hex size - -clean: - rm -f $(PROJECT).bin $(PROJECT).elf $(PROJECT).hex $(PROJECT).map $(PROJECT).lst $(OBJECTS) $(DEPS) - -.s.o: - $(AS) $(CPU) -o $@ $< - -.c.o: - $(CC) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu99 $(INCLUDE_PATHS) -o $@ $< - -.cpp.o: - $(CPP) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu++98 $(INCLUDE_PATHS) -o $@ $< - - -$(PROJECT).elf: $(OBJECTS) $(SYS_OBJECTS) - $(LD) $(LD_FLAGS) -T$(LINKER_SCRIPT) $(LIBRARY_PATHS) -o $@ $^ $(LIBRARIES) $(LD_SYS_LIBS) $(LIBRARIES) $(LD_SYS_LIBS) - -$(PROJECT).bin: $(PROJECT).elf - @$(OBJCOPY) -O binary $< $@ - -$(PROJECT).hex: $(PROJECT).elf - @$(OBJCOPY) -O ihex $< $@ - -$(PROJECT).lst: $(PROJECT).elf - @$(OBJDUMP) -Sdh $< > $@ - -lst: $(PROJECT).lst - -size: - $(SIZE) $(PROJECT).elf - -DEPS = $(OBJECTS:.o=.d) $(SYS_OBJECTS:.o=.d) --include $(DEPS) - +{% extends "gcc_arm_common.tmpl" %} diff --git a/workspace_tools/export/gcc_arm_arch_pro.tmpl b/workspace_tools/export/gcc_arm_arch_pro.tmpl index 68a5847a58..6e616cc884 100644 --- a/workspace_tools/export/gcc_arm_arch_pro.tmpl +++ b/workspace_tools/export/gcc_arm_arch_pro.tmpl @@ -1,72 +1 @@ -# This file was automagically generated by mbed.org. For more information, -# see http://mbed.org/handbook/Exporting-to-GCC-ARM-Embedded - -GCC_BIN = -PROJECT = {{name}} -OBJECTS = {% for f in to_be_compiled %}{{f}} {% endfor %} -SYS_OBJECTS = {% for f in object_files %}{{f}} {% endfor %} -INCLUDE_PATHS = {% for p in include_paths %}-I{{p}} {% endfor %} -LIBRARY_PATHS = {% for p in library_paths %}-L{{p}} {% endfor %} -LIBRARIES = {% for lib in libraries %}-l{{lib}} {% endfor %} -LINKER_SCRIPT = {{linker_script}} - -############################################################################### -AS = $(GCC_BIN)arm-none-eabi-as -CC = $(GCC_BIN)arm-none-eabi-gcc -CPP = $(GCC_BIN)arm-none-eabi-g++ -LD = $(GCC_BIN)arm-none-eabi-gcc -OBJCOPY = $(GCC_BIN)arm-none-eabi-objcopy -OBJDUMP = $(GCC_BIN)arm-none-eabi-objdump -SIZE = $(GCC_BIN)arm-none-eabi-size - -CPU = -mcpu=cortex-m3 -mthumb -CC_FLAGS = $(CPU) -c -g -fno-common -fmessage-length=0 -Wall -fno-exceptions -ffunction-sections -fdata-sections -fomit-frame-pointer -CC_FLAGS += -MMD -MP -CC_SYMBOLS = {% for s in symbols %}-D{{s}} {% endfor %} - -LD_FLAGS = $(CPU) -Wl,--gc-sections --specs=nano.specs -u _printf_float -u _scanf_float -Wl,--wrap,main -LD_FLAGS += -Wl,-Map=$(PROJECT).map,--cref -LD_SYS_LIBS = -lstdc++ -lsupc++ -lm -lc -lgcc -lnosys - -ifeq ($(DEBUG), 1) - CC_FLAGS += -DDEBUG -O0 -else - CC_FLAGS += -DNDEBUG -Os -endif - -all: $(PROJECT).bin $(PROJECT).hex - -clean: - rm -f $(PROJECT).bin $(PROJECT).elf $(PROJECT).hex $(PROJECT).map $(PROJECT).lst $(OBJECTS) $(DEPS) - -.s.o: - $(AS) $(CPU) -o $@ $< - -.c.o: - $(CC) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu99 $(INCLUDE_PATHS) -o $@ $< - -.cpp.o: - $(CPP) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu++98 -fno-rtti $(INCLUDE_PATHS) -o $@ $< - - -$(PROJECT).elf: $(OBJECTS) $(SYS_OBJECTS) - $(LD) $(LD_FLAGS) -T$(LINKER_SCRIPT) $(LIBRARY_PATHS) -o $@ $^ $(LIBRARIES) $(LD_SYS_LIBS) $(LIBRARIES) $(LD_SYS_LIBS) - $(SIZE) $@ - -$(PROJECT).bin: $(PROJECT).elf - @$(OBJCOPY) -O binary $< $@ - -$(PROJECT).hex: $(PROJECT).elf - @$(OBJCOPY) -O ihex $< $@ - -$(PROJECT).lst: $(PROJECT).elf - @$(OBJDUMP) -Sdh $< > $@ - -lst: $(PROJECT).lst - -size: - $(SIZE) $(PROJECT).elf - -DEPS = $(OBJECTS:.o=.d) $(SYS_OBJECTS:.o=.d) --include $(DEPS) - +{% extends "gcc_arm_common.tmpl" %} diff --git a/workspace_tools/export/gcc_arm_common.tmpl b/workspace_tools/export/gcc_arm_common.tmpl new file mode 100644 index 0000000000..9e337a87a9 --- /dev/null +++ b/workspace_tools/export/gcc_arm_common.tmpl @@ -0,0 +1,101 @@ +# This file was automagically generated by mbed.org. For more information, +# see http://mbed.org/handbook/Exporting-to-GCC-ARM-Embedded + +GCC_BIN = +PROJECT = {{name}} +OBJECTS = {% for f in to_be_compiled %}{{f}} {% endfor %} +SYS_OBJECTS = {% for f in object_files %}{{f}} {% endfor %} +INCLUDE_PATHS = {% for p in include_paths %}-I{{p}} {% endfor %} +LIBRARY_PATHS = {% for p in library_paths %}-L{{p}} {% endfor %} +LIBRARIES = {% for lib in libraries %}-l{{lib}} {% endfor %} +LINKER_SCRIPT = {{linker_script}} +{%- block additional_variables -%}{% endblock %} + +############################################################################### +AS = $(GCC_BIN)arm-none-eabi-as +CC = $(GCC_BIN)arm-none-eabi-gcc +CPP = $(GCC_BIN)arm-none-eabi-g++ +LD = $(GCC_BIN)arm-none-eabi-gcc +OBJCOPY = $(GCC_BIN)arm-none-eabi-objcopy +OBJDUMP = $(GCC_BIN)arm-none-eabi-objdump +SIZE = $(GCC_BIN)arm-none-eabi-size +{%- block additional_executables -%}{% endblock %} + +{%- block flags -%} + +{% block hardfp %} +{% if "-mfloat-abi=softfp" in cpu_flags %} +ifeq ($(HARDFP),1) + FLOAT_ABI = hard +else + FLOAT_ABI = softfp +endif +{% endif %} +{%- endblock %} + +CPU = {% block cpu %}{% for cf in cpu_flags %}{{cf|replace("-mfloat-abi=softfp","-mfloat-abi=$(FLOAT_ABI)")}} {% endfor %}{% endblock %} +CC_FLAGS = {% block cc_flags %}$(CPU) -c -g -fno-common -fmessage-length=0 -Wall -fno-exceptions -ffunction-sections -fdata-sections -fomit-frame-pointer -MMD -MP{% endblock %} +CC_SYMBOLS = {% block cc_symbols %}{% for s in symbols %}-D{{s}} {% endfor %}{% endblock %} + +LD_FLAGS = {%- block ld_flags -%} +{%- if "-mcpu=cortex-m0" in cpu_flags or "-mcpu=cortex-m0plus" in cpu_flags -%} +{{ ' ' }}$(CPU) -Wl,--gc-sections --specs=nano.specs -Wl,--wrap,main -Wl,-Map=$(PROJECT).map,--cref +#LD_FLAGS += -u _printf_float -u _scanf_float +{%- else -%} +{{ ' ' }}$(CPU) -Wl,--gc-sections --specs=nano.specs -u _printf_float -u _scanf_float -Wl,--wrap,main -Wl,-Map=$(PROJECT).map,--cref +{%- endif -%} +{% endblock %} +LD_SYS_LIBS = {% block ld_sys_libs %}-lstdc++ -lsupc++ -lm -lc -lgcc -lnosys{% endblock %} +{% endblock %} + +ifeq ($(DEBUG), 1) + CC_FLAGS += -DDEBUG -O0 +else + CC_FLAGS += -DNDEBUG -Os +endif + +.PHONY: all clean lst size + +{% block target_all -%} +all: $(PROJECT).bin $(PROJECT).hex size +{% endblock %} + +{% block target_clean -%} +clean: + rm -f $(PROJECT).bin $(PROJECT).elf $(PROJECT).hex $(PROJECT).map $(PROJECT).lst $(OBJECTS) $(DEPS) +{% endblock %} + +.s.o: + $(AS) $(CPU) -o $@ $< + +.c.o: + $(CC) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu99 $(INCLUDE_PATHS) -o $@ $< + +.cpp.o: + $(CPP) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu++98 -fno-rtti $(INCLUDE_PATHS) -o $@ $< + + +{% block target_project_elf %} +$(PROJECT).elf: $(OBJECTS) $(SYS_OBJECTS) + $(LD) $(LD_FLAGS) -T$(LINKER_SCRIPT) $(LIBRARY_PATHS) -o $@ $^ $(LIBRARIES) $(LD_SYS_LIBS) $(LIBRARIES) $(LD_SYS_LIBS) +{% endblock %} + +$(PROJECT).bin: $(PROJECT).elf + $(OBJCOPY) -O binary $< $@ + +$(PROJECT).hex: $(PROJECT).elf + @$(OBJCOPY) -O ihex $< $@ + +$(PROJECT).lst: $(PROJECT).elf + @$(OBJDUMP) -Sdh $< > $@ + +lst: $(PROJECT).lst + +size: $(PROJECT).elf + $(SIZE) $(PROJECT).elf + +DEPS = $(OBJECTS:.o=.d) $(SYS_OBJECTS:.o=.d) +-include $(DEPS) + +{% block additional_targets %}{% endblock %} + diff --git a/workspace_tools/export/gcc_arm_delta_dfcm_nnn40.tmpl b/workspace_tools/export/gcc_arm_delta_dfcm_nnn40.tmpl index 48be881791..c35964e9c4 100644 --- a/workspace_tools/export/gcc_arm_delta_dfcm_nnn40.tmpl +++ b/workspace_tools/export/gcc_arm_delta_dfcm_nnn40.tmpl @@ -1,76 +1,14 @@ -# This file was automagically generated by mbed.org. For more information, -# see http://mbed.org/handbook/Exporting-to-GCC-ARM-Embedded +{% extends "gcc_arm_common.tmpl" %} -GCC_BIN = -PROJECT = {{name}} -OBJECTS = {% for f in to_be_compiled %}{{f}} {% endfor %} -SYS_OBJECTS = {% for f in object_files %}{{f}} {% endfor %} -INCLUDE_PATHS = {% for p in include_paths %}-I{{p}} {% endfor %} -LIBRARY_PATHS = {% for p in library_paths %}-L{{p}} {% endfor %} -LIBRARIES = {% for lib in libraries %}-l{{lib}} {% endfor %} -LINKER_SCRIPT = {{linker_script}} +{% block additional_variables %} SOFTDEVICE = mbed/TARGET_NRF51822/TARGET_NORDIC/TARGET_MCU_NRF51822/Lib/s110_nrf51822_7_0_0/s110_nrf51822_7.0.0_softdevice.hex +{% endblock %} -############################################################################### -AS = $(GCC_BIN)arm-none-eabi-as -CC = $(GCC_BIN)arm-none-eabi-gcc -CPP = $(GCC_BIN)arm-none-eabi-g++ -LD = $(GCC_BIN)arm-none-eabi-gcc -OBJCOPY = $(GCC_BIN)arm-none-eabi-objcopy -OBJDUMP = $(GCC_BIN)arm-none-eabi-objdump -SIZE = $(GCC_BIN)arm-none-eabi-size +{% block additional_executables %} SREC_CAT = srec_cat +{% endblock %} -CPU = -mcpu=cortex-m0 -mthumb -CC_FLAGS = $(CPU) -c -g -fno-common -fmessage-length=0 -Wall -fno-exceptions -ffunction-sections -fdata-sections -fomit-frame-pointer -CC_FLAGS += -MMD -MP -CC_SYMBOLS = {% for s in symbols %}-D{{s}} {% endfor %} - -LD_FLAGS = $(CPU) -Wl,--gc-sections -Wl,--wrap=main --specs=nano.specs -u _printf_float -u _scanf_float -LD_FLAGS += -Wl,-Map=$(PROJECT).map,--cref -LD_SYS_LIBS = -lstdc++ -lsupc++ -lm -lc -lgcc -lnosys - -ifeq ($(DEBUG), 1) - CC_FLAGS += -DDEBUG -O0 -else - CC_FLAGS += -DNDEBUG -Os -endif - -all: $(PROJECT).bin $(PROJECT).hex - -clean: - rm -f $(PROJECT).bin $(PROJECT).elf $(PROJECT).hex $(PROJECT).map $(PROJECT).lst $(OBJECTS) $(DEPS) - -.s.o: - $(AS) $(CPU) -o $@ $< - -.c.o: - $(CC) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu99 $(INCLUDE_PATHS) -o $@ $< - -.cpp.o: - $(CPP) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu++98 -fno-rtti $(INCLUDE_PATHS) -o $@ $< - - -$(PROJECT).elf: $(OBJECTS) $(SYS_OBJECTS) - $(LD) $(LD_FLAGS) -T$(LINKER_SCRIPT) $(LIBRARY_PATHS) -o $@ $^ $(LIBRARIES) $(LD_SYS_LIBS) $(LIBRARIES) $(LD_SYS_LIBS) - $(SIZE) $@ - -$(PROJECT).bin: $(PROJECT).elf - @$(OBJCOPY) -O binary $< $@ - -$(PROJECT).hex: $(PROJECT).elf - @$(OBJCOPY) -O ihex $< $@ - -$(PROJECT).lst: $(PROJECT).elf - @$(OBJDUMP) -Sdh $< > $@ - -lst: $(PROJECT).lst - -size: - $(SIZE) $(PROJECT).elf - -DEPS = $(OBJECTS:.o=.d) $(SYS_OBJECTS:.o=.d) --include $(DEPS) - +{% block additional_targets %} merge: $(SREC_CAT) $(SOFTDEVICE) -intel $(PROJECT).hex -intel -o combined.hex -intel --line-length=44 +{% endblock %} diff --git a/workspace_tools/export/gcc_arm_disco_f051r8.tmpl b/workspace_tools/export/gcc_arm_disco_f051r8.tmpl index 7efe1feb7c..6e616cc884 100644 --- a/workspace_tools/export/gcc_arm_disco_f051r8.tmpl +++ b/workspace_tools/export/gcc_arm_disco_f051r8.tmpl @@ -1,73 +1 @@ -# This file was automagically generated by mbed.org. For more information, -# see http://mbed.org/handbook/Exporting-to-GCC-ARM-Embedded - -GCC_BIN = -PROJECT = {{name}} -OBJECTS = {% for f in to_be_compiled %}{{f}} {% endfor %} -SYS_OBJECTS = {% for f in object_files %}{{f}} {% endfor %} -INCLUDE_PATHS = {% for p in include_paths %}-I{{p}} {% endfor %} -LIBRARY_PATHS = {% for p in library_paths %}-L{{p}} {% endfor %} -LIBRARIES = {% for lib in libraries %}-l{{lib}} {% endfor %} -LINKER_SCRIPT = {{linker_script}} - -############################################################################### -AS = $(GCC_BIN)arm-none-eabi-as -CC = $(GCC_BIN)arm-none-eabi-gcc -CPP = $(GCC_BIN)arm-none-eabi-g++ -LD = $(GCC_BIN)arm-none-eabi-gcc -OBJCOPY = $(GCC_BIN)arm-none-eabi-objcopy -OBJDUMP = $(GCC_BIN)arm-none-eabi-objdump -SIZE = $(GCC_BIN)arm-none-eabi-size - -CPU = -mcpu=cortex-m0 -mthumb -CC_FLAGS = $(CPU) -c -g -fno-common -fmessage-length=0 -Wall -fno-exceptions -ffunction-sections -fdata-sections -fomit-frame-pointer -CC_FLAGS += -MMD -MP -CC_SYMBOLS = {% for s in symbols %}-D{{s}} {% endfor %} - -LD_FLAGS = $(CPU) -Wl,--gc-sections --specs=nano.specs -Wl,--wrap,main -#LD_FLAGS += -u _printf_float -u _scanf_float -LD_FLAGS += -Wl,-Map=$(PROJECT).map,--cref -LD_SYS_LIBS = -lstdc++ -lsupc++ -lm -lc -lgcc -lnosys - -ifeq ($(DEBUG), 1) - CC_FLAGS += -DDEBUG -O0 -else - CC_FLAGS += -DNDEBUG -Os -endif - -all: $(PROJECT).bin $(PROJECT).hex - -clean: - rm -f $(PROJECT).bin $(PROJECT).elf $(PROJECT).hex $(PROJECT).map $(PROJECT).lst $(OBJECTS) $(DEPS) - -.s.o: - $(AS) $(CPU) -o $@ $< - -.c.o: - $(CC) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu99 $(INCLUDE_PATHS) -o $@ $< - -.cpp.o: - $(CPP) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu++98 -fno-rtti $(INCLUDE_PATHS) -o $@ $< - - -$(PROJECT).elf: $(OBJECTS) $(SYS_OBJECTS) - $(LD) $(LD_FLAGS) -T$(LINKER_SCRIPT) $(LIBRARY_PATHS) -o $@ $^ $(LIBRARIES) $(LD_SYS_LIBS) $(LIBRARIES) $(LD_SYS_LIBS) - $(SIZE) $@ - -$(PROJECT).bin: $(PROJECT).elf - @$(OBJCOPY) -O binary $< $@ - -$(PROJECT).hex: $(PROJECT).elf - @$(OBJCOPY) -O ihex $< $@ - -$(PROJECT).lst: $(PROJECT).elf - @$(OBJDUMP) -Sdh $< > $@ - -lst: $(PROJECT).lst - -size: - $(SIZE) $(PROJECT).elf - -DEPS = $(OBJECTS:.o=.d) $(SYS_OBJECTS:.o=.d) --include $(DEPS) - +{% extends "gcc_arm_common.tmpl" %} diff --git a/workspace_tools/export/gcc_arm_disco_f100rb.tmpl b/workspace_tools/export/gcc_arm_disco_f100rb.tmpl index 16223df3ac..6e616cc884 100644 --- a/workspace_tools/export/gcc_arm_disco_f100rb.tmpl +++ b/workspace_tools/export/gcc_arm_disco_f100rb.tmpl @@ -1,73 +1 @@ -# This file was automagically generated by mbed.org. For more information, -# see http://mbed.org/handbook/Exporting-to-GCC-ARM-Embedded - -GCC_BIN = -PROJECT = {{name}} -OBJECTS = {% for f in to_be_compiled %}{{f}} {% endfor %} -SYS_OBJECTS = {% for f in object_files %}{{f}} {% endfor %} -INCLUDE_PATHS = {% for p in include_paths %}-I{{p}} {% endfor %} -LIBRARY_PATHS = {% for p in library_paths %}-L{{p}} {% endfor %} -LIBRARIES = {% for lib in libraries %}-l{{lib}} {% endfor %} -LINKER_SCRIPT = {{linker_script}} - -############################################################################### -AS = $(GCC_BIN)arm-none-eabi-as -CC = $(GCC_BIN)arm-none-eabi-gcc -CPP = $(GCC_BIN)arm-none-eabi-g++ -LD = $(GCC_BIN)arm-none-eabi-gcc -OBJCOPY = $(GCC_BIN)arm-none-eabi-objcopy -OBJDUMP = $(GCC_BIN)arm-none-eabi-objdump -SIZE = $(GCC_BIN)arm-none-eabi-size - -CPU = -mcpu=cortex-m3 -mthumb -CC_FLAGS = $(CPU) -c -g -fno-common -fmessage-length=0 -Wall -fno-exceptions -ffunction-sections -fdata-sections -fomit-frame-pointer -CC_FLAGS += -MMD -MP -CC_SYMBOLS = {% for s in symbols %}-D{{s}} {% endfor %} - -LD_FLAGS = $(CPU) -Wl,--gc-sections --specs=nano.specs -Wl,--wrap,main -#LD_FLAGS += -u _printf_float -u _scanf_float -LD_FLAGS += -Wl,-Map=$(PROJECT).map,--cref -LD_SYS_LIBS = -lstdc++ -lsupc++ -lm -lc -lgcc -lnosys - -ifeq ($(DEBUG), 1) - CC_FLAGS += -DDEBUG -O0 -else - CC_FLAGS += -DNDEBUG -Os -endif - -all: $(PROJECT).bin $(PROJECT).hex - -clean: - rm -f $(PROJECT).bin $(PROJECT).elf $(PROJECT).hex $(PROJECT).map $(PROJECT).lst $(OBJECTS) $(DEPS) - -.s.o: - $(AS) $(CPU) -o $@ $< - -.c.o: - $(CC) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu99 $(INCLUDE_PATHS) -o $@ $< - -.cpp.o: - $(CPP) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu++98 -fno-rtti $(INCLUDE_PATHS) -o $@ $< - - -$(PROJECT).elf: $(OBJECTS) $(SYS_OBJECTS) - $(LD) $(LD_FLAGS) -T$(LINKER_SCRIPT) $(LIBRARY_PATHS) -o $@ $^ $(LIBRARIES) $(LD_SYS_LIBS) $(LIBRARIES) $(LD_SYS_LIBS) - $(SIZE) $@ - -$(PROJECT).bin: $(PROJECT).elf - @$(OBJCOPY) -O binary $< $@ - -$(PROJECT).hex: $(PROJECT).elf - @$(OBJCOPY) -O ihex $< $@ - -$(PROJECT).lst: $(PROJECT).elf - @$(OBJDUMP) -Sdh $< > $@ - -lst: $(PROJECT).lst - -size: - $(SIZE) $(PROJECT).elf - -DEPS = $(OBJECTS:.o=.d) $(SYS_OBJECTS:.o=.d) --include $(DEPS) - +{% extends "gcc_arm_common.tmpl" %} diff --git a/workspace_tools/export/gcc_arm_disco_f303vc.tmpl b/workspace_tools/export/gcc_arm_disco_f303vc.tmpl index 224ceb2fae..6e616cc884 100644 --- a/workspace_tools/export/gcc_arm_disco_f303vc.tmpl +++ b/workspace_tools/export/gcc_arm_disco_f303vc.tmpl @@ -1,78 +1 @@ -# This file was automagically generated by mbed.org. For more information, -# see http://mbed.org/handbook/Exporting-to-GCC-ARM-Embedded - -GCC_BIN = -PROJECT = {{name}} -OBJECTS = {% for f in to_be_compiled %}{{f}} {% endfor %} -SYS_OBJECTS = {% for f in object_files %}{{f}} {% endfor %} -INCLUDE_PATHS = {% for p in include_paths %}-I{{p}} {% endfor %} -LIBRARY_PATHS = {% for p in library_paths %}-L{{p}} {% endfor %} -LIBRARIES = {% for lib in libraries %}-l{{lib}} {% endfor %} -LINKER_SCRIPT = {{linker_script}} - -############################################################################### -AS = $(GCC_BIN)arm-none-eabi-as -CC = $(GCC_BIN)arm-none-eabi-gcc -CPP = $(GCC_BIN)arm-none-eabi-g++ -LD = $(GCC_BIN)arm-none-eabi-gcc -OBJCOPY = $(GCC_BIN)arm-none-eabi-objcopy -OBJDUMP = $(GCC_BIN)arm-none-eabi-objdump -SIZE = $(GCC_BIN)arm-none-eabi-size - -CPU = -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=$(FLOAT_ABI) -CC_FLAGS = $(CPU) -c -g -fno-common -fmessage-length=0 -Wall -fno-exceptions -ffunction-sections -fdata-sections -fomit-frame-pointer -CC_FLAGS += -MMD -MP -CC_SYMBOLS = {% for s in symbols %}-D{{s}} {% endfor %} - -LD_FLAGS = $(CPU) -Wl,--gc-sections --specs=nano.specs -u _printf_float -u _scanf_float -Wl,--wrap,main -LD_FLAGS += -Wl,-Map=$(PROJECT).map,--cref -LD_SYS_LIBS = -lstdc++ -lsupc++ -lm -lc -lgcc -lnosys - -ifeq ($(HARDFP),1) - FLOAT_ABI = hard -else - FLOAT_ABI = softfp -endif - -ifeq ($(DEBUG), 1) - CC_FLAGS += -DDEBUG -O0 -else - CC_FLAGS += -DNDEBUG -Os -endif - -all: $(PROJECT).bin $(PROJECT).hex - -clean: - rm -f $(PROJECT).bin $(PROJECT).elf $(PROJECT).hex $(PROJECT).map $(PROJECT).lst $(OBJECTS) $(DEPS) - -.s.o: - $(AS) $(CPU) -o $@ $< - -.c.o: - $(CC) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu99 $(INCLUDE_PATHS) -o $@ $< - -.cpp.o: - $(CPP) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu++98 -fno-rtti $(INCLUDE_PATHS) -o $@ $< - - -$(PROJECT).elf: $(OBJECTS) $(SYS_OBJECTS) - $(LD) $(LD_FLAGS) -T$(LINKER_SCRIPT) $(LIBRARY_PATHS) -o $@ $^ $(LIBRARIES) $(LD_SYS_LIBS) $(LIBRARIES) $(LD_SYS_LIBS) - $(SIZE) $@ - -$(PROJECT).bin: $(PROJECT).elf - @$(OBJCOPY) -O binary $< $@ - -$(PROJECT).hex: $(PROJECT).elf - @$(OBJCOPY) -O ihex $< $@ - -$(PROJECT).lst: $(PROJECT).elf - @$(OBJDUMP) -Sdh $< > $@ - -lst: $(PROJECT).lst - -size: - $(SIZE) $(PROJECT).elf - -DEPS = $(OBJECTS:.o=.d) $(SYS_OBJECTS:.o=.d) --include $(DEPS) - +{% extends "gcc_arm_common.tmpl" %} diff --git a/workspace_tools/export/gcc_arm_disco_f334c8.tmpl b/workspace_tools/export/gcc_arm_disco_f334c8.tmpl index 224ceb2fae..6e616cc884 100644 --- a/workspace_tools/export/gcc_arm_disco_f334c8.tmpl +++ b/workspace_tools/export/gcc_arm_disco_f334c8.tmpl @@ -1,78 +1 @@ -# This file was automagically generated by mbed.org. For more information, -# see http://mbed.org/handbook/Exporting-to-GCC-ARM-Embedded - -GCC_BIN = -PROJECT = {{name}} -OBJECTS = {% for f in to_be_compiled %}{{f}} {% endfor %} -SYS_OBJECTS = {% for f in object_files %}{{f}} {% endfor %} -INCLUDE_PATHS = {% for p in include_paths %}-I{{p}} {% endfor %} -LIBRARY_PATHS = {% for p in library_paths %}-L{{p}} {% endfor %} -LIBRARIES = {% for lib in libraries %}-l{{lib}} {% endfor %} -LINKER_SCRIPT = {{linker_script}} - -############################################################################### -AS = $(GCC_BIN)arm-none-eabi-as -CC = $(GCC_BIN)arm-none-eabi-gcc -CPP = $(GCC_BIN)arm-none-eabi-g++ -LD = $(GCC_BIN)arm-none-eabi-gcc -OBJCOPY = $(GCC_BIN)arm-none-eabi-objcopy -OBJDUMP = $(GCC_BIN)arm-none-eabi-objdump -SIZE = $(GCC_BIN)arm-none-eabi-size - -CPU = -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=$(FLOAT_ABI) -CC_FLAGS = $(CPU) -c -g -fno-common -fmessage-length=0 -Wall -fno-exceptions -ffunction-sections -fdata-sections -fomit-frame-pointer -CC_FLAGS += -MMD -MP -CC_SYMBOLS = {% for s in symbols %}-D{{s}} {% endfor %} - -LD_FLAGS = $(CPU) -Wl,--gc-sections --specs=nano.specs -u _printf_float -u _scanf_float -Wl,--wrap,main -LD_FLAGS += -Wl,-Map=$(PROJECT).map,--cref -LD_SYS_LIBS = -lstdc++ -lsupc++ -lm -lc -lgcc -lnosys - -ifeq ($(HARDFP),1) - FLOAT_ABI = hard -else - FLOAT_ABI = softfp -endif - -ifeq ($(DEBUG), 1) - CC_FLAGS += -DDEBUG -O0 -else - CC_FLAGS += -DNDEBUG -Os -endif - -all: $(PROJECT).bin $(PROJECT).hex - -clean: - rm -f $(PROJECT).bin $(PROJECT).elf $(PROJECT).hex $(PROJECT).map $(PROJECT).lst $(OBJECTS) $(DEPS) - -.s.o: - $(AS) $(CPU) -o $@ $< - -.c.o: - $(CC) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu99 $(INCLUDE_PATHS) -o $@ $< - -.cpp.o: - $(CPP) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu++98 -fno-rtti $(INCLUDE_PATHS) -o $@ $< - - -$(PROJECT).elf: $(OBJECTS) $(SYS_OBJECTS) - $(LD) $(LD_FLAGS) -T$(LINKER_SCRIPT) $(LIBRARY_PATHS) -o $@ $^ $(LIBRARIES) $(LD_SYS_LIBS) $(LIBRARIES) $(LD_SYS_LIBS) - $(SIZE) $@ - -$(PROJECT).bin: $(PROJECT).elf - @$(OBJCOPY) -O binary $< $@ - -$(PROJECT).hex: $(PROJECT).elf - @$(OBJCOPY) -O ihex $< $@ - -$(PROJECT).lst: $(PROJECT).elf - @$(OBJDUMP) -Sdh $< > $@ - -lst: $(PROJECT).lst - -size: - $(SIZE) $(PROJECT).elf - -DEPS = $(OBJECTS:.o=.d) $(SYS_OBJECTS:.o=.d) --include $(DEPS) - +{% extends "gcc_arm_common.tmpl" %} diff --git a/workspace_tools/export/gcc_arm_disco_f401vc.tmpl b/workspace_tools/export/gcc_arm_disco_f401vc.tmpl index 224ceb2fae..6e616cc884 100644 --- a/workspace_tools/export/gcc_arm_disco_f401vc.tmpl +++ b/workspace_tools/export/gcc_arm_disco_f401vc.tmpl @@ -1,78 +1 @@ -# This file was automagically generated by mbed.org. For more information, -# see http://mbed.org/handbook/Exporting-to-GCC-ARM-Embedded - -GCC_BIN = -PROJECT = {{name}} -OBJECTS = {% for f in to_be_compiled %}{{f}} {% endfor %} -SYS_OBJECTS = {% for f in object_files %}{{f}} {% endfor %} -INCLUDE_PATHS = {% for p in include_paths %}-I{{p}} {% endfor %} -LIBRARY_PATHS = {% for p in library_paths %}-L{{p}} {% endfor %} -LIBRARIES = {% for lib in libraries %}-l{{lib}} {% endfor %} -LINKER_SCRIPT = {{linker_script}} - -############################################################################### -AS = $(GCC_BIN)arm-none-eabi-as -CC = $(GCC_BIN)arm-none-eabi-gcc -CPP = $(GCC_BIN)arm-none-eabi-g++ -LD = $(GCC_BIN)arm-none-eabi-gcc -OBJCOPY = $(GCC_BIN)arm-none-eabi-objcopy -OBJDUMP = $(GCC_BIN)arm-none-eabi-objdump -SIZE = $(GCC_BIN)arm-none-eabi-size - -CPU = -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=$(FLOAT_ABI) -CC_FLAGS = $(CPU) -c -g -fno-common -fmessage-length=0 -Wall -fno-exceptions -ffunction-sections -fdata-sections -fomit-frame-pointer -CC_FLAGS += -MMD -MP -CC_SYMBOLS = {% for s in symbols %}-D{{s}} {% endfor %} - -LD_FLAGS = $(CPU) -Wl,--gc-sections --specs=nano.specs -u _printf_float -u _scanf_float -Wl,--wrap,main -LD_FLAGS += -Wl,-Map=$(PROJECT).map,--cref -LD_SYS_LIBS = -lstdc++ -lsupc++ -lm -lc -lgcc -lnosys - -ifeq ($(HARDFP),1) - FLOAT_ABI = hard -else - FLOAT_ABI = softfp -endif - -ifeq ($(DEBUG), 1) - CC_FLAGS += -DDEBUG -O0 -else - CC_FLAGS += -DNDEBUG -Os -endif - -all: $(PROJECT).bin $(PROJECT).hex - -clean: - rm -f $(PROJECT).bin $(PROJECT).elf $(PROJECT).hex $(PROJECT).map $(PROJECT).lst $(OBJECTS) $(DEPS) - -.s.o: - $(AS) $(CPU) -o $@ $< - -.c.o: - $(CC) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu99 $(INCLUDE_PATHS) -o $@ $< - -.cpp.o: - $(CPP) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu++98 -fno-rtti $(INCLUDE_PATHS) -o $@ $< - - -$(PROJECT).elf: $(OBJECTS) $(SYS_OBJECTS) - $(LD) $(LD_FLAGS) -T$(LINKER_SCRIPT) $(LIBRARY_PATHS) -o $@ $^ $(LIBRARIES) $(LD_SYS_LIBS) $(LIBRARIES) $(LD_SYS_LIBS) - $(SIZE) $@ - -$(PROJECT).bin: $(PROJECT).elf - @$(OBJCOPY) -O binary $< $@ - -$(PROJECT).hex: $(PROJECT).elf - @$(OBJCOPY) -O ihex $< $@ - -$(PROJECT).lst: $(PROJECT).elf - @$(OBJDUMP) -Sdh $< > $@ - -lst: $(PROJECT).lst - -size: - $(SIZE) $(PROJECT).elf - -DEPS = $(OBJECTS:.o=.d) $(SYS_OBJECTS:.o=.d) --include $(DEPS) - +{% extends "gcc_arm_common.tmpl" %} diff --git a/workspace_tools/export/gcc_arm_disco_f407vg.tmpl b/workspace_tools/export/gcc_arm_disco_f407vg.tmpl index 224ceb2fae..6e616cc884 100644 --- a/workspace_tools/export/gcc_arm_disco_f407vg.tmpl +++ b/workspace_tools/export/gcc_arm_disco_f407vg.tmpl @@ -1,78 +1 @@ -# This file was automagically generated by mbed.org. For more information, -# see http://mbed.org/handbook/Exporting-to-GCC-ARM-Embedded - -GCC_BIN = -PROJECT = {{name}} -OBJECTS = {% for f in to_be_compiled %}{{f}} {% endfor %} -SYS_OBJECTS = {% for f in object_files %}{{f}} {% endfor %} -INCLUDE_PATHS = {% for p in include_paths %}-I{{p}} {% endfor %} -LIBRARY_PATHS = {% for p in library_paths %}-L{{p}} {% endfor %} -LIBRARIES = {% for lib in libraries %}-l{{lib}} {% endfor %} -LINKER_SCRIPT = {{linker_script}} - -############################################################################### -AS = $(GCC_BIN)arm-none-eabi-as -CC = $(GCC_BIN)arm-none-eabi-gcc -CPP = $(GCC_BIN)arm-none-eabi-g++ -LD = $(GCC_BIN)arm-none-eabi-gcc -OBJCOPY = $(GCC_BIN)arm-none-eabi-objcopy -OBJDUMP = $(GCC_BIN)arm-none-eabi-objdump -SIZE = $(GCC_BIN)arm-none-eabi-size - -CPU = -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=$(FLOAT_ABI) -CC_FLAGS = $(CPU) -c -g -fno-common -fmessage-length=0 -Wall -fno-exceptions -ffunction-sections -fdata-sections -fomit-frame-pointer -CC_FLAGS += -MMD -MP -CC_SYMBOLS = {% for s in symbols %}-D{{s}} {% endfor %} - -LD_FLAGS = $(CPU) -Wl,--gc-sections --specs=nano.specs -u _printf_float -u _scanf_float -Wl,--wrap,main -LD_FLAGS += -Wl,-Map=$(PROJECT).map,--cref -LD_SYS_LIBS = -lstdc++ -lsupc++ -lm -lc -lgcc -lnosys - -ifeq ($(HARDFP),1) - FLOAT_ABI = hard -else - FLOAT_ABI = softfp -endif - -ifeq ($(DEBUG), 1) - CC_FLAGS += -DDEBUG -O0 -else - CC_FLAGS += -DNDEBUG -Os -endif - -all: $(PROJECT).bin $(PROJECT).hex - -clean: - rm -f $(PROJECT).bin $(PROJECT).elf $(PROJECT).hex $(PROJECT).map $(PROJECT).lst $(OBJECTS) $(DEPS) - -.s.o: - $(AS) $(CPU) -o $@ $< - -.c.o: - $(CC) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu99 $(INCLUDE_PATHS) -o $@ $< - -.cpp.o: - $(CPP) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu++98 -fno-rtti $(INCLUDE_PATHS) -o $@ $< - - -$(PROJECT).elf: $(OBJECTS) $(SYS_OBJECTS) - $(LD) $(LD_FLAGS) -T$(LINKER_SCRIPT) $(LIBRARY_PATHS) -o $@ $^ $(LIBRARIES) $(LD_SYS_LIBS) $(LIBRARIES) $(LD_SYS_LIBS) - $(SIZE) $@ - -$(PROJECT).bin: $(PROJECT).elf - @$(OBJCOPY) -O binary $< $@ - -$(PROJECT).hex: $(PROJECT).elf - @$(OBJCOPY) -O ihex $< $@ - -$(PROJECT).lst: $(PROJECT).elf - @$(OBJDUMP) -Sdh $< > $@ - -lst: $(PROJECT).lst - -size: - $(SIZE) $(PROJECT).elf - -DEPS = $(OBJECTS:.o=.d) $(SYS_OBJECTS:.o=.d) --include $(DEPS) - +{% extends "gcc_arm_common.tmpl" %} diff --git a/workspace_tools/export/gcc_arm_disco_f429zi.tmpl b/workspace_tools/export/gcc_arm_disco_f429zi.tmpl index 224ceb2fae..6e616cc884 100644 --- a/workspace_tools/export/gcc_arm_disco_f429zi.tmpl +++ b/workspace_tools/export/gcc_arm_disco_f429zi.tmpl @@ -1,78 +1 @@ -# This file was automagically generated by mbed.org. For more information, -# see http://mbed.org/handbook/Exporting-to-GCC-ARM-Embedded - -GCC_BIN = -PROJECT = {{name}} -OBJECTS = {% for f in to_be_compiled %}{{f}} {% endfor %} -SYS_OBJECTS = {% for f in object_files %}{{f}} {% endfor %} -INCLUDE_PATHS = {% for p in include_paths %}-I{{p}} {% endfor %} -LIBRARY_PATHS = {% for p in library_paths %}-L{{p}} {% endfor %} -LIBRARIES = {% for lib in libraries %}-l{{lib}} {% endfor %} -LINKER_SCRIPT = {{linker_script}} - -############################################################################### -AS = $(GCC_BIN)arm-none-eabi-as -CC = $(GCC_BIN)arm-none-eabi-gcc -CPP = $(GCC_BIN)arm-none-eabi-g++ -LD = $(GCC_BIN)arm-none-eabi-gcc -OBJCOPY = $(GCC_BIN)arm-none-eabi-objcopy -OBJDUMP = $(GCC_BIN)arm-none-eabi-objdump -SIZE = $(GCC_BIN)arm-none-eabi-size - -CPU = -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=$(FLOAT_ABI) -CC_FLAGS = $(CPU) -c -g -fno-common -fmessage-length=0 -Wall -fno-exceptions -ffunction-sections -fdata-sections -fomit-frame-pointer -CC_FLAGS += -MMD -MP -CC_SYMBOLS = {% for s in symbols %}-D{{s}} {% endfor %} - -LD_FLAGS = $(CPU) -Wl,--gc-sections --specs=nano.specs -u _printf_float -u _scanf_float -Wl,--wrap,main -LD_FLAGS += -Wl,-Map=$(PROJECT).map,--cref -LD_SYS_LIBS = -lstdc++ -lsupc++ -lm -lc -lgcc -lnosys - -ifeq ($(HARDFP),1) - FLOAT_ABI = hard -else - FLOAT_ABI = softfp -endif - -ifeq ($(DEBUG), 1) - CC_FLAGS += -DDEBUG -O0 -else - CC_FLAGS += -DNDEBUG -Os -endif - -all: $(PROJECT).bin $(PROJECT).hex - -clean: - rm -f $(PROJECT).bin $(PROJECT).elf $(PROJECT).hex $(PROJECT).map $(PROJECT).lst $(OBJECTS) $(DEPS) - -.s.o: - $(AS) $(CPU) -o $@ $< - -.c.o: - $(CC) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu99 $(INCLUDE_PATHS) -o $@ $< - -.cpp.o: - $(CPP) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu++98 -fno-rtti $(INCLUDE_PATHS) -o $@ $< - - -$(PROJECT).elf: $(OBJECTS) $(SYS_OBJECTS) - $(LD) $(LD_FLAGS) -T$(LINKER_SCRIPT) $(LIBRARY_PATHS) -o $@ $^ $(LIBRARIES) $(LD_SYS_LIBS) $(LIBRARIES) $(LD_SYS_LIBS) - $(SIZE) $@ - -$(PROJECT).bin: $(PROJECT).elf - @$(OBJCOPY) -O binary $< $@ - -$(PROJECT).hex: $(PROJECT).elf - @$(OBJCOPY) -O ihex $< $@ - -$(PROJECT).lst: $(PROJECT).elf - @$(OBJDUMP) -Sdh $< > $@ - -lst: $(PROJECT).lst - -size: - $(SIZE) $(PROJECT).elf - -DEPS = $(OBJECTS:.o=.d) $(SYS_OBJECTS:.o=.d) --include $(DEPS) - +{% extends "gcc_arm_common.tmpl" %} diff --git a/workspace_tools/export/gcc_arm_disco_l053c8.tmpl b/workspace_tools/export/gcc_arm_disco_l053c8.tmpl index 0b995d5283..6e616cc884 100644 --- a/workspace_tools/export/gcc_arm_disco_l053c8.tmpl +++ b/workspace_tools/export/gcc_arm_disco_l053c8.tmpl @@ -1,73 +1 @@ -# This file was automagically generated by mbed.org. For more information, -# see http://mbed.org/handbook/Exporting-to-GCC-ARM-Embedded - -GCC_BIN = -PROJECT = {{name}} -OBJECTS = {% for f in to_be_compiled %}{{f}} {% endfor %} -SYS_OBJECTS = {% for f in object_files %}{{f}} {% endfor %} -INCLUDE_PATHS = {% for p in include_paths %}-I{{p}} {% endfor %} -LIBRARY_PATHS = {% for p in library_paths %}-L{{p}} {% endfor %} -LIBRARIES = {% for lib in libraries %}-l{{lib}} {% endfor %} -LINKER_SCRIPT = {{linker_script}} - -############################################################################### -AS = $(GCC_BIN)arm-none-eabi-as -CC = $(GCC_BIN)arm-none-eabi-gcc -CPP = $(GCC_BIN)arm-none-eabi-g++ -LD = $(GCC_BIN)arm-none-eabi-gcc -OBJCOPY = $(GCC_BIN)arm-none-eabi-objcopy -OBJDUMP = $(GCC_BIN)arm-none-eabi-objdump -SIZE = $(GCC_BIN)arm-none-eabi-size - -CPU = -mcpu=cortex-m0plus -mthumb -CC_FLAGS = $(CPU) -c -g -fno-common -fmessage-length=0 -Wall -fno-exceptions -ffunction-sections -fdata-sections -fomit-frame-pointer -CC_FLAGS += -MMD -MP -CC_SYMBOLS = {% for s in symbols %}-D{{s}} {% endfor %} - -LD_FLAGS = $(CPU) -Wl,--gc-sections --specs=nano.specs -Wl,--wrap,main -#LD_FLAGS += -u _printf_float -u _scanf_float -LD_FLAGS += -Wl,-Map=$(PROJECT).map,--cref -LD_SYS_LIBS = -lstdc++ -lsupc++ -lm -lc -lgcc -lnosys - -ifeq ($(DEBUG), 1) - CC_FLAGS += -DDEBUG -O0 -else - CC_FLAGS += -DNDEBUG -Os -endif - -all: $(PROJECT).bin $(PROJECT).hex - -clean: - rm -f $(PROJECT).bin $(PROJECT).elf $(PROJECT).hex $(PROJECT).map $(PROJECT).lst $(OBJECTS) $(DEPS) - -.s.o: - $(AS) $(CPU) -o $@ $< - -.c.o: - $(CC) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu99 $(INCLUDE_PATHS) -o $@ $< - -.cpp.o: - $(CPP) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu++98 -fno-rtti $(INCLUDE_PATHS) -o $@ $< - - -$(PROJECT).elf: $(OBJECTS) $(SYS_OBJECTS) - $(LD) $(LD_FLAGS) -T$(LINKER_SCRIPT) $(LIBRARY_PATHS) -o $@ $^ $(LIBRARIES) $(LD_SYS_LIBS) $(LIBRARIES) $(LD_SYS_LIBS) - $(SIZE) $@ - -$(PROJECT).bin: $(PROJECT).elf - @$(OBJCOPY) -O binary $< $@ - -$(PROJECT).hex: $(PROJECT).elf - @$(OBJCOPY) -O ihex $< $@ - -$(PROJECT).lst: $(PROJECT).elf - @$(OBJDUMP) -Sdh $< > $@ - -lst: $(PROJECT).lst - -size: - $(SIZE) $(PROJECT).elf - -DEPS = $(OBJECTS:.o=.d) $(SYS_OBJECTS:.o=.d) --include $(DEPS) - +{% extends "gcc_arm_common.tmpl" %} diff --git a/workspace_tools/export/gcc_arm_hrm1017.tmpl b/workspace_tools/export/gcc_arm_hrm1017.tmpl index d49e213bd7..0c6a037291 100644 --- a/workspace_tools/export/gcc_arm_hrm1017.tmpl +++ b/workspace_tools/export/gcc_arm_hrm1017.tmpl @@ -1,76 +1,14 @@ -# This file was automagically generated by mbed.org. For more information, -# see http://mbed.org/handbook/Exporting-to-GCC-ARM-Embedded +{% extends "gcc_arm_common.tmpl" %} -GCC_BIN = -PROJECT = {{name}} -OBJECTS = {% for f in to_be_compiled %}{{f}} {% endfor %} -SYS_OBJECTS = {% for f in object_files %}{{f}} {% endfor %} -INCLUDE_PATHS = {% for p in include_paths %}-I{{p}} {% endfor %} -LIBRARY_PATHS = {% for p in library_paths %}-L{{p}} {% endfor %} -LIBRARIES = {% for lib in libraries %}-l{{lib}} {% endfor %} -LINKER_SCRIPT = {{linker_script}} +{% block additional_variables %} SOFTDEVICE = mbed/TARGET_HRM1017/TARGET_NORDIC/TARGET_MCU_NRF51822/Lib/s110_nrf51822_7_1_0/s110_nrf51822_7.1.0_softdevice.hex +{% endblock %} -############################################################################### -AS = $(GCC_BIN)arm-none-eabi-as -CC = $(GCC_BIN)arm-none-eabi-gcc -CPP = $(GCC_BIN)arm-none-eabi-g++ -LD = $(GCC_BIN)arm-none-eabi-gcc -OBJCOPY = $(GCC_BIN)arm-none-eabi-objcopy -OBJDUMP = $(GCC_BIN)arm-none-eabi-objdump -SIZE = $(GCC_BIN)arm-none-eabi-size +{% block additional_executables %} SREC_CAT = srec_cat +{% endblock %} -CPU = -mcpu=cortex-m0 -mthumb -CC_FLAGS = $(CPU) -c -g -fno-common -fmessage-length=0 -Wall -fno-exceptions -ffunction-sections -fdata-sections -fomit-frame-pointer -CC_FLAGS += -MMD -MP -CC_SYMBOLS = {% for s in symbols %}-D{{s}} {% endfor %} - -LD_FLAGS = $(CPU) -Wl,--gc-sections -Wl,--wrap=main --specs=nano.specs -u _printf_float -u _scanf_float -LD_FLAGS += -Wl,-Map=$(PROJECT).map,--cref -LD_SYS_LIBS = -lstdc++ -lsupc++ -lm -lc -lgcc -lnosys - -ifeq ($(DEBUG), 1) - CC_FLAGS += -DDEBUG -O0 -else - CC_FLAGS += -DNDEBUG -Os -endif - -all: $(PROJECT).bin $(PROJECT).hex - -clean: - rm -f $(PROJECT).bin $(PROJECT).elf $(PROJECT).hex $(PROJECT).map $(PROJECT).lst $(OBJECTS) $(DEPS) - -.s.o: - $(AS) $(CPU) -o $@ $< - -.c.o: - $(CC) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu99 $(INCLUDE_PATHS) -o $@ $< - -.cpp.o: - $(CPP) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu++98 -fno-rtti $(INCLUDE_PATHS) -o $@ $< - - -$(PROJECT).elf: $(OBJECTS) $(SYS_OBJECTS) - $(LD) $(LD_FLAGS) -T$(LINKER_SCRIPT) $(LIBRARY_PATHS) -o $@ $^ $(LIBRARIES) $(LD_SYS_LIBS) $(LIBRARIES) $(LD_SYS_LIBS) - $(SIZE) $@ - -$(PROJECT).bin: $(PROJECT).elf - @$(OBJCOPY) -O binary $< $@ - -$(PROJECT).hex: $(PROJECT).elf - @$(OBJCOPY) -O ihex $< $@ - -$(PROJECT).lst: $(PROJECT).elf - @$(OBJDUMP) -Sdh $< > $@ - -lst: $(PROJECT).lst - -size: - $(SIZE) $(PROJECT).elf - -DEPS = $(OBJECTS:.o=.d) $(SYS_OBJECTS:.o=.d) --include $(DEPS) - +{% block additional_targets %} merge: $(SREC_CAT) $(SOFTDEVICE) -intel $(PROJECT).hex -intel -o combined.hex -intel --line-length=44 +{% endblock %} diff --git a/workspace_tools/export/gcc_arm_k20d50m.tmpl b/workspace_tools/export/gcc_arm_k20d50m.tmpl index eaabe00d9f..47ed5cfa17 100644 --- a/workspace_tools/export/gcc_arm_k20d50m.tmpl +++ b/workspace_tools/export/gcc_arm_k20d50m.tmpl @@ -1,72 +1,4 @@ -# This file was automagically generated by mbed.org. For more information, -# see http://mbed.org/handbook/Exporting-to-GCC-ARM-Embedded - -GCC_BIN = -PROJECT = {{name}} -OBJECTS = {% for f in to_be_compiled %}{{f}} {% endfor %} -SYS_OBJECTS = {% for f in object_files %}{{f}} {% endfor %} -INCLUDE_PATHS = {% for p in include_paths %}-I{{p}} {% endfor %} -LIBRARY_PATHS = {% for p in library_paths %}-L{{p}} {% endfor %} -LIBRARIES = {% for lib in libraries %}-l{{lib}} {% endfor %} -LINKER_SCRIPT = {{linker_script}} - -############################################################################### -AS = $(GCC_BIN)arm-none-eabi-as -CC = $(GCC_BIN)arm-none-eabi-gcc -CPP = $(GCC_BIN)arm-none-eabi-g++ -LD = $(GCC_BIN)arm-none-eabi-gcc -OBJCOPY = $(GCC_BIN)arm-none-eabi-objcopy -OBJDUMP = $(GCC_BIN)arm-none-eabi-objdump -SIZE = $(GCC_BIN)arm-none-eabi-size - -CPU = -mcpu=cortex-m4 -mthumb -CC_FLAGS = $(CPU) -c -g -fno-common -fmessage-length=0 -Wall -fno-exceptions -ffunction-sections -fdata-sections -fomit-frame-pointer -CC_FLAGS += -MMD -MP -CC_SYMBOLS = {% for s in symbols %}-D{{s}} {% endfor %} - -LD_FLAGS = $(CPU) -Wl,--gc-sections --specs=nano.specs -u _printf_float -u _scanf_float -Wl,--wrap,main -LD_FLAGS += -Wl,-Map=$(PROJECT).map,--cref -LD_SYS_LIBS = -lstdc++ -lsupc++ -lm -lc -lgcc -lnosys - -ifeq ($(DEBUG), 1) - CC_FLAGS += -DDEBUG -O0 -else - CC_FLAGS += -DNDEBUG -Os -endif - -all: $(PROJECT).bin $(PROJECT).hex - -clean: - rm -f $(PROJECT).bin $(PROJECT).elf $(PROJECT).hex $(PROJECT).map $(PROJECT).lst $(OBJECTS) $(DEPS) - -.s.o: - $(AS) $(CPU) -o $@ $< - -.c.o: - $(CC) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu99 $(INCLUDE_PATHS) -o $@ $< - -.cpp.o: - $(CPP) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu++98 -fno-rtti $(INCLUDE_PATHS) -o $@ $< - - -$(PROJECT).elf: $(OBJECTS) $(SYS_OBJECTS) - $(LD) $(LD_FLAGS) -T$(LINKER_SCRIPT) $(LIBRARY_PATHS) -o $@ $^ $(LIBRARIES) $(LD_SYS_LIBS) $(LIBRARIES) $(LD_SYS_LIBS) - $(SIZE) $@ - -$(PROJECT).bin: $(PROJECT).elf - @$(OBJCOPY) -O binary $< $@ - -$(PROJECT).hex: $(PROJECT).elf - @$(OBJCOPY) -O ihex $< $@ - -$(PROJECT).lst: $(PROJECT).elf - @$(OBJDUMP) -Sdh $< > $@ - -lst: $(PROJECT).lst - -size: - $(SIZE) $(PROJECT).elf - -DEPS = $(OBJECTS:.o=.d) $(SYS_OBJECTS:.o=.d) --include $(DEPS) +{% extends "gcc_arm_common.tmpl" %} +{% block hardfp %}{% endblock %} +{% block cpu %}-mcpu=cortex-m4 -mthumb{% endblock %} diff --git a/workspace_tools/export/gcc_arm_k22f.tmpl b/workspace_tools/export/gcc_arm_k22f.tmpl index f6f0c4d606..6e616cc884 100644 --- a/workspace_tools/export/gcc_arm_k22f.tmpl +++ b/workspace_tools/export/gcc_arm_k22f.tmpl @@ -1,72 +1 @@ -# This file was automagically generated by mbed.org. For more information, -# see http://mbed.org/handbook/Exporting-to-GCC-ARM-Embedded - -GCC_BIN = -PROJECT = {{name}} -OBJECTS = {% for f in to_be_compiled %}{{f}} {% endfor %} -SYS_OBJECTS = {% for f in object_files %}{{f}} {% endfor %} -INCLUDE_PATHS = {% for p in include_paths %}-I{{p}} {% endfor %} -LIBRARY_PATHS = {% for p in library_paths %}-L{{p}} {% endfor %} -LIBRARIES = {% for lib in libraries %}-l{{lib}} {% endfor %} -LINKER_SCRIPT = {{linker_script}} - -############################################################################### -AS = $(GCC_BIN)arm-none-eabi-as -CC = $(GCC_BIN)arm-none-eabi-gcc -CPP = $(GCC_BIN)arm-none-eabi-g++ -LD = $(GCC_BIN)arm-none-eabi-gcc -OBJCOPY = $(GCC_BIN)arm-none-eabi-objcopy -OBJDUMP = $(GCC_BIN)arm-none-eabi-objdump -SIZE = $(GCC_BIN)arm-none-eabi-size - -CPU = -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=softfp -CC_FLAGS = $(CPU) -c -g -fno-common -fmessage-length=0 -Wall -fno-exceptions -ffunction-sections -fdata-sections -fomit-frame-pointer -CC_FLAGS += -MMD -MP -CC_SYMBOLS = {% for s in symbols %}-D{{s}} {% endfor %} - -LD_FLAGS = $(CPU) -Wl,--gc-sections --specs=nano.specs -u _printf_float -u _scanf_float -Wl,--wrap,main -LD_FLAGS += -Wl,-Map=$(PROJECT).map,--cref -LD_SYS_LIBS = -lstdc++ -lsupc++ -lm -lc -lgcc -lnosys - -ifeq ($(DEBUG), 1) - CC_FLAGS += -DDEBUG -O0 -else - CC_FLAGS += -DNDEBUG -Os -endif - -all: $(PROJECT).bin $(PROJECT).hex - -clean: - rm -f $(PROJECT).bin $(PROJECT).elf $(PROJECT).hex $(PROJECT).map $(PROJECT).lst $(OBJECTS) $(DEPS) - -.s.o: - $(AS) $(CPU) -o $@ $< - -.c.o: - $(CC) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu99 $(INCLUDE_PATHS) -o $@ $< - -.cpp.o: - $(CPP) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu++98 -fno-rtti $(INCLUDE_PATHS) -o $@ $< - - -$(PROJECT).elf: $(OBJECTS) $(SYS_OBJECTS) - $(LD) $(LD_FLAGS) -T$(LINKER_SCRIPT) $(LIBRARY_PATHS) -o $@ $^ $(LIBRARIES) $(LD_SYS_LIBS) $(LIBRARIES) $(LD_SYS_LIBS) - $(SIZE) $@ - -$(PROJECT).bin: $(PROJECT).elf - @$(OBJCOPY) -O binary $< $@ - -$(PROJECT).hex: $(PROJECT).elf - @$(OBJCOPY) -O ihex $< $@ - -$(PROJECT).lst: $(PROJECT).elf - @$(OBJDUMP) -Sdh $< > $@ - -lst: $(PROJECT).lst - -size: - $(SIZE) $(PROJECT).elf - -DEPS = $(OBJECTS:.o=.d) $(SYS_OBJECTS:.o=.d) --include $(DEPS) - +{% extends "gcc_arm_common.tmpl" %} diff --git a/workspace_tools/export/gcc_arm_k64f.tmpl b/workspace_tools/export/gcc_arm_k64f.tmpl index f6f0c4d606..6e616cc884 100644 --- a/workspace_tools/export/gcc_arm_k64f.tmpl +++ b/workspace_tools/export/gcc_arm_k64f.tmpl @@ -1,72 +1 @@ -# This file was automagically generated by mbed.org. For more information, -# see http://mbed.org/handbook/Exporting-to-GCC-ARM-Embedded - -GCC_BIN = -PROJECT = {{name}} -OBJECTS = {% for f in to_be_compiled %}{{f}} {% endfor %} -SYS_OBJECTS = {% for f in object_files %}{{f}} {% endfor %} -INCLUDE_PATHS = {% for p in include_paths %}-I{{p}} {% endfor %} -LIBRARY_PATHS = {% for p in library_paths %}-L{{p}} {% endfor %} -LIBRARIES = {% for lib in libraries %}-l{{lib}} {% endfor %} -LINKER_SCRIPT = {{linker_script}} - -############################################################################### -AS = $(GCC_BIN)arm-none-eabi-as -CC = $(GCC_BIN)arm-none-eabi-gcc -CPP = $(GCC_BIN)arm-none-eabi-g++ -LD = $(GCC_BIN)arm-none-eabi-gcc -OBJCOPY = $(GCC_BIN)arm-none-eabi-objcopy -OBJDUMP = $(GCC_BIN)arm-none-eabi-objdump -SIZE = $(GCC_BIN)arm-none-eabi-size - -CPU = -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=softfp -CC_FLAGS = $(CPU) -c -g -fno-common -fmessage-length=0 -Wall -fno-exceptions -ffunction-sections -fdata-sections -fomit-frame-pointer -CC_FLAGS += -MMD -MP -CC_SYMBOLS = {% for s in symbols %}-D{{s}} {% endfor %} - -LD_FLAGS = $(CPU) -Wl,--gc-sections --specs=nano.specs -u _printf_float -u _scanf_float -Wl,--wrap,main -LD_FLAGS += -Wl,-Map=$(PROJECT).map,--cref -LD_SYS_LIBS = -lstdc++ -lsupc++ -lm -lc -lgcc -lnosys - -ifeq ($(DEBUG), 1) - CC_FLAGS += -DDEBUG -O0 -else - CC_FLAGS += -DNDEBUG -Os -endif - -all: $(PROJECT).bin $(PROJECT).hex - -clean: - rm -f $(PROJECT).bin $(PROJECT).elf $(PROJECT).hex $(PROJECT).map $(PROJECT).lst $(OBJECTS) $(DEPS) - -.s.o: - $(AS) $(CPU) -o $@ $< - -.c.o: - $(CC) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu99 $(INCLUDE_PATHS) -o $@ $< - -.cpp.o: - $(CPP) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu++98 -fno-rtti $(INCLUDE_PATHS) -o $@ $< - - -$(PROJECT).elf: $(OBJECTS) $(SYS_OBJECTS) - $(LD) $(LD_FLAGS) -T$(LINKER_SCRIPT) $(LIBRARY_PATHS) -o $@ $^ $(LIBRARIES) $(LD_SYS_LIBS) $(LIBRARIES) $(LD_SYS_LIBS) - $(SIZE) $@ - -$(PROJECT).bin: $(PROJECT).elf - @$(OBJCOPY) -O binary $< $@ - -$(PROJECT).hex: $(PROJECT).elf - @$(OBJCOPY) -O ihex $< $@ - -$(PROJECT).lst: $(PROJECT).elf - @$(OBJDUMP) -Sdh $< > $@ - -lst: $(PROJECT).lst - -size: - $(SIZE) $(PROJECT).elf - -DEPS = $(OBJECTS:.o=.d) $(SYS_OBJECTS:.o=.d) --include $(DEPS) - +{% extends "gcc_arm_common.tmpl" %} diff --git a/workspace_tools/export/gcc_arm_kl05z.tmpl b/workspace_tools/export/gcc_arm_kl05z.tmpl index 09f43e63f0..6e616cc884 100644 --- a/workspace_tools/export/gcc_arm_kl05z.tmpl +++ b/workspace_tools/export/gcc_arm_kl05z.tmpl @@ -1,72 +1 @@ -# This file was automagically generated by mbed.org. For more information, -# see http://mbed.org/handbook/Exporting-to-GCC-ARM-Embedded - -GCC_BIN = -PROJECT = {{name}} -OBJECTS = {% for f in to_be_compiled %}{{f}} {% endfor %} -SYS_OBJECTS = {% for f in object_files %}{{f}} {% endfor %} -INCLUDE_PATHS = {% for p in include_paths %}-I{{p}} {% endfor %} -LIBRARY_PATHS = {% for p in library_paths %}-L{{p}} {% endfor %} -LIBRARIES = {% for lib in libraries %}-l{{lib}} {% endfor %} -LINKER_SCRIPT = {{linker_script}} - -############################################################################### -AS = $(GCC_BIN)arm-none-eabi-as -CC = $(GCC_BIN)arm-none-eabi-gcc -CPP = $(GCC_BIN)arm-none-eabi-g++ -LD = $(GCC_BIN)arm-none-eabi-gcc -OBJCOPY = $(GCC_BIN)arm-none-eabi-objcopy -OBJDUMP = $(GCC_BIN)arm-none-eabi-objdump -SIZE = $(GCC_BIN)arm-none-eabi-size - -CPU = -mcpu=cortex-m0plus -mthumb -CC_FLAGS = $(CPU) -c -g -fno-common -fmessage-length=0 -Wall -fno-exceptions -ffunction-sections -fdata-sections -fomit-frame-pointer -CC_FLAGS += -MMD -MP -CC_SYMBOLS = {% for s in symbols %}-D{{s}} {% endfor %} - -LD_FLAGS = $(CPU) -Wl,--gc-sections --specs=nano.specs -u _printf_float -u _scanf_float -Wl,--wrap,main -LD_FLAGS += -Wl,-Map=$(PROJECT).map,--cref -LD_SYS_LIBS = -lstdc++ -lsupc++ -lm -lc -lgcc -lnosys - -ifeq ($(DEBUG), 1) - CC_FLAGS += -DDEBUG -O0 -else - CC_FLAGS += -DNDEBUG -Os -endif - -all: $(PROJECT).bin $(PROJECT).hex - -clean: - rm -f $(PROJECT).bin $(PROJECT).elf $(PROJECT).hex $(PROJECT).map $(PROJECT).lst $(OBJECTS) $(DEPS) - -.s.o: - $(AS) $(CPU) -o $@ $< - -.c.o: - $(CC) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu99 $(INCLUDE_PATHS) -o $@ $< - -.cpp.o: - $(CPP) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu++98 -fno-rtti $(INCLUDE_PATHS) -o $@ $< - - -$(PROJECT).elf: $(OBJECTS) $(SYS_OBJECTS) - $(LD) $(LD_FLAGS) -T$(LINKER_SCRIPT) $(LIBRARY_PATHS) -o $@ $^ $(LIBRARIES) $(LD_SYS_LIBS) $(LIBRARIES) $(LD_SYS_LIBS) - $(SIZE) $@ - -$(PROJECT).bin: $(PROJECT).elf - @$(OBJCOPY) -O binary $< $@ - -$(PROJECT).hex: $(PROJECT).elf - @$(OBJCOPY) -O ihex $< $@ - -$(PROJECT).lst: $(PROJECT).elf - @$(OBJDUMP) -Sdh $< > $@ - -lst: $(PROJECT).lst - -size: - $(SIZE) $(PROJECT).elf - -DEPS = $(OBJECTS:.o=.d) $(SYS_OBJECTS:.o=.d) --include $(DEPS) - +{% extends "gcc_arm_common.tmpl" %} diff --git a/workspace_tools/export/gcc_arm_kl25z.tmpl b/workspace_tools/export/gcc_arm_kl25z.tmpl index 09f43e63f0..6e616cc884 100644 --- a/workspace_tools/export/gcc_arm_kl25z.tmpl +++ b/workspace_tools/export/gcc_arm_kl25z.tmpl @@ -1,72 +1 @@ -# This file was automagically generated by mbed.org. For more information, -# see http://mbed.org/handbook/Exporting-to-GCC-ARM-Embedded - -GCC_BIN = -PROJECT = {{name}} -OBJECTS = {% for f in to_be_compiled %}{{f}} {% endfor %} -SYS_OBJECTS = {% for f in object_files %}{{f}} {% endfor %} -INCLUDE_PATHS = {% for p in include_paths %}-I{{p}} {% endfor %} -LIBRARY_PATHS = {% for p in library_paths %}-L{{p}} {% endfor %} -LIBRARIES = {% for lib in libraries %}-l{{lib}} {% endfor %} -LINKER_SCRIPT = {{linker_script}} - -############################################################################### -AS = $(GCC_BIN)arm-none-eabi-as -CC = $(GCC_BIN)arm-none-eabi-gcc -CPP = $(GCC_BIN)arm-none-eabi-g++ -LD = $(GCC_BIN)arm-none-eabi-gcc -OBJCOPY = $(GCC_BIN)arm-none-eabi-objcopy -OBJDUMP = $(GCC_BIN)arm-none-eabi-objdump -SIZE = $(GCC_BIN)arm-none-eabi-size - -CPU = -mcpu=cortex-m0plus -mthumb -CC_FLAGS = $(CPU) -c -g -fno-common -fmessage-length=0 -Wall -fno-exceptions -ffunction-sections -fdata-sections -fomit-frame-pointer -CC_FLAGS += -MMD -MP -CC_SYMBOLS = {% for s in symbols %}-D{{s}} {% endfor %} - -LD_FLAGS = $(CPU) -Wl,--gc-sections --specs=nano.specs -u _printf_float -u _scanf_float -Wl,--wrap,main -LD_FLAGS += -Wl,-Map=$(PROJECT).map,--cref -LD_SYS_LIBS = -lstdc++ -lsupc++ -lm -lc -lgcc -lnosys - -ifeq ($(DEBUG), 1) - CC_FLAGS += -DDEBUG -O0 -else - CC_FLAGS += -DNDEBUG -Os -endif - -all: $(PROJECT).bin $(PROJECT).hex - -clean: - rm -f $(PROJECT).bin $(PROJECT).elf $(PROJECT).hex $(PROJECT).map $(PROJECT).lst $(OBJECTS) $(DEPS) - -.s.o: - $(AS) $(CPU) -o $@ $< - -.c.o: - $(CC) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu99 $(INCLUDE_PATHS) -o $@ $< - -.cpp.o: - $(CPP) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu++98 -fno-rtti $(INCLUDE_PATHS) -o $@ $< - - -$(PROJECT).elf: $(OBJECTS) $(SYS_OBJECTS) - $(LD) $(LD_FLAGS) -T$(LINKER_SCRIPT) $(LIBRARY_PATHS) -o $@ $^ $(LIBRARIES) $(LD_SYS_LIBS) $(LIBRARIES) $(LD_SYS_LIBS) - $(SIZE) $@ - -$(PROJECT).bin: $(PROJECT).elf - @$(OBJCOPY) -O binary $< $@ - -$(PROJECT).hex: $(PROJECT).elf - @$(OBJCOPY) -O ihex $< $@ - -$(PROJECT).lst: $(PROJECT).elf - @$(OBJDUMP) -Sdh $< > $@ - -lst: $(PROJECT).lst - -size: - $(SIZE) $(PROJECT).elf - -DEPS = $(OBJECTS:.o=.d) $(SYS_OBJECTS:.o=.d) --include $(DEPS) - +{% extends "gcc_arm_common.tmpl" %} diff --git a/workspace_tools/export/gcc_arm_kl43z.tmpl b/workspace_tools/export/gcc_arm_kl43z.tmpl index 09f43e63f0..6e616cc884 100644 --- a/workspace_tools/export/gcc_arm_kl43z.tmpl +++ b/workspace_tools/export/gcc_arm_kl43z.tmpl @@ -1,72 +1 @@ -# This file was automagically generated by mbed.org. For more information, -# see http://mbed.org/handbook/Exporting-to-GCC-ARM-Embedded - -GCC_BIN = -PROJECT = {{name}} -OBJECTS = {% for f in to_be_compiled %}{{f}} {% endfor %} -SYS_OBJECTS = {% for f in object_files %}{{f}} {% endfor %} -INCLUDE_PATHS = {% for p in include_paths %}-I{{p}} {% endfor %} -LIBRARY_PATHS = {% for p in library_paths %}-L{{p}} {% endfor %} -LIBRARIES = {% for lib in libraries %}-l{{lib}} {% endfor %} -LINKER_SCRIPT = {{linker_script}} - -############################################################################### -AS = $(GCC_BIN)arm-none-eabi-as -CC = $(GCC_BIN)arm-none-eabi-gcc -CPP = $(GCC_BIN)arm-none-eabi-g++ -LD = $(GCC_BIN)arm-none-eabi-gcc -OBJCOPY = $(GCC_BIN)arm-none-eabi-objcopy -OBJDUMP = $(GCC_BIN)arm-none-eabi-objdump -SIZE = $(GCC_BIN)arm-none-eabi-size - -CPU = -mcpu=cortex-m0plus -mthumb -CC_FLAGS = $(CPU) -c -g -fno-common -fmessage-length=0 -Wall -fno-exceptions -ffunction-sections -fdata-sections -fomit-frame-pointer -CC_FLAGS += -MMD -MP -CC_SYMBOLS = {% for s in symbols %}-D{{s}} {% endfor %} - -LD_FLAGS = $(CPU) -Wl,--gc-sections --specs=nano.specs -u _printf_float -u _scanf_float -Wl,--wrap,main -LD_FLAGS += -Wl,-Map=$(PROJECT).map,--cref -LD_SYS_LIBS = -lstdc++ -lsupc++ -lm -lc -lgcc -lnosys - -ifeq ($(DEBUG), 1) - CC_FLAGS += -DDEBUG -O0 -else - CC_FLAGS += -DNDEBUG -Os -endif - -all: $(PROJECT).bin $(PROJECT).hex - -clean: - rm -f $(PROJECT).bin $(PROJECT).elf $(PROJECT).hex $(PROJECT).map $(PROJECT).lst $(OBJECTS) $(DEPS) - -.s.o: - $(AS) $(CPU) -o $@ $< - -.c.o: - $(CC) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu99 $(INCLUDE_PATHS) -o $@ $< - -.cpp.o: - $(CPP) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu++98 -fno-rtti $(INCLUDE_PATHS) -o $@ $< - - -$(PROJECT).elf: $(OBJECTS) $(SYS_OBJECTS) - $(LD) $(LD_FLAGS) -T$(LINKER_SCRIPT) $(LIBRARY_PATHS) -o $@ $^ $(LIBRARIES) $(LD_SYS_LIBS) $(LIBRARIES) $(LD_SYS_LIBS) - $(SIZE) $@ - -$(PROJECT).bin: $(PROJECT).elf - @$(OBJCOPY) -O binary $< $@ - -$(PROJECT).hex: $(PROJECT).elf - @$(OBJCOPY) -O ihex $< $@ - -$(PROJECT).lst: $(PROJECT).elf - @$(OBJDUMP) -Sdh $< > $@ - -lst: $(PROJECT).lst - -size: - $(SIZE) $(PROJECT).elf - -DEPS = $(OBJECTS:.o=.d) $(SYS_OBJECTS:.o=.d) --include $(DEPS) - +{% extends "gcc_arm_common.tmpl" %} diff --git a/workspace_tools/export/gcc_arm_kl46z.tmpl b/workspace_tools/export/gcc_arm_kl46z.tmpl index 09f43e63f0..6e616cc884 100644 --- a/workspace_tools/export/gcc_arm_kl46z.tmpl +++ b/workspace_tools/export/gcc_arm_kl46z.tmpl @@ -1,72 +1 @@ -# This file was automagically generated by mbed.org. For more information, -# see http://mbed.org/handbook/Exporting-to-GCC-ARM-Embedded - -GCC_BIN = -PROJECT = {{name}} -OBJECTS = {% for f in to_be_compiled %}{{f}} {% endfor %} -SYS_OBJECTS = {% for f in object_files %}{{f}} {% endfor %} -INCLUDE_PATHS = {% for p in include_paths %}-I{{p}} {% endfor %} -LIBRARY_PATHS = {% for p in library_paths %}-L{{p}} {% endfor %} -LIBRARIES = {% for lib in libraries %}-l{{lib}} {% endfor %} -LINKER_SCRIPT = {{linker_script}} - -############################################################################### -AS = $(GCC_BIN)arm-none-eabi-as -CC = $(GCC_BIN)arm-none-eabi-gcc -CPP = $(GCC_BIN)arm-none-eabi-g++ -LD = $(GCC_BIN)arm-none-eabi-gcc -OBJCOPY = $(GCC_BIN)arm-none-eabi-objcopy -OBJDUMP = $(GCC_BIN)arm-none-eabi-objdump -SIZE = $(GCC_BIN)arm-none-eabi-size - -CPU = -mcpu=cortex-m0plus -mthumb -CC_FLAGS = $(CPU) -c -g -fno-common -fmessage-length=0 -Wall -fno-exceptions -ffunction-sections -fdata-sections -fomit-frame-pointer -CC_FLAGS += -MMD -MP -CC_SYMBOLS = {% for s in symbols %}-D{{s}} {% endfor %} - -LD_FLAGS = $(CPU) -Wl,--gc-sections --specs=nano.specs -u _printf_float -u _scanf_float -Wl,--wrap,main -LD_FLAGS += -Wl,-Map=$(PROJECT).map,--cref -LD_SYS_LIBS = -lstdc++ -lsupc++ -lm -lc -lgcc -lnosys - -ifeq ($(DEBUG), 1) - CC_FLAGS += -DDEBUG -O0 -else - CC_FLAGS += -DNDEBUG -Os -endif - -all: $(PROJECT).bin $(PROJECT).hex - -clean: - rm -f $(PROJECT).bin $(PROJECT).elf $(PROJECT).hex $(PROJECT).map $(PROJECT).lst $(OBJECTS) $(DEPS) - -.s.o: - $(AS) $(CPU) -o $@ $< - -.c.o: - $(CC) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu99 $(INCLUDE_PATHS) -o $@ $< - -.cpp.o: - $(CPP) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu++98 -fno-rtti $(INCLUDE_PATHS) -o $@ $< - - -$(PROJECT).elf: $(OBJECTS) $(SYS_OBJECTS) - $(LD) $(LD_FLAGS) -T$(LINKER_SCRIPT) $(LIBRARY_PATHS) -o $@ $^ $(LIBRARIES) $(LD_SYS_LIBS) $(LIBRARIES) $(LD_SYS_LIBS) - $(SIZE) $@ - -$(PROJECT).bin: $(PROJECT).elf - @$(OBJCOPY) -O binary $< $@ - -$(PROJECT).hex: $(PROJECT).elf - @$(OBJCOPY) -O ihex $< $@ - -$(PROJECT).lst: $(PROJECT).elf - @$(OBJDUMP) -Sdh $< > $@ - -lst: $(PROJECT).lst - -size: - $(SIZE) $(PROJECT).elf - -DEPS = $(OBJECTS:.o=.d) $(SYS_OBJECTS:.o=.d) --include $(DEPS) - +{% extends "gcc_arm_common.tmpl" %} diff --git a/workspace_tools/export/gcc_arm_lpc1114.tmpl b/workspace_tools/export/gcc_arm_lpc1114.tmpl index 0a7b317374..dbbc6daacb 100644 --- a/workspace_tools/export/gcc_arm_lpc1114.tmpl +++ b/workspace_tools/export/gcc_arm_lpc1114.tmpl @@ -1,78 +1,10 @@ -# This file was automagically generated by mbed.org. For more information, -# see http://mbed.org/handbook/Exporting-to-GCC-ARM-Embedded +{% extends "gcc_arm_common.tmpl" %} -GCC_BIN = -PROJECT = {{name}} -OBJECTS = {% for f in to_be_compiled %}{{f}} {% endfor %} -SYS_OBJECTS = {% for f in object_files %}{{f}} {% endfor %} -INCLUDE_PATHS = {% for p in include_paths %}-I{{p}} {% endfor %} -LIBRARY_PATHS = {% for p in library_paths %}-L{{p}} {% endfor %} -LIBRARIES = {% for lib in libraries %}-l{{lib}} {% endfor %} -LINKER_SCRIPT = {{linker_script}} - -############################################################################### -AS = $(GCC_BIN)arm-none-eabi-as -CC = $(GCC_BIN)arm-none-eabi-gcc -CPP = $(GCC_BIN)arm-none-eabi-g++ -LD = $(GCC_BIN)arm-none-eabi-gcc -OBJCOPY = $(GCC_BIN)arm-none-eabi-objcopy -OBJDUMP = $(GCC_BIN)arm-none-eabi-objdump -SIZE = $(GCC_BIN)arm-none-eabi-size - -CPU = -mcpu=cortex-m0 -mthumb -CC_FLAGS = $(CPU) -c -g -fno-common -fmessage-length=0 -Wall -fno-exceptions -ffunction-sections -fdata-sections -fomit-frame-pointer -CC_FLAGS += -MMD -MP -CC_SYMBOLS = {% for s in symbols %}-D{{s}} {% endfor %} - -LD_FLAGS = $(CPU) -Wl,--gc-sections --specs=nano.specs -Wl,--wrap,main -#LD_FLAGS += -u _printf_float -u _scanf_float -LD_FLAGS += -Wl,-Map=$(PROJECT).map,--cref -LD_SYS_LIBS = -lstdc++ -lsupc++ -lm -lc -lgcc -lnosys - -ifeq ($(DEBUG), 1) - CC_FLAGS += -DDEBUG -O0 -else - CC_FLAGS += -DNDEBUG -Os -endif - -all: $(PROJECT).bin $(PROJECT).hex - -clean: - rm -f $(PROJECT).bin $(PROJECT).elf $(PROJECT).hex $(PROJECT).map $(PROJECT).lst $(OBJECTS) $(DEPS) - -.s.o: - $(AS) $(CPU) -o $@ $< - -.c.o: - $(CC) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu99 $(INCLUDE_PATHS) -o $@ $< - -.cpp.o: - $(CPP) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu++98 -fno-rtti $(INCLUDE_PATHS) -o $@ $< - - -$(PROJECT).elf: $(OBJECTS) $(SYS_OBJECTS) - $(LD) $(LD_FLAGS) -T$(LINKER_SCRIPT) $(LIBRARY_PATHS) -o $@ $^ $(LIBRARIES) $(LD_SYS_LIBS) $(LIBRARIES) $(LD_SYS_LIBS) +{% block target_project_elf %} +{{ super() }} @echo "" @echo "*****" @echo "***** You must modify vector checksum value in *.bin and *.hex files." @echo "*****" @echo "" - $(SIZE) $@ - -$(PROJECT).bin: $(PROJECT).elf - @$(OBJCOPY) -O binary $< $@ - -$(PROJECT).hex: $(PROJECT).elf - @$(OBJCOPY) -O ihex $< $@ - -$(PROJECT).lst: $(PROJECT).elf - @$(OBJDUMP) -Sdh $< > $@ - -lst: $(PROJECT).lst - -size: - $(SIZE) $(PROJECT).elf - -DEPS = $(OBJECTS:.o=.d) $(SYS_OBJECTS:.o=.d) --include $(DEPS) - +{% endblock %} diff --git a/workspace_tools/export/gcc_arm_lpc11u24.tmpl b/workspace_tools/export/gcc_arm_lpc11u24.tmpl index 0a7b317374..dbbc6daacb 100644 --- a/workspace_tools/export/gcc_arm_lpc11u24.tmpl +++ b/workspace_tools/export/gcc_arm_lpc11u24.tmpl @@ -1,78 +1,10 @@ -# This file was automagically generated by mbed.org. For more information, -# see http://mbed.org/handbook/Exporting-to-GCC-ARM-Embedded +{% extends "gcc_arm_common.tmpl" %} -GCC_BIN = -PROJECT = {{name}} -OBJECTS = {% for f in to_be_compiled %}{{f}} {% endfor %} -SYS_OBJECTS = {% for f in object_files %}{{f}} {% endfor %} -INCLUDE_PATHS = {% for p in include_paths %}-I{{p}} {% endfor %} -LIBRARY_PATHS = {% for p in library_paths %}-L{{p}} {% endfor %} -LIBRARIES = {% for lib in libraries %}-l{{lib}} {% endfor %} -LINKER_SCRIPT = {{linker_script}} - -############################################################################### -AS = $(GCC_BIN)arm-none-eabi-as -CC = $(GCC_BIN)arm-none-eabi-gcc -CPP = $(GCC_BIN)arm-none-eabi-g++ -LD = $(GCC_BIN)arm-none-eabi-gcc -OBJCOPY = $(GCC_BIN)arm-none-eabi-objcopy -OBJDUMP = $(GCC_BIN)arm-none-eabi-objdump -SIZE = $(GCC_BIN)arm-none-eabi-size - -CPU = -mcpu=cortex-m0 -mthumb -CC_FLAGS = $(CPU) -c -g -fno-common -fmessage-length=0 -Wall -fno-exceptions -ffunction-sections -fdata-sections -fomit-frame-pointer -CC_FLAGS += -MMD -MP -CC_SYMBOLS = {% for s in symbols %}-D{{s}} {% endfor %} - -LD_FLAGS = $(CPU) -Wl,--gc-sections --specs=nano.specs -Wl,--wrap,main -#LD_FLAGS += -u _printf_float -u _scanf_float -LD_FLAGS += -Wl,-Map=$(PROJECT).map,--cref -LD_SYS_LIBS = -lstdc++ -lsupc++ -lm -lc -lgcc -lnosys - -ifeq ($(DEBUG), 1) - CC_FLAGS += -DDEBUG -O0 -else - CC_FLAGS += -DNDEBUG -Os -endif - -all: $(PROJECT).bin $(PROJECT).hex - -clean: - rm -f $(PROJECT).bin $(PROJECT).elf $(PROJECT).hex $(PROJECT).map $(PROJECT).lst $(OBJECTS) $(DEPS) - -.s.o: - $(AS) $(CPU) -o $@ $< - -.c.o: - $(CC) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu99 $(INCLUDE_PATHS) -o $@ $< - -.cpp.o: - $(CPP) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu++98 -fno-rtti $(INCLUDE_PATHS) -o $@ $< - - -$(PROJECT).elf: $(OBJECTS) $(SYS_OBJECTS) - $(LD) $(LD_FLAGS) -T$(LINKER_SCRIPT) $(LIBRARY_PATHS) -o $@ $^ $(LIBRARIES) $(LD_SYS_LIBS) $(LIBRARIES) $(LD_SYS_LIBS) +{% block target_project_elf %} +{{ super() }} @echo "" @echo "*****" @echo "***** You must modify vector checksum value in *.bin and *.hex files." @echo "*****" @echo "" - $(SIZE) $@ - -$(PROJECT).bin: $(PROJECT).elf - @$(OBJCOPY) -O binary $< $@ - -$(PROJECT).hex: $(PROJECT).elf - @$(OBJCOPY) -O ihex $< $@ - -$(PROJECT).lst: $(PROJECT).elf - @$(OBJDUMP) -Sdh $< > $@ - -lst: $(PROJECT).lst - -size: - $(SIZE) $(PROJECT).elf - -DEPS = $(OBJECTS:.o=.d) $(SYS_OBJECTS:.o=.d) --include $(DEPS) - +{% endblock %} diff --git a/workspace_tools/export/gcc_arm_lpc11u35_401.tmpl b/workspace_tools/export/gcc_arm_lpc11u35_401.tmpl index 0a7b317374..dbbc6daacb 100644 --- a/workspace_tools/export/gcc_arm_lpc11u35_401.tmpl +++ b/workspace_tools/export/gcc_arm_lpc11u35_401.tmpl @@ -1,78 +1,10 @@ -# This file was automagically generated by mbed.org. For more information, -# see http://mbed.org/handbook/Exporting-to-GCC-ARM-Embedded +{% extends "gcc_arm_common.tmpl" %} -GCC_BIN = -PROJECT = {{name}} -OBJECTS = {% for f in to_be_compiled %}{{f}} {% endfor %} -SYS_OBJECTS = {% for f in object_files %}{{f}} {% endfor %} -INCLUDE_PATHS = {% for p in include_paths %}-I{{p}} {% endfor %} -LIBRARY_PATHS = {% for p in library_paths %}-L{{p}} {% endfor %} -LIBRARIES = {% for lib in libraries %}-l{{lib}} {% endfor %} -LINKER_SCRIPT = {{linker_script}} - -############################################################################### -AS = $(GCC_BIN)arm-none-eabi-as -CC = $(GCC_BIN)arm-none-eabi-gcc -CPP = $(GCC_BIN)arm-none-eabi-g++ -LD = $(GCC_BIN)arm-none-eabi-gcc -OBJCOPY = $(GCC_BIN)arm-none-eabi-objcopy -OBJDUMP = $(GCC_BIN)arm-none-eabi-objdump -SIZE = $(GCC_BIN)arm-none-eabi-size - -CPU = -mcpu=cortex-m0 -mthumb -CC_FLAGS = $(CPU) -c -g -fno-common -fmessage-length=0 -Wall -fno-exceptions -ffunction-sections -fdata-sections -fomit-frame-pointer -CC_FLAGS += -MMD -MP -CC_SYMBOLS = {% for s in symbols %}-D{{s}} {% endfor %} - -LD_FLAGS = $(CPU) -Wl,--gc-sections --specs=nano.specs -Wl,--wrap,main -#LD_FLAGS += -u _printf_float -u _scanf_float -LD_FLAGS += -Wl,-Map=$(PROJECT).map,--cref -LD_SYS_LIBS = -lstdc++ -lsupc++ -lm -lc -lgcc -lnosys - -ifeq ($(DEBUG), 1) - CC_FLAGS += -DDEBUG -O0 -else - CC_FLAGS += -DNDEBUG -Os -endif - -all: $(PROJECT).bin $(PROJECT).hex - -clean: - rm -f $(PROJECT).bin $(PROJECT).elf $(PROJECT).hex $(PROJECT).map $(PROJECT).lst $(OBJECTS) $(DEPS) - -.s.o: - $(AS) $(CPU) -o $@ $< - -.c.o: - $(CC) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu99 $(INCLUDE_PATHS) -o $@ $< - -.cpp.o: - $(CPP) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu++98 -fno-rtti $(INCLUDE_PATHS) -o $@ $< - - -$(PROJECT).elf: $(OBJECTS) $(SYS_OBJECTS) - $(LD) $(LD_FLAGS) -T$(LINKER_SCRIPT) $(LIBRARY_PATHS) -o $@ $^ $(LIBRARIES) $(LD_SYS_LIBS) $(LIBRARIES) $(LD_SYS_LIBS) +{% block target_project_elf %} +{{ super() }} @echo "" @echo "*****" @echo "***** You must modify vector checksum value in *.bin and *.hex files." @echo "*****" @echo "" - $(SIZE) $@ - -$(PROJECT).bin: $(PROJECT).elf - @$(OBJCOPY) -O binary $< $@ - -$(PROJECT).hex: $(PROJECT).elf - @$(OBJCOPY) -O ihex $< $@ - -$(PROJECT).lst: $(PROJECT).elf - @$(OBJDUMP) -Sdh $< > $@ - -lst: $(PROJECT).lst - -size: - $(SIZE) $(PROJECT).elf - -DEPS = $(OBJECTS:.o=.d) $(SYS_OBJECTS:.o=.d) --include $(DEPS) - +{% endblock %} diff --git a/workspace_tools/export/gcc_arm_lpc11u35_501.tmpl b/workspace_tools/export/gcc_arm_lpc11u35_501.tmpl index 0a7b317374..dbbc6daacb 100644 --- a/workspace_tools/export/gcc_arm_lpc11u35_501.tmpl +++ b/workspace_tools/export/gcc_arm_lpc11u35_501.tmpl @@ -1,78 +1,10 @@ -# This file was automagically generated by mbed.org. For more information, -# see http://mbed.org/handbook/Exporting-to-GCC-ARM-Embedded +{% extends "gcc_arm_common.tmpl" %} -GCC_BIN = -PROJECT = {{name}} -OBJECTS = {% for f in to_be_compiled %}{{f}} {% endfor %} -SYS_OBJECTS = {% for f in object_files %}{{f}} {% endfor %} -INCLUDE_PATHS = {% for p in include_paths %}-I{{p}} {% endfor %} -LIBRARY_PATHS = {% for p in library_paths %}-L{{p}} {% endfor %} -LIBRARIES = {% for lib in libraries %}-l{{lib}} {% endfor %} -LINKER_SCRIPT = {{linker_script}} - -############################################################################### -AS = $(GCC_BIN)arm-none-eabi-as -CC = $(GCC_BIN)arm-none-eabi-gcc -CPP = $(GCC_BIN)arm-none-eabi-g++ -LD = $(GCC_BIN)arm-none-eabi-gcc -OBJCOPY = $(GCC_BIN)arm-none-eabi-objcopy -OBJDUMP = $(GCC_BIN)arm-none-eabi-objdump -SIZE = $(GCC_BIN)arm-none-eabi-size - -CPU = -mcpu=cortex-m0 -mthumb -CC_FLAGS = $(CPU) -c -g -fno-common -fmessage-length=0 -Wall -fno-exceptions -ffunction-sections -fdata-sections -fomit-frame-pointer -CC_FLAGS += -MMD -MP -CC_SYMBOLS = {% for s in symbols %}-D{{s}} {% endfor %} - -LD_FLAGS = $(CPU) -Wl,--gc-sections --specs=nano.specs -Wl,--wrap,main -#LD_FLAGS += -u _printf_float -u _scanf_float -LD_FLAGS += -Wl,-Map=$(PROJECT).map,--cref -LD_SYS_LIBS = -lstdc++ -lsupc++ -lm -lc -lgcc -lnosys - -ifeq ($(DEBUG), 1) - CC_FLAGS += -DDEBUG -O0 -else - CC_FLAGS += -DNDEBUG -Os -endif - -all: $(PROJECT).bin $(PROJECT).hex - -clean: - rm -f $(PROJECT).bin $(PROJECT).elf $(PROJECT).hex $(PROJECT).map $(PROJECT).lst $(OBJECTS) $(DEPS) - -.s.o: - $(AS) $(CPU) -o $@ $< - -.c.o: - $(CC) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu99 $(INCLUDE_PATHS) -o $@ $< - -.cpp.o: - $(CPP) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu++98 -fno-rtti $(INCLUDE_PATHS) -o $@ $< - - -$(PROJECT).elf: $(OBJECTS) $(SYS_OBJECTS) - $(LD) $(LD_FLAGS) -T$(LINKER_SCRIPT) $(LIBRARY_PATHS) -o $@ $^ $(LIBRARIES) $(LD_SYS_LIBS) $(LIBRARIES) $(LD_SYS_LIBS) +{% block target_project_elf %} +{{ super() }} @echo "" @echo "*****" @echo "***** You must modify vector checksum value in *.bin and *.hex files." @echo "*****" @echo "" - $(SIZE) $@ - -$(PROJECT).bin: $(PROJECT).elf - @$(OBJCOPY) -O binary $< $@ - -$(PROJECT).hex: $(PROJECT).elf - @$(OBJCOPY) -O ihex $< $@ - -$(PROJECT).lst: $(PROJECT).elf - @$(OBJDUMP) -Sdh $< > $@ - -lst: $(PROJECT).lst - -size: - $(SIZE) $(PROJECT).elf - -DEPS = $(OBJECTS:.o=.d) $(SYS_OBJECTS:.o=.d) --include $(DEPS) - +{% endblock %} diff --git a/workspace_tools/export/gcc_arm_lpc11u37h_401.tmpl b/workspace_tools/export/gcc_arm_lpc11u37h_401.tmpl index abdbbb11cb..58de54b6fc 100644 --- a/workspace_tools/export/gcc_arm_lpc11u37h_401.tmpl +++ b/workspace_tools/export/gcc_arm_lpc11u37h_401.tmpl @@ -1,76 +1,10 @@ -# This file was automagically generated by mbed.org. For more information, -# see http://mbed.org/handbook/Exporting-to-GCC-ARM-Embedded +{% extends "gcc_arm_common.tmpl" %} -GCC_BIN = -PROJECT = {{name}} -OBJECTS = {% for f in to_be_compiled %}{{f}} {% endfor %} -SYS_OBJECTS = {% for f in object_files %}{{f}} {% endfor %} -INCLUDE_PATHS = {% for p in include_paths %}-I{{p}} {% endfor %} -LIBRARY_PATHS = {% for p in library_paths %}-L{{p}} {% endfor %} -LIBRARIES = {% for lib in libraries %}-l{{lib}} {% endfor %} -LINKER_SCRIPT = {{linker_script}} - -############################################################################### -AS = $(GCC_BIN)arm-none-eabi-as -CC = $(GCC_BIN)arm-none-eabi-gcc -CPP = $(GCC_BIN)arm-none-eabi-g++ -LD = $(GCC_BIN)arm-none-eabi-gcc -OBJCOPY = $(GCC_BIN)arm-none-eabi-objcopy -OBJDUMP = $(GCC_BIN)arm-none-eabi-objdump -SIZE = $(GCC_BIN)arm-none-eabi-size - -CPU = -mcpu=cortex-m0 -mthumb -CC_FLAGS = $(CPU) -c -g -fno-common -fmessage-length=0 -Wall -fno-exceptions -ffunction-sections -fdata-sections -CC_FLAGS += -MMD -MP -CC_SYMBOLS = {% for s in symbols %}-D{{s}} {% endfor %} - -LD_FLAGS = -mcpu=cortex-m0 -mthumb -Wl,--gc-sections --specs=nano.specs -LD_FLAGS += -Wl,-Map=$(PROJECT).map,--cref -LD_SYS_LIBS = -lstdc++ -lsupc++ -lm -lc -lgcc -lnosys - -ifeq ($(DEBUG), 1) - CC_FLAGS += -DDEBUG -O0 -else - CC_FLAGS += -DNDEBUG -Os -endif - -all: $(PROJECT).bin $(PROJECT).hex size - -clean: - rm -f $(PROJECT).bin $(PROJECT).elf $(PROJECT).hex $(PROJECT).map $(PROJECT).lst $(OBJECTS) $(DEPS) - -.s.o: - $(AS) $(CPU) -o $@ $< - -.c.o: - $(CC) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu99 $(INCLUDE_PATHS) -o $@ $< - -.cpp.o: - $(CPP) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu++98 $(INCLUDE_PATHS) -o $@ $< - - -$(PROJECT).elf: $(OBJECTS) $(SYS_OBJECTS) - $(LD) $(LD_FLAGS) -T$(LINKER_SCRIPT) $(LIBRARY_PATHS) -o $@ $^ $(LIBRARIES) $(LD_SYS_LIBS) $(LIBRARIES) $(LD_SYS_LIBS) +{% block target_project_elf %} +{{ super() }} @echo "" @echo "*****" @echo "***** You must modify vector checksum value in *.bin and *.hex files." @echo "*****" @echo "" - -$(PROJECT).bin: $(PROJECT).elf - @$(OBJCOPY) -O binary $< $@ - -$(PROJECT).hex: $(PROJECT).elf - @$(OBJCOPY) -O ihex $< $@ - -$(PROJECT).lst: $(PROJECT).elf - @$(OBJDUMP) -Sdh $< > $@ - -lst: $(PROJECT).lst - -size: - $(SIZE) $(PROJECT).elf - -DEPS = $(OBJECTS:.o=.d) $(SYS_OBJECTS:.o=.d) --include $(DEPS) - +{% endblock %} \ No newline at end of file diff --git a/workspace_tools/export/gcc_arm_lpc1549.tmpl b/workspace_tools/export/gcc_arm_lpc1549.tmpl index b1fd0cb2ad..047a8150ab 100644 --- a/workspace_tools/export/gcc_arm_lpc1549.tmpl +++ b/workspace_tools/export/gcc_arm_lpc1549.tmpl @@ -1,77 +1,11 @@ -# This file was automagically generated by mbed.org. For more information, -# see http://mbed.org/handbook/Exporting-to-GCC-ARM-Embedded +{% extends "gcc_arm_common.tmpl" %} -GCC_BIN = -PROJECT = {{name}} -OBJECTS = {% for f in to_be_compiled %}{{f}} {% endfor %} -SYS_OBJECTS = {% for f in object_files %}{{f}} {% endfor %} -INCLUDE_PATHS = {% for p in include_paths %}-I{{p}} {% endfor %} -LIBRARY_PATHS = {% for p in library_paths %}-L{{p}} {% endfor %} -LIBRARIES = {% for lib in libraries %}-l{{lib}} {% endfor %} -LINKER_SCRIPT = {{linker_script}} - -############################################################################### -AS = $(GCC_BIN)arm-none-eabi-as -CC = $(GCC_BIN)arm-none-eabi-gcc -CPP = $(GCC_BIN)arm-none-eabi-g++ -LD = $(GCC_BIN)arm-none-eabi-gcc -OBJCOPY = $(GCC_BIN)arm-none-eabi-objcopy -OBJDUMP = $(GCC_BIN)arm-none-eabi-objdump -SIZE = $(GCC_BIN)arm-none-eabi-size - -CPU = -mcpu=cortex-m3 -mthumb -CC_FLAGS = $(CPU) -c -g -fno-common -fmessage-length=0 -Wall -fno-exceptions -ffunction-sections -fdata-sections -fomit-frame-pointer -CC_FLAGS += -MMD -MP -CC_SYMBOLS = {% for s in symbols %}-D{{s}} {% endfor %} - -LD_FLAGS = $(CPU) -Wl,--gc-sections --specs=nano.specs -u _printf_float -u _scanf_float -Wl,--wrap,main -LD_FLAGS += -Wl,-Map=$(PROJECT).map,--cref -LD_SYS_LIBS = -lstdc++ -lsupc++ -lm -lc -lgcc -lnosys - -ifeq ($(DEBUG), 1) - CC_FLAGS += -DDEBUG -O0 -else - CC_FLAGS += -DNDEBUG -Os -endif - -all: $(PROJECT).bin $(PROJECT).hex - -clean: - rm -f $(PROJECT).bin $(PROJECT).elf $(PROJECT).hex $(PROJECT).map $(PROJECT).lst $(OBJECTS) $(DEPS) - -.s.o: - $(AS) $(CPU) -o $@ $< - -.c.o: - $(CC) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu99 $(INCLUDE_PATHS) -o $@ $< - -.cpp.o: - $(CPP) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu++98 -fno-rtti $(INCLUDE_PATHS) -o $@ $< - - -$(PROJECT).elf: $(OBJECTS) $(SYS_OBJECTS) - $(LD) $(LD_FLAGS) -T$(LINKER_SCRIPT) $(LIBRARY_PATHS) -o $@ $^ $(LIBRARIES) $(LD_SYS_LIBS) $(LIBRARIES) $(LD_SYS_LIBS) +{% block target_project_elf %} +{{ super() }} @echo "" @echo "*****" @echo "***** You must modify vector checksum value in *.bin and *.hex files." @echo "*****" @echo "" - $(SIZE) $@ - -$(PROJECT).bin: $(PROJECT).elf - @$(OBJCOPY) -O binary $< $@ - -$(PROJECT).hex: $(PROJECT).elf - @$(OBJCOPY) -O ihex $< $@ - -$(PROJECT).lst: $(PROJECT).elf - @$(OBJDUMP) -Sdh $< > $@ - -lst: $(PROJECT).lst - -size: - $(SIZE) $(PROJECT).elf - -DEPS = $(OBJECTS:.o=.d) $(SYS_OBJECTS:.o=.d) --include $(DEPS) +{% endblock %} diff --git a/workspace_tools/export/gcc_arm_lpc1768.tmpl b/workspace_tools/export/gcc_arm_lpc1768.tmpl index b1fd0cb2ad..58de54b6fc 100644 --- a/workspace_tools/export/gcc_arm_lpc1768.tmpl +++ b/workspace_tools/export/gcc_arm_lpc1768.tmpl @@ -1,77 +1,10 @@ -# This file was automagically generated by mbed.org. For more information, -# see http://mbed.org/handbook/Exporting-to-GCC-ARM-Embedded +{% extends "gcc_arm_common.tmpl" %} -GCC_BIN = -PROJECT = {{name}} -OBJECTS = {% for f in to_be_compiled %}{{f}} {% endfor %} -SYS_OBJECTS = {% for f in object_files %}{{f}} {% endfor %} -INCLUDE_PATHS = {% for p in include_paths %}-I{{p}} {% endfor %} -LIBRARY_PATHS = {% for p in library_paths %}-L{{p}} {% endfor %} -LIBRARIES = {% for lib in libraries %}-l{{lib}} {% endfor %} -LINKER_SCRIPT = {{linker_script}} - -############################################################################### -AS = $(GCC_BIN)arm-none-eabi-as -CC = $(GCC_BIN)arm-none-eabi-gcc -CPP = $(GCC_BIN)arm-none-eabi-g++ -LD = $(GCC_BIN)arm-none-eabi-gcc -OBJCOPY = $(GCC_BIN)arm-none-eabi-objcopy -OBJDUMP = $(GCC_BIN)arm-none-eabi-objdump -SIZE = $(GCC_BIN)arm-none-eabi-size - -CPU = -mcpu=cortex-m3 -mthumb -CC_FLAGS = $(CPU) -c -g -fno-common -fmessage-length=0 -Wall -fno-exceptions -ffunction-sections -fdata-sections -fomit-frame-pointer -CC_FLAGS += -MMD -MP -CC_SYMBOLS = {% for s in symbols %}-D{{s}} {% endfor %} - -LD_FLAGS = $(CPU) -Wl,--gc-sections --specs=nano.specs -u _printf_float -u _scanf_float -Wl,--wrap,main -LD_FLAGS += -Wl,-Map=$(PROJECT).map,--cref -LD_SYS_LIBS = -lstdc++ -lsupc++ -lm -lc -lgcc -lnosys - -ifeq ($(DEBUG), 1) - CC_FLAGS += -DDEBUG -O0 -else - CC_FLAGS += -DNDEBUG -Os -endif - -all: $(PROJECT).bin $(PROJECT).hex - -clean: - rm -f $(PROJECT).bin $(PROJECT).elf $(PROJECT).hex $(PROJECT).map $(PROJECT).lst $(OBJECTS) $(DEPS) - -.s.o: - $(AS) $(CPU) -o $@ $< - -.c.o: - $(CC) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu99 $(INCLUDE_PATHS) -o $@ $< - -.cpp.o: - $(CPP) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu++98 -fno-rtti $(INCLUDE_PATHS) -o $@ $< - - -$(PROJECT).elf: $(OBJECTS) $(SYS_OBJECTS) - $(LD) $(LD_FLAGS) -T$(LINKER_SCRIPT) $(LIBRARY_PATHS) -o $@ $^ $(LIBRARIES) $(LD_SYS_LIBS) $(LIBRARIES) $(LD_SYS_LIBS) +{% block target_project_elf %} +{{ super() }} @echo "" @echo "*****" @echo "***** You must modify vector checksum value in *.bin and *.hex files." @echo "*****" @echo "" - $(SIZE) $@ - -$(PROJECT).bin: $(PROJECT).elf - @$(OBJCOPY) -O binary $< $@ - -$(PROJECT).hex: $(PROJECT).elf - @$(OBJCOPY) -O ihex $< $@ - -$(PROJECT).lst: $(PROJECT).elf - @$(OBJDUMP) -Sdh $< > $@ - -lst: $(PROJECT).lst - -size: - $(SIZE) $(PROJECT).elf - -DEPS = $(OBJECTS:.o=.d) $(SYS_OBJECTS:.o=.d) --include $(DEPS) - +{% endblock %} \ No newline at end of file diff --git a/workspace_tools/export/gcc_arm_lpc2368.tmpl b/workspace_tools/export/gcc_arm_lpc2368.tmpl index 98c466278f..6e616cc884 100644 --- a/workspace_tools/export/gcc_arm_lpc2368.tmpl +++ b/workspace_tools/export/gcc_arm_lpc2368.tmpl @@ -1,72 +1 @@ -# This file was automagically generated by mbed.org. For more information, -# see http://mbed.org/handbook/Exporting-to-GCC-ARM-Embedded - -GCC_BIN = -PROJECT = {{name}} -OBJECTS = {% for f in to_be_compiled %}{{f}} {% endfor %} -SYS_OBJECTS = {% for f in object_files %}{{f}} {% endfor %} -INCLUDE_PATHS = {% for p in include_paths %}-I{{p}} {% endfor %} -LIBRARY_PATHS = {% for p in library_paths %}-L{{p}} {% endfor %} -LIBRARIES = {% for lib in libraries %}-l{{lib}} {% endfor %} -LINKER_SCRIPT = {{linker_script}} - -############################################################################### -AS = $(GCC_BIN)arm-none-eabi-as -CC = $(GCC_BIN)arm-none-eabi-gcc -CPP = $(GCC_BIN)arm-none-eabi-g++ -LD = $(GCC_BIN)arm-none-eabi-gcc -OBJCOPY = $(GCC_BIN)arm-none-eabi-objcopy -OBJDUMP = $(GCC_BIN)arm-none-eabi-objdump -SIZE = $(GCC_BIN)arm-none-eabi-size - -CPU = -mcpu=arm7tdmi-s -CC_FLAGS = $(CPU) -c -g -fno-common -fmessage-length=0 -Wall -fno-exceptions -ffunction-sections -fdata-sections -fomit-frame-pointer -CC_FLAGS += -MMD -MP -CC_SYMBOLS = {% for s in symbols %}-D{{s}} {% endfor %} - -LD_FLAGS = $(CPU) -Wl,--gc-sections --specs=nano.specs -u _printf_float -u _scanf_float -Wl,--wrap,main -LD_FLAGS += -Wl,-Map=$(PROJECT).map,--cref -Wl,--entry=_start -LD_SYS_LIBS = -lstdc++ -lsupc++ -lm -lc -lgcc -lnosys - -ifeq ($(DEBUG), 1) - CC_FLAGS += -DDEBUG -O0 -else - CC_FLAGS += -DNDEBUG -Os -endif - -all: $(PROJECT).bin $(PROJECT).hex - -clean: - rm -f $(PROJECT).bin $(PROJECT).elf $(PROJECT).hex $(PROJECT).map $(PROJECT).lst $(OBJECTS) $(DEPS) - -.s.o: - $(AS) $(CPU) -o $@ $< - -.c.o: - $(CC) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu99 $(INCLUDE_PATHS) -o $@ $< - -.cpp.o: - $(CPP) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu++98 -fno-rtti $(INCLUDE_PATHS) -o $@ $< - - -$(PROJECT).elf: $(OBJECTS) $(SYS_OBJECTS) - $(LD) $(LD_FLAGS) -T$(LINKER_SCRIPT) $(LIBRARY_PATHS) -o $@ $^ $(LIBRARIES) $(LD_SYS_LIBS) $(LIBRARIES) $(LD_SYS_LIBS) - $(SIZE) $@ - -$(PROJECT).bin: $(PROJECT).elf - @$(OBJCOPY) -O binary $< $@ - -$(PROJECT).hex: $(PROJECT).elf - @$(OBJCOPY) -O ihex $< $@ - -$(PROJECT).lst: $(PROJECT).elf - @$(OBJDUMP) -Sdh $< > $@ - -lst: $(PROJECT).lst - -size: - $(SIZE) $(PROJECT).elf - -DEPS = $(OBJECTS:.o=.d) $(SYS_OBJECTS:.o=.d) --include $(DEPS) - +{% extends "gcc_arm_common.tmpl" %} diff --git a/workspace_tools/export/gcc_arm_lpc2460.tmpl b/workspace_tools/export/gcc_arm_lpc2460.tmpl index 98c466278f..6e616cc884 100644 --- a/workspace_tools/export/gcc_arm_lpc2460.tmpl +++ b/workspace_tools/export/gcc_arm_lpc2460.tmpl @@ -1,72 +1 @@ -# This file was automagically generated by mbed.org. For more information, -# see http://mbed.org/handbook/Exporting-to-GCC-ARM-Embedded - -GCC_BIN = -PROJECT = {{name}} -OBJECTS = {% for f in to_be_compiled %}{{f}} {% endfor %} -SYS_OBJECTS = {% for f in object_files %}{{f}} {% endfor %} -INCLUDE_PATHS = {% for p in include_paths %}-I{{p}} {% endfor %} -LIBRARY_PATHS = {% for p in library_paths %}-L{{p}} {% endfor %} -LIBRARIES = {% for lib in libraries %}-l{{lib}} {% endfor %} -LINKER_SCRIPT = {{linker_script}} - -############################################################################### -AS = $(GCC_BIN)arm-none-eabi-as -CC = $(GCC_BIN)arm-none-eabi-gcc -CPP = $(GCC_BIN)arm-none-eabi-g++ -LD = $(GCC_BIN)arm-none-eabi-gcc -OBJCOPY = $(GCC_BIN)arm-none-eabi-objcopy -OBJDUMP = $(GCC_BIN)arm-none-eabi-objdump -SIZE = $(GCC_BIN)arm-none-eabi-size - -CPU = -mcpu=arm7tdmi-s -CC_FLAGS = $(CPU) -c -g -fno-common -fmessage-length=0 -Wall -fno-exceptions -ffunction-sections -fdata-sections -fomit-frame-pointer -CC_FLAGS += -MMD -MP -CC_SYMBOLS = {% for s in symbols %}-D{{s}} {% endfor %} - -LD_FLAGS = $(CPU) -Wl,--gc-sections --specs=nano.specs -u _printf_float -u _scanf_float -Wl,--wrap,main -LD_FLAGS += -Wl,-Map=$(PROJECT).map,--cref -Wl,--entry=_start -LD_SYS_LIBS = -lstdc++ -lsupc++ -lm -lc -lgcc -lnosys - -ifeq ($(DEBUG), 1) - CC_FLAGS += -DDEBUG -O0 -else - CC_FLAGS += -DNDEBUG -Os -endif - -all: $(PROJECT).bin $(PROJECT).hex - -clean: - rm -f $(PROJECT).bin $(PROJECT).elf $(PROJECT).hex $(PROJECT).map $(PROJECT).lst $(OBJECTS) $(DEPS) - -.s.o: - $(AS) $(CPU) -o $@ $< - -.c.o: - $(CC) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu99 $(INCLUDE_PATHS) -o $@ $< - -.cpp.o: - $(CPP) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu++98 -fno-rtti $(INCLUDE_PATHS) -o $@ $< - - -$(PROJECT).elf: $(OBJECTS) $(SYS_OBJECTS) - $(LD) $(LD_FLAGS) -T$(LINKER_SCRIPT) $(LIBRARY_PATHS) -o $@ $^ $(LIBRARIES) $(LD_SYS_LIBS) $(LIBRARIES) $(LD_SYS_LIBS) - $(SIZE) $@ - -$(PROJECT).bin: $(PROJECT).elf - @$(OBJCOPY) -O binary $< $@ - -$(PROJECT).hex: $(PROJECT).elf - @$(OBJCOPY) -O ihex $< $@ - -$(PROJECT).lst: $(PROJECT).elf - @$(OBJDUMP) -Sdh $< > $@ - -lst: $(PROJECT).lst - -size: - $(SIZE) $(PROJECT).elf - -DEPS = $(OBJECTS:.o=.d) $(SYS_OBJECTS:.o=.d) --include $(DEPS) - +{% extends "gcc_arm_common.tmpl" %} diff --git a/workspace_tools/export/gcc_arm_lpc4088.tmpl b/workspace_tools/export/gcc_arm_lpc4088.tmpl index 19e4aed9a7..58de54b6fc 100644 --- a/workspace_tools/export/gcc_arm_lpc4088.tmpl +++ b/workspace_tools/export/gcc_arm_lpc4088.tmpl @@ -1,77 +1,10 @@ -# This file was automagically generated by mbed.org. For more information, -# see http://mbed.org/handbook/Exporting-to-GCC-ARM-Embedded +{% extends "gcc_arm_common.tmpl" %} -GCC_BIN = -PROJECT = {{name}} -OBJECTS = {% for f in to_be_compiled %}{{f}} {% endfor %} -SYS_OBJECTS = {% for f in object_files %}{{f}} {% endfor %} -INCLUDE_PATHS = {% for p in include_paths %}-I{{p}} {% endfor %} -LIBRARY_PATHS = {% for p in library_paths %}-L{{p}} {% endfor %} -LIBRARIES = {% for lib in libraries %}-l{{lib}} {% endfor %} -LINKER_SCRIPT = {{linker_script}} - -############################################################################### -AS = $(GCC_BIN)arm-none-eabi-as -CC = $(GCC_BIN)arm-none-eabi-gcc -CPP = $(GCC_BIN)arm-none-eabi-g++ -LD = $(GCC_BIN)arm-none-eabi-gcc -OBJCOPY = $(GCC_BIN)arm-none-eabi-objcopy -OBJDUMP = $(GCC_BIN)arm-none-eabi-objdump -SIZE = $(GCC_BIN)arm-none-eabi-size - -CPU = -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=softfp -CC_FLAGS = $(CPU) -c -g -fno-common -fmessage-length=0 -Wall -fno-exceptions -ffunction-sections -fdata-sections -fomit-frame-pointer -CC_FLAGS += -MMD -MP -CC_SYMBOLS = {% for s in symbols %}-D{{s}} {% endfor %} - -LD_FLAGS = $(CPU) -Wl,--gc-sections --specs=nano.specs -u _printf_float -u _scanf_float -Wl,--wrap,main -LD_FLAGS += -Wl,-Map=$(PROJECT).map,--cref -LD_SYS_LIBS = -lstdc++ -lsupc++ -lm -lc -lgcc -lnosys - -ifeq ($(DEBUG), 1) - CC_FLAGS += -DDEBUG -O0 -else - CC_FLAGS += -DNDEBUG -Os -endif - -all: $(PROJECT).bin $(PROJECT).hex - -clean: - rm -f $(PROJECT).bin $(PROJECT).elf $(PROJECT).hex $(PROJECT).map $(PROJECT).lst $(OBJECTS) $(DEPS) - -.s.o: - $(AS) $(CPU) -o $@ $< - -.c.o: - $(CC) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu99 $(INCLUDE_PATHS) -o $@ $< - -.cpp.o: - $(CPP) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu++98 -fno-rtti $(INCLUDE_PATHS) -o $@ $< - - -$(PROJECT).elf: $(OBJECTS) $(SYS_OBJECTS) - $(LD) $(LD_FLAGS) -T$(LINKER_SCRIPT) $(LIBRARY_PATHS) -o $@ $^ $(LIBRARIES) $(LD_SYS_LIBS) $(LIBRARIES) $(LD_SYS_LIBS) +{% block target_project_elf %} +{{ super() }} @echo "" @echo "*****" @echo "***** You must modify vector checksum value in *.bin and *.hex files." @echo "*****" @echo "" - $(SIZE) $@ - -$(PROJECT).bin: $(PROJECT).elf - @$(OBJCOPY) -O binary $< $@ - -$(PROJECT).hex: $(PROJECT).elf - @$(OBJCOPY) -O ihex $< $@ - -$(PROJECT).lst: $(PROJECT).elf - @$(OBJDUMP) -Sdh $< > $@ - -lst: $(PROJECT).lst - -size: - $(SIZE) $(PROJECT).elf - -DEPS = $(OBJECTS:.o=.d) $(SYS_OBJECTS:.o=.d) --include $(DEPS) - +{% endblock %} \ No newline at end of file diff --git a/workspace_tools/export/gcc_arm_lpc4088_dm.tmpl b/workspace_tools/export/gcc_arm_lpc4088_dm.tmpl index 19e4aed9a7..dbbc6daacb 100644 --- a/workspace_tools/export/gcc_arm_lpc4088_dm.tmpl +++ b/workspace_tools/export/gcc_arm_lpc4088_dm.tmpl @@ -1,77 +1,10 @@ -# This file was automagically generated by mbed.org. For more information, -# see http://mbed.org/handbook/Exporting-to-GCC-ARM-Embedded +{% extends "gcc_arm_common.tmpl" %} -GCC_BIN = -PROJECT = {{name}} -OBJECTS = {% for f in to_be_compiled %}{{f}} {% endfor %} -SYS_OBJECTS = {% for f in object_files %}{{f}} {% endfor %} -INCLUDE_PATHS = {% for p in include_paths %}-I{{p}} {% endfor %} -LIBRARY_PATHS = {% for p in library_paths %}-L{{p}} {% endfor %} -LIBRARIES = {% for lib in libraries %}-l{{lib}} {% endfor %} -LINKER_SCRIPT = {{linker_script}} - -############################################################################### -AS = $(GCC_BIN)arm-none-eabi-as -CC = $(GCC_BIN)arm-none-eabi-gcc -CPP = $(GCC_BIN)arm-none-eabi-g++ -LD = $(GCC_BIN)arm-none-eabi-gcc -OBJCOPY = $(GCC_BIN)arm-none-eabi-objcopy -OBJDUMP = $(GCC_BIN)arm-none-eabi-objdump -SIZE = $(GCC_BIN)arm-none-eabi-size - -CPU = -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=softfp -CC_FLAGS = $(CPU) -c -g -fno-common -fmessage-length=0 -Wall -fno-exceptions -ffunction-sections -fdata-sections -fomit-frame-pointer -CC_FLAGS += -MMD -MP -CC_SYMBOLS = {% for s in symbols %}-D{{s}} {% endfor %} - -LD_FLAGS = $(CPU) -Wl,--gc-sections --specs=nano.specs -u _printf_float -u _scanf_float -Wl,--wrap,main -LD_FLAGS += -Wl,-Map=$(PROJECT).map,--cref -LD_SYS_LIBS = -lstdc++ -lsupc++ -lm -lc -lgcc -lnosys - -ifeq ($(DEBUG), 1) - CC_FLAGS += -DDEBUG -O0 -else - CC_FLAGS += -DNDEBUG -Os -endif - -all: $(PROJECT).bin $(PROJECT).hex - -clean: - rm -f $(PROJECT).bin $(PROJECT).elf $(PROJECT).hex $(PROJECT).map $(PROJECT).lst $(OBJECTS) $(DEPS) - -.s.o: - $(AS) $(CPU) -o $@ $< - -.c.o: - $(CC) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu99 $(INCLUDE_PATHS) -o $@ $< - -.cpp.o: - $(CPP) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu++98 -fno-rtti $(INCLUDE_PATHS) -o $@ $< - - -$(PROJECT).elf: $(OBJECTS) $(SYS_OBJECTS) - $(LD) $(LD_FLAGS) -T$(LINKER_SCRIPT) $(LIBRARY_PATHS) -o $@ $^ $(LIBRARIES) $(LD_SYS_LIBS) $(LIBRARIES) $(LD_SYS_LIBS) +{% block target_project_elf %} +{{ super() }} @echo "" @echo "*****" @echo "***** You must modify vector checksum value in *.bin and *.hex files." @echo "*****" @echo "" - $(SIZE) $@ - -$(PROJECT).bin: $(PROJECT).elf - @$(OBJCOPY) -O binary $< $@ - -$(PROJECT).hex: $(PROJECT).elf - @$(OBJCOPY) -O ihex $< $@ - -$(PROJECT).lst: $(PROJECT).elf - @$(OBJDUMP) -Sdh $< > $@ - -lst: $(PROJECT).lst - -size: - $(SIZE) $(PROJECT).elf - -DEPS = $(OBJECTS:.o=.d) $(SYS_OBJECTS:.o=.d) --include $(DEPS) - +{% endblock %} diff --git a/workspace_tools/export/gcc_arm_lpc4330_m4.tmpl b/workspace_tools/export/gcc_arm_lpc4330_m4.tmpl index 19e4aed9a7..58de54b6fc 100644 --- a/workspace_tools/export/gcc_arm_lpc4330_m4.tmpl +++ b/workspace_tools/export/gcc_arm_lpc4330_m4.tmpl @@ -1,77 +1,10 @@ -# This file was automagically generated by mbed.org. For more information, -# see http://mbed.org/handbook/Exporting-to-GCC-ARM-Embedded +{% extends "gcc_arm_common.tmpl" %} -GCC_BIN = -PROJECT = {{name}} -OBJECTS = {% for f in to_be_compiled %}{{f}} {% endfor %} -SYS_OBJECTS = {% for f in object_files %}{{f}} {% endfor %} -INCLUDE_PATHS = {% for p in include_paths %}-I{{p}} {% endfor %} -LIBRARY_PATHS = {% for p in library_paths %}-L{{p}} {% endfor %} -LIBRARIES = {% for lib in libraries %}-l{{lib}} {% endfor %} -LINKER_SCRIPT = {{linker_script}} - -############################################################################### -AS = $(GCC_BIN)arm-none-eabi-as -CC = $(GCC_BIN)arm-none-eabi-gcc -CPP = $(GCC_BIN)arm-none-eabi-g++ -LD = $(GCC_BIN)arm-none-eabi-gcc -OBJCOPY = $(GCC_BIN)arm-none-eabi-objcopy -OBJDUMP = $(GCC_BIN)arm-none-eabi-objdump -SIZE = $(GCC_BIN)arm-none-eabi-size - -CPU = -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=softfp -CC_FLAGS = $(CPU) -c -g -fno-common -fmessage-length=0 -Wall -fno-exceptions -ffunction-sections -fdata-sections -fomit-frame-pointer -CC_FLAGS += -MMD -MP -CC_SYMBOLS = {% for s in symbols %}-D{{s}} {% endfor %} - -LD_FLAGS = $(CPU) -Wl,--gc-sections --specs=nano.specs -u _printf_float -u _scanf_float -Wl,--wrap,main -LD_FLAGS += -Wl,-Map=$(PROJECT).map,--cref -LD_SYS_LIBS = -lstdc++ -lsupc++ -lm -lc -lgcc -lnosys - -ifeq ($(DEBUG), 1) - CC_FLAGS += -DDEBUG -O0 -else - CC_FLAGS += -DNDEBUG -Os -endif - -all: $(PROJECT).bin $(PROJECT).hex - -clean: - rm -f $(PROJECT).bin $(PROJECT).elf $(PROJECT).hex $(PROJECT).map $(PROJECT).lst $(OBJECTS) $(DEPS) - -.s.o: - $(AS) $(CPU) -o $@ $< - -.c.o: - $(CC) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu99 $(INCLUDE_PATHS) -o $@ $< - -.cpp.o: - $(CPP) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu++98 -fno-rtti $(INCLUDE_PATHS) -o $@ $< - - -$(PROJECT).elf: $(OBJECTS) $(SYS_OBJECTS) - $(LD) $(LD_FLAGS) -T$(LINKER_SCRIPT) $(LIBRARY_PATHS) -o $@ $^ $(LIBRARIES) $(LD_SYS_LIBS) $(LIBRARIES) $(LD_SYS_LIBS) +{% block target_project_elf %} +{{ super() }} @echo "" @echo "*****" @echo "***** You must modify vector checksum value in *.bin and *.hex files." @echo "*****" @echo "" - $(SIZE) $@ - -$(PROJECT).bin: $(PROJECT).elf - @$(OBJCOPY) -O binary $< $@ - -$(PROJECT).hex: $(PROJECT).elf - @$(OBJCOPY) -O ihex $< $@ - -$(PROJECT).lst: $(PROJECT).elf - @$(OBJDUMP) -Sdh $< > $@ - -lst: $(PROJECT).lst - -size: - $(SIZE) $(PROJECT).elf - -DEPS = $(OBJECTS:.o=.d) $(SYS_OBJECTS:.o=.d) --include $(DEPS) - +{% endblock %} \ No newline at end of file diff --git a/workspace_tools/export/gcc_arm_lpc824.tmpl b/workspace_tools/export/gcc_arm_lpc824.tmpl index 6fffb9c742..58de54b6fc 100644 --- a/workspace_tools/export/gcc_arm_lpc824.tmpl +++ b/workspace_tools/export/gcc_arm_lpc824.tmpl @@ -1,77 +1,10 @@ -# This file was automagically generated by mbed.org. For more information, -# see http://mbed.org/handbook/Exporting-to-GCC-ARM-Embedded +{% extends "gcc_arm_common.tmpl" %} -GCC_BIN = -PROJECT = {{name}} -OBJECTS = {% for f in to_be_compiled %}{{f}} {% endfor %} -SYS_OBJECTS = {% for f in object_files %}{{f}} {% endfor %} -INCLUDE_PATHS = {% for p in include_paths %}-I{{p}} {% endfor %} -LIBRARY_PATHS = {% for p in library_paths %}-L{{p}} {% endfor %} -LIBRARIES = {% for lib in libraries %}-l{{lib}} {% endfor %} -LINKER_SCRIPT = {{linker_script}} - -############################################################################### -AS = $(GCC_BIN)arm-none-eabi-as -CC = $(GCC_BIN)arm-none-eabi-gcc -CPP = $(GCC_BIN)arm-none-eabi-g++ -LD = $(GCC_BIN)arm-none-eabi-gcc -OBJCOPY = $(GCC_BIN)arm-none-eabi-objcopy -OBJDUMP = $(GCC_BIN)arm-none-eabi-objdump -SIZE = $(GCC_BIN)arm-none-eabi-size - -CPU = -mcpu=cortex-m0plus -mthumb -CC_FLAGS = $(CPU) -c -g -fno-common -fmessage-length=0 -Wall -fno-exceptions -ffunction-sections -fdata-sections -fomit-frame-pointer -CC_FLAGS += -MMD -MP -CC_SYMBOLS = {% for s in symbols %}-D{{s}} {% endfor %} - -LD_FLAGS = $(CPU) -Wl,--gc-sections --specs=nano.specs -Wl,--wrap,main -LD_FLAGS += -Wl,-Map=$(PROJECT).map,--cref -LD_SYS_LIBS = -lstdc++ -lsupc++ -lm -lc -lgcc -lnosys - -ifeq ($(DEBUG), 1) - CC_FLAGS += -DDEBUG -O0 -else - CC_FLAGS += -DNDEBUG -Os -endif - -all: $(PROJECT).bin $(PROJECT).hex - -clean: - rm -f $(PROJECT).bin $(PROJECT).elf $(PROJECT).hex $(PROJECT).map $(PROJECT).lst $(OBJECTS) $(DEPS) - -.s.o: - $(AS) $(CPU) -o $@ $< - -.c.o: - $(CC) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu99 $(INCLUDE_PATHS) -o $@ $< - -.cpp.o: - $(CPP) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu++98 -fno-rtti $(INCLUDE_PATHS) -o $@ $< - - -$(PROJECT).elf: $(OBJECTS) $(SYS_OBJECTS) - $(LD) $(LD_FLAGS) -T$(LINKER_SCRIPT) $(LIBRARY_PATHS) -o $@ $^ $(LIBRARIES) $(LD_SYS_LIBS) $(LIBRARIES) $(LD_SYS_LIBS) +{% block target_project_elf %} +{{ super() }} @echo "" @echo "*****" @echo "***** You must modify vector checksum value in *.bin and *.hex files." @echo "*****" @echo "" - $(SIZE) $@ - -$(PROJECT).bin: $(PROJECT).elf - @$(OBJCOPY) -O binary $< $@ - -$(PROJECT).hex: $(PROJECT).elf - @$(OBJCOPY) -O ihex $< $@ - -$(PROJECT).lst: $(PROJECT).elf - @$(OBJDUMP) -Sdh $< > $@ - -lst: $(PROJECT).lst - -size: - $(SIZE) $(PROJECT).elf - -DEPS = $(OBJECTS:.o=.d) $(SYS_OBJECTS:.o=.d) --include $(DEPS) - +{% endblock %} \ No newline at end of file diff --git a/workspace_tools/export/gcc_arm_lpccappuccino.tmpl b/workspace_tools/export/gcc_arm_lpccappuccino.tmpl index 0a7b317374..dbbc6daacb 100644 --- a/workspace_tools/export/gcc_arm_lpccappuccino.tmpl +++ b/workspace_tools/export/gcc_arm_lpccappuccino.tmpl @@ -1,78 +1,10 @@ -# This file was automagically generated by mbed.org. For more information, -# see http://mbed.org/handbook/Exporting-to-GCC-ARM-Embedded +{% extends "gcc_arm_common.tmpl" %} -GCC_BIN = -PROJECT = {{name}} -OBJECTS = {% for f in to_be_compiled %}{{f}} {% endfor %} -SYS_OBJECTS = {% for f in object_files %}{{f}} {% endfor %} -INCLUDE_PATHS = {% for p in include_paths %}-I{{p}} {% endfor %} -LIBRARY_PATHS = {% for p in library_paths %}-L{{p}} {% endfor %} -LIBRARIES = {% for lib in libraries %}-l{{lib}} {% endfor %} -LINKER_SCRIPT = {{linker_script}} - -############################################################################### -AS = $(GCC_BIN)arm-none-eabi-as -CC = $(GCC_BIN)arm-none-eabi-gcc -CPP = $(GCC_BIN)arm-none-eabi-g++ -LD = $(GCC_BIN)arm-none-eabi-gcc -OBJCOPY = $(GCC_BIN)arm-none-eabi-objcopy -OBJDUMP = $(GCC_BIN)arm-none-eabi-objdump -SIZE = $(GCC_BIN)arm-none-eabi-size - -CPU = -mcpu=cortex-m0 -mthumb -CC_FLAGS = $(CPU) -c -g -fno-common -fmessage-length=0 -Wall -fno-exceptions -ffunction-sections -fdata-sections -fomit-frame-pointer -CC_FLAGS += -MMD -MP -CC_SYMBOLS = {% for s in symbols %}-D{{s}} {% endfor %} - -LD_FLAGS = $(CPU) -Wl,--gc-sections --specs=nano.specs -Wl,--wrap,main -#LD_FLAGS += -u _printf_float -u _scanf_float -LD_FLAGS += -Wl,-Map=$(PROJECT).map,--cref -LD_SYS_LIBS = -lstdc++ -lsupc++ -lm -lc -lgcc -lnosys - -ifeq ($(DEBUG), 1) - CC_FLAGS += -DDEBUG -O0 -else - CC_FLAGS += -DNDEBUG -Os -endif - -all: $(PROJECT).bin $(PROJECT).hex - -clean: - rm -f $(PROJECT).bin $(PROJECT).elf $(PROJECT).hex $(PROJECT).map $(PROJECT).lst $(OBJECTS) $(DEPS) - -.s.o: - $(AS) $(CPU) -o $@ $< - -.c.o: - $(CC) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu99 $(INCLUDE_PATHS) -o $@ $< - -.cpp.o: - $(CPP) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu++98 -fno-rtti $(INCLUDE_PATHS) -o $@ $< - - -$(PROJECT).elf: $(OBJECTS) $(SYS_OBJECTS) - $(LD) $(LD_FLAGS) -T$(LINKER_SCRIPT) $(LIBRARY_PATHS) -o $@ $^ $(LIBRARIES) $(LD_SYS_LIBS) $(LIBRARIES) $(LD_SYS_LIBS) +{% block target_project_elf %} +{{ super() }} @echo "" @echo "*****" @echo "***** You must modify vector checksum value in *.bin and *.hex files." @echo "*****" @echo "" - $(SIZE) $@ - -$(PROJECT).bin: $(PROJECT).elf - @$(OBJCOPY) -O binary $< $@ - -$(PROJECT).hex: $(PROJECT).elf - @$(OBJCOPY) -O ihex $< $@ - -$(PROJECT).lst: $(PROJECT).elf - @$(OBJDUMP) -Sdh $< > $@ - -lst: $(PROJECT).lst - -size: - $(SIZE) $(PROJECT).elf - -DEPS = $(OBJECTS:.o=.d) $(SYS_OBJECTS:.o=.d) --include $(DEPS) - +{% endblock %} diff --git a/workspace_tools/export/gcc_arm_max32600mbed.tmpl b/workspace_tools/export/gcc_arm_max32600mbed.tmpl index 68a5847a58..6e616cc884 100644 --- a/workspace_tools/export/gcc_arm_max32600mbed.tmpl +++ b/workspace_tools/export/gcc_arm_max32600mbed.tmpl @@ -1,72 +1 @@ -# This file was automagically generated by mbed.org. For more information, -# see http://mbed.org/handbook/Exporting-to-GCC-ARM-Embedded - -GCC_BIN = -PROJECT = {{name}} -OBJECTS = {% for f in to_be_compiled %}{{f}} {% endfor %} -SYS_OBJECTS = {% for f in object_files %}{{f}} {% endfor %} -INCLUDE_PATHS = {% for p in include_paths %}-I{{p}} {% endfor %} -LIBRARY_PATHS = {% for p in library_paths %}-L{{p}} {% endfor %} -LIBRARIES = {% for lib in libraries %}-l{{lib}} {% endfor %} -LINKER_SCRIPT = {{linker_script}} - -############################################################################### -AS = $(GCC_BIN)arm-none-eabi-as -CC = $(GCC_BIN)arm-none-eabi-gcc -CPP = $(GCC_BIN)arm-none-eabi-g++ -LD = $(GCC_BIN)arm-none-eabi-gcc -OBJCOPY = $(GCC_BIN)arm-none-eabi-objcopy -OBJDUMP = $(GCC_BIN)arm-none-eabi-objdump -SIZE = $(GCC_BIN)arm-none-eabi-size - -CPU = -mcpu=cortex-m3 -mthumb -CC_FLAGS = $(CPU) -c -g -fno-common -fmessage-length=0 -Wall -fno-exceptions -ffunction-sections -fdata-sections -fomit-frame-pointer -CC_FLAGS += -MMD -MP -CC_SYMBOLS = {% for s in symbols %}-D{{s}} {% endfor %} - -LD_FLAGS = $(CPU) -Wl,--gc-sections --specs=nano.specs -u _printf_float -u _scanf_float -Wl,--wrap,main -LD_FLAGS += -Wl,-Map=$(PROJECT).map,--cref -LD_SYS_LIBS = -lstdc++ -lsupc++ -lm -lc -lgcc -lnosys - -ifeq ($(DEBUG), 1) - CC_FLAGS += -DDEBUG -O0 -else - CC_FLAGS += -DNDEBUG -Os -endif - -all: $(PROJECT).bin $(PROJECT).hex - -clean: - rm -f $(PROJECT).bin $(PROJECT).elf $(PROJECT).hex $(PROJECT).map $(PROJECT).lst $(OBJECTS) $(DEPS) - -.s.o: - $(AS) $(CPU) -o $@ $< - -.c.o: - $(CC) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu99 $(INCLUDE_PATHS) -o $@ $< - -.cpp.o: - $(CPP) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu++98 -fno-rtti $(INCLUDE_PATHS) -o $@ $< - - -$(PROJECT).elf: $(OBJECTS) $(SYS_OBJECTS) - $(LD) $(LD_FLAGS) -T$(LINKER_SCRIPT) $(LIBRARY_PATHS) -o $@ $^ $(LIBRARIES) $(LD_SYS_LIBS) $(LIBRARIES) $(LD_SYS_LIBS) - $(SIZE) $@ - -$(PROJECT).bin: $(PROJECT).elf - @$(OBJCOPY) -O binary $< $@ - -$(PROJECT).hex: $(PROJECT).elf - @$(OBJCOPY) -O ihex $< $@ - -$(PROJECT).lst: $(PROJECT).elf - @$(OBJDUMP) -Sdh $< > $@ - -lst: $(PROJECT).lst - -size: - $(SIZE) $(PROJECT).elf - -DEPS = $(OBJECTS:.o=.d) $(SYS_OBJECTS:.o=.d) --include $(DEPS) - +{% extends "gcc_arm_common.tmpl" %} diff --git a/workspace_tools/export/gcc_arm_maxwsnenv.tmpl b/workspace_tools/export/gcc_arm_maxwsnenv.tmpl index 68a5847a58..6e616cc884 100644 --- a/workspace_tools/export/gcc_arm_maxwsnenv.tmpl +++ b/workspace_tools/export/gcc_arm_maxwsnenv.tmpl @@ -1,72 +1 @@ -# This file was automagically generated by mbed.org. For more information, -# see http://mbed.org/handbook/Exporting-to-GCC-ARM-Embedded - -GCC_BIN = -PROJECT = {{name}} -OBJECTS = {% for f in to_be_compiled %}{{f}} {% endfor %} -SYS_OBJECTS = {% for f in object_files %}{{f}} {% endfor %} -INCLUDE_PATHS = {% for p in include_paths %}-I{{p}} {% endfor %} -LIBRARY_PATHS = {% for p in library_paths %}-L{{p}} {% endfor %} -LIBRARIES = {% for lib in libraries %}-l{{lib}} {% endfor %} -LINKER_SCRIPT = {{linker_script}} - -############################################################################### -AS = $(GCC_BIN)arm-none-eabi-as -CC = $(GCC_BIN)arm-none-eabi-gcc -CPP = $(GCC_BIN)arm-none-eabi-g++ -LD = $(GCC_BIN)arm-none-eabi-gcc -OBJCOPY = $(GCC_BIN)arm-none-eabi-objcopy -OBJDUMP = $(GCC_BIN)arm-none-eabi-objdump -SIZE = $(GCC_BIN)arm-none-eabi-size - -CPU = -mcpu=cortex-m3 -mthumb -CC_FLAGS = $(CPU) -c -g -fno-common -fmessage-length=0 -Wall -fno-exceptions -ffunction-sections -fdata-sections -fomit-frame-pointer -CC_FLAGS += -MMD -MP -CC_SYMBOLS = {% for s in symbols %}-D{{s}} {% endfor %} - -LD_FLAGS = $(CPU) -Wl,--gc-sections --specs=nano.specs -u _printf_float -u _scanf_float -Wl,--wrap,main -LD_FLAGS += -Wl,-Map=$(PROJECT).map,--cref -LD_SYS_LIBS = -lstdc++ -lsupc++ -lm -lc -lgcc -lnosys - -ifeq ($(DEBUG), 1) - CC_FLAGS += -DDEBUG -O0 -else - CC_FLAGS += -DNDEBUG -Os -endif - -all: $(PROJECT).bin $(PROJECT).hex - -clean: - rm -f $(PROJECT).bin $(PROJECT).elf $(PROJECT).hex $(PROJECT).map $(PROJECT).lst $(OBJECTS) $(DEPS) - -.s.o: - $(AS) $(CPU) -o $@ $< - -.c.o: - $(CC) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu99 $(INCLUDE_PATHS) -o $@ $< - -.cpp.o: - $(CPP) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu++98 -fno-rtti $(INCLUDE_PATHS) -o $@ $< - - -$(PROJECT).elf: $(OBJECTS) $(SYS_OBJECTS) - $(LD) $(LD_FLAGS) -T$(LINKER_SCRIPT) $(LIBRARY_PATHS) -o $@ $^ $(LIBRARIES) $(LD_SYS_LIBS) $(LIBRARIES) $(LD_SYS_LIBS) - $(SIZE) $@ - -$(PROJECT).bin: $(PROJECT).elf - @$(OBJCOPY) -O binary $< $@ - -$(PROJECT).hex: $(PROJECT).elf - @$(OBJCOPY) -O ihex $< $@ - -$(PROJECT).lst: $(PROJECT).elf - @$(OBJDUMP) -Sdh $< > $@ - -lst: $(PROJECT).lst - -size: - $(SIZE) $(PROJECT).elf - -DEPS = $(OBJECTS:.o=.d) $(SYS_OBJECTS:.o=.d) --include $(DEPS) - +{% extends "gcc_arm_common.tmpl" %} diff --git a/workspace_tools/export/gcc_arm_mote_l152rc.tmpl b/workspace_tools/export/gcc_arm_mote_l152rc.tmpl index 8a9f703b28..6e616cc884 100644 --- a/workspace_tools/export/gcc_arm_mote_l152rc.tmpl +++ b/workspace_tools/export/gcc_arm_mote_l152rc.tmpl @@ -1,71 +1 @@ -# This file was automagically generated by mbed.org. For more information, -# see http://mbed.org/handbook/Exporting-to-GCC-ARM-Embedded - -GCC_BIN = -PROJECT = {{name}} -OBJECTS = {% for f in to_be_compiled %}{{f}} {% endfor %} -SYS_OBJECTS = {% for f in object_files %}{{f}} {% endfor %} -INCLUDE_PATHS = {% for p in include_paths %}-I{{p}} {% endfor %} -LIBRARY_PATHS = {% for p in library_paths %}-L{{p}} {% endfor %} -LIBRARIES = {% for lib in libraries %}-l{{lib}} {% endfor %} -LINKER_SCRIPT = {{linker_script}} - -############################################################################### -AS = $(GCC_BIN)arm-none-eabi-as -CC = $(GCC_BIN)arm-none-eabi-gcc -CPP = $(GCC_BIN)arm-none-eabi-g++ -LD = $(GCC_BIN)arm-none-eabi-gcc -OBJCOPY = $(GCC_BIN)arm-none-eabi-objcopy -OBJDUMP = $(GCC_BIN)arm-none-eabi-objdump -SIZE = $(GCC_BIN)arm-none-eabi-size - -CPU = -mcpu=cortex-m3 -mthumb -CC_FLAGS = $(CPU) -c -g -fno-common -fmessage-length=0 -Wall -fno-exceptions -ffunction-sections -fdata-sections -fno-rtti -CC_FLAGS += -MMD -MP -CC_SYMBOLS = {% for s in symbols %}-D{{s}} {% endfor %} - -LD_FLAGS = $(CPU) -Wl,--gc-sections --specs=nano.specs -u _printf_float -u _scanf_float -Wl,--wrap,main -LD_FLAGS += -Wl,-Map=$(PROJECT).map,--cref -LD_SYS_LIBS = -lstdc++ -lsupc++ -lm -lc -lgcc -lnosys - -ifeq ($(DEBUG), 1) - CC_FLAGS += -DDEBUG -O0 -else - CC_FLAGS += -DNDEBUG -Os -endif - -all: $(PROJECT).bin $(PROJECT).hex size - -clean: - rm -f $(PROJECT).bin $(PROJECT).elf $(PROJECT).hex $(PROJECT).map $(PROJECT).lst $(OBJECTS) $(DEPS) - -.s.o: - $(AS) $(CPU) -o $@ $< - -.c.o: - $(CC) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu99 $(INCLUDE_PATHS) -o $@ $< - -.cpp.o: - $(CPP) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu++98 $(INCLUDE_PATHS) -o $@ $< - - -$(PROJECT).elf: $(OBJECTS) $(SYS_OBJECTS) - $(LD) $(LD_FLAGS) -T$(LINKER_SCRIPT) $(LIBRARY_PATHS) -o $@ $^ $(LIBRARIES) $(LD_SYS_LIBS) $(LIBRARIES) $(LD_SYS_LIBS) - -$(PROJECT).bin: $(PROJECT).elf - @$(OBJCOPY) -O binary $< $@ - -$(PROJECT).hex: $(PROJECT).elf - @$(OBJCOPY) -O ihex $< $@ - -$(PROJECT).lst: $(PROJECT).elf - @$(OBJDUMP) -Sdh $< > $@ - -lst: $(PROJECT).lst - -size: - $(SIZE) $(PROJECT).elf - -DEPS = $(OBJECTS:.o=.d) $(SYS_OBJECTS:.o=.d) --include $(DEPS) - +{% extends "gcc_arm_common.tmpl" %} diff --git a/workspace_tools/export/gcc_arm_mts_gambit.tmpl b/workspace_tools/export/gcc_arm_mts_gambit.tmpl index 0523c92e91..6e616cc884 100644 --- a/workspace_tools/export/gcc_arm_mts_gambit.tmpl +++ b/workspace_tools/export/gcc_arm_mts_gambit.tmpl @@ -1,78 +1 @@ -# This file was automagically generated by mbed.org. For more information, -# see http://mbed.org/handbook/Exporting-to-GCC-ARM-Embedded - -GCC_BIN = -PROJECT = {{name}} -OBJECTS = {% for f in to_be_compiled %}{{f}} {% endfor %} -SYS_OBJECTS = {% for f in object_files %}{{f}} {% endfor %} -INCLUDE_PATHS = {% for p in include_paths %}-I{{p}} {% endfor %} -LIBRARY_PATHS = {% for p in library_paths %}-L{{p}} {% endfor %} -LIBRARIES = {% for lib in libraries %}-l{{lib}} {% endfor %} -LINKER_SCRIPT = {{linker_script}} - -############################################################################### -AS = $(GCC_BIN)arm-none-eabi-as -CC = $(GCC_BIN)arm-none-eabi-gcc -CPP = $(GCC_BIN)arm-none-eabi-g++ -LD = $(GCC_BIN)arm-none-eabi-gcc -OBJCOPY = $(GCC_BIN)arm-none-eabi-objcopy -OBJDUMP = $(GCC_BIN)arm-none-eabi-objdump -SIZE = $(GCC_BIN)arm-none-eabi-size - -CPU = -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=$(FLOAT_ABI) -CC_FLAGS = $(CPU) -c -g -fno-common -fmessage-length=0 -Wall -fno-exceptions -ffunction-sections -fdata-sections -fomit-frame-pointer -CC_FLAGS += -MMD -MP -CC_SYMBOLS = {% for s in symbols %}-D{{s}} {% endfor %} - -LD_FLAGS = $(CPU) -Wl,--gc-sections --specs=nano.specs -u _printf_float -u _scanf_float -Wl,--wrap,main -LD_FLAGS += -Wl,-Map=$(PROJECT).map,--cref -LD_SYS_LIBS = -lstdc++ -lsupc++ -lm -lc -lgcc -lnosys - -ifeq ($(HARDFP),1) - FLOAT_ABI = hard -else - FLOAT_ABI = softfp -endif - -ifeq ($(DEBUG), 1) - CC_FLAGS += -DDEBUG -O0 -else - CC_FLAGS += -DNDEBUG -Os -endif - -all: $(PROJECT).bin $(PROJECT).hex - -clean: - rm -f $(PROJECT).bin $(PROJECT).elf $(PROJECT).hex $(PROJECT).map $(PROJECT).lst $(OBJECTS) $(DEPS) - -.s.o: - $(AS) $(CPU) -o $@ $< - -.c.o: - $(CC) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu99 $(INCLUDE_PATHS) -o $@ $< - -.cpp.o: - $(CPP) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu++98 -fno-rtti $(INCLUDE_PATHS) -o $@ $< - - -$(PROJECT).elf: $(OBJECTS) $(SYS_OBJECTS) - $(LD) $(LD_FLAGS) -T$(LINKER_SCRIPT) $(LIBRARY_PATHS) -o $@ $^ $(LIBRARIES) $(LD_SYS_LIBS) $(LIBRARIES) $(LD_SYS_LIBS) - $(SIZE) $@ - -$(PROJECT).bin: $(PROJECT).elf - @$(OBJCOPY) -O binary $< $@ - -$(PROJECT).hex: $(PROJECT).elf - @$(OBJCOPY) -O ihex $< $@ - -$(PROJECT).lst: $(PROJECT).elf - @$(OBJDUMP) -Sdh $< > $@ - -lst: $(PROJECT).lst - -size: - $(SIZE) $(PROJECT).elf - -DEPS = $(OBJECTS:.o=.d) $(SYS_OBJECTS:.o=.d) --include $(DEPS) - +{% extends "gcc_arm_common.tmpl" %} diff --git a/workspace_tools/export/gcc_arm_mts_mdot_f405rg.tmpl b/workspace_tools/export/gcc_arm_mts_mdot_f405rg.tmpl index 224ceb2fae..6e616cc884 100644 --- a/workspace_tools/export/gcc_arm_mts_mdot_f405rg.tmpl +++ b/workspace_tools/export/gcc_arm_mts_mdot_f405rg.tmpl @@ -1,78 +1 @@ -# This file was automagically generated by mbed.org. For more information, -# see http://mbed.org/handbook/Exporting-to-GCC-ARM-Embedded - -GCC_BIN = -PROJECT = {{name}} -OBJECTS = {% for f in to_be_compiled %}{{f}} {% endfor %} -SYS_OBJECTS = {% for f in object_files %}{{f}} {% endfor %} -INCLUDE_PATHS = {% for p in include_paths %}-I{{p}} {% endfor %} -LIBRARY_PATHS = {% for p in library_paths %}-L{{p}} {% endfor %} -LIBRARIES = {% for lib in libraries %}-l{{lib}} {% endfor %} -LINKER_SCRIPT = {{linker_script}} - -############################################################################### -AS = $(GCC_BIN)arm-none-eabi-as -CC = $(GCC_BIN)arm-none-eabi-gcc -CPP = $(GCC_BIN)arm-none-eabi-g++ -LD = $(GCC_BIN)arm-none-eabi-gcc -OBJCOPY = $(GCC_BIN)arm-none-eabi-objcopy -OBJDUMP = $(GCC_BIN)arm-none-eabi-objdump -SIZE = $(GCC_BIN)arm-none-eabi-size - -CPU = -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=$(FLOAT_ABI) -CC_FLAGS = $(CPU) -c -g -fno-common -fmessage-length=0 -Wall -fno-exceptions -ffunction-sections -fdata-sections -fomit-frame-pointer -CC_FLAGS += -MMD -MP -CC_SYMBOLS = {% for s in symbols %}-D{{s}} {% endfor %} - -LD_FLAGS = $(CPU) -Wl,--gc-sections --specs=nano.specs -u _printf_float -u _scanf_float -Wl,--wrap,main -LD_FLAGS += -Wl,-Map=$(PROJECT).map,--cref -LD_SYS_LIBS = -lstdc++ -lsupc++ -lm -lc -lgcc -lnosys - -ifeq ($(HARDFP),1) - FLOAT_ABI = hard -else - FLOAT_ABI = softfp -endif - -ifeq ($(DEBUG), 1) - CC_FLAGS += -DDEBUG -O0 -else - CC_FLAGS += -DNDEBUG -Os -endif - -all: $(PROJECT).bin $(PROJECT).hex - -clean: - rm -f $(PROJECT).bin $(PROJECT).elf $(PROJECT).hex $(PROJECT).map $(PROJECT).lst $(OBJECTS) $(DEPS) - -.s.o: - $(AS) $(CPU) -o $@ $< - -.c.o: - $(CC) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu99 $(INCLUDE_PATHS) -o $@ $< - -.cpp.o: - $(CPP) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu++98 -fno-rtti $(INCLUDE_PATHS) -o $@ $< - - -$(PROJECT).elf: $(OBJECTS) $(SYS_OBJECTS) - $(LD) $(LD_FLAGS) -T$(LINKER_SCRIPT) $(LIBRARY_PATHS) -o $@ $^ $(LIBRARIES) $(LD_SYS_LIBS) $(LIBRARIES) $(LD_SYS_LIBS) - $(SIZE) $@ - -$(PROJECT).bin: $(PROJECT).elf - @$(OBJCOPY) -O binary $< $@ - -$(PROJECT).hex: $(PROJECT).elf - @$(OBJCOPY) -O ihex $< $@ - -$(PROJECT).lst: $(PROJECT).elf - @$(OBJDUMP) -Sdh $< > $@ - -lst: $(PROJECT).lst - -size: - $(SIZE) $(PROJECT).elf - -DEPS = $(OBJECTS:.o=.d) $(SYS_OBJECTS:.o=.d) --include $(DEPS) - +{% extends "gcc_arm_common.tmpl" %} diff --git a/workspace_tools/export/gcc_arm_mts_mdot_f411re.tmpl b/workspace_tools/export/gcc_arm_mts_mdot_f411re.tmpl index 224ceb2fae..6e616cc884 100644 --- a/workspace_tools/export/gcc_arm_mts_mdot_f411re.tmpl +++ b/workspace_tools/export/gcc_arm_mts_mdot_f411re.tmpl @@ -1,78 +1 @@ -# This file was automagically generated by mbed.org. For more information, -# see http://mbed.org/handbook/Exporting-to-GCC-ARM-Embedded - -GCC_BIN = -PROJECT = {{name}} -OBJECTS = {% for f in to_be_compiled %}{{f}} {% endfor %} -SYS_OBJECTS = {% for f in object_files %}{{f}} {% endfor %} -INCLUDE_PATHS = {% for p in include_paths %}-I{{p}} {% endfor %} -LIBRARY_PATHS = {% for p in library_paths %}-L{{p}} {% endfor %} -LIBRARIES = {% for lib in libraries %}-l{{lib}} {% endfor %} -LINKER_SCRIPT = {{linker_script}} - -############################################################################### -AS = $(GCC_BIN)arm-none-eabi-as -CC = $(GCC_BIN)arm-none-eabi-gcc -CPP = $(GCC_BIN)arm-none-eabi-g++ -LD = $(GCC_BIN)arm-none-eabi-gcc -OBJCOPY = $(GCC_BIN)arm-none-eabi-objcopy -OBJDUMP = $(GCC_BIN)arm-none-eabi-objdump -SIZE = $(GCC_BIN)arm-none-eabi-size - -CPU = -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=$(FLOAT_ABI) -CC_FLAGS = $(CPU) -c -g -fno-common -fmessage-length=0 -Wall -fno-exceptions -ffunction-sections -fdata-sections -fomit-frame-pointer -CC_FLAGS += -MMD -MP -CC_SYMBOLS = {% for s in symbols %}-D{{s}} {% endfor %} - -LD_FLAGS = $(CPU) -Wl,--gc-sections --specs=nano.specs -u _printf_float -u _scanf_float -Wl,--wrap,main -LD_FLAGS += -Wl,-Map=$(PROJECT).map,--cref -LD_SYS_LIBS = -lstdc++ -lsupc++ -lm -lc -lgcc -lnosys - -ifeq ($(HARDFP),1) - FLOAT_ABI = hard -else - FLOAT_ABI = softfp -endif - -ifeq ($(DEBUG), 1) - CC_FLAGS += -DDEBUG -O0 -else - CC_FLAGS += -DNDEBUG -Os -endif - -all: $(PROJECT).bin $(PROJECT).hex - -clean: - rm -f $(PROJECT).bin $(PROJECT).elf $(PROJECT).hex $(PROJECT).map $(PROJECT).lst $(OBJECTS) $(DEPS) - -.s.o: - $(AS) $(CPU) -o $@ $< - -.c.o: - $(CC) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu99 $(INCLUDE_PATHS) -o $@ $< - -.cpp.o: - $(CPP) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu++98 -fno-rtti $(INCLUDE_PATHS) -o $@ $< - - -$(PROJECT).elf: $(OBJECTS) $(SYS_OBJECTS) - $(LD) $(LD_FLAGS) -T$(LINKER_SCRIPT) $(LIBRARY_PATHS) -o $@ $^ $(LIBRARIES) $(LD_SYS_LIBS) $(LIBRARIES) $(LD_SYS_LIBS) - $(SIZE) $@ - -$(PROJECT).bin: $(PROJECT).elf - @$(OBJCOPY) -O binary $< $@ - -$(PROJECT).hex: $(PROJECT).elf - @$(OBJCOPY) -O ihex $< $@ - -$(PROJECT).lst: $(PROJECT).elf - @$(OBJDUMP) -Sdh $< > $@ - -lst: $(PROJECT).lst - -size: - $(SIZE) $(PROJECT).elf - -DEPS = $(OBJECTS:.o=.d) $(SYS_OBJECTS:.o=.d) --include $(DEPS) - +{% extends "gcc_arm_common.tmpl" %} diff --git a/workspace_tools/export/gcc_arm_nrf51822.tmpl b/workspace_tools/export/gcc_arm_nrf51822.tmpl index c1edebd490..d7120cae29 100644 --- a/workspace_tools/export/gcc_arm_nrf51822.tmpl +++ b/workspace_tools/export/gcc_arm_nrf51822.tmpl @@ -1,76 +1,14 @@ -# This file was automagically generated by mbed.org. For more information, -# see http://mbed.org/handbook/Exporting-to-GCC-ARM-Embedded +{% extends "gcc_arm_common.tmpl" %} -GCC_BIN = -PROJECT = {{name}} -OBJECTS = {% for f in to_be_compiled %}{{f}} {% endfor %} -SYS_OBJECTS = {% for f in object_files %}{{f}} {% endfor %} -INCLUDE_PATHS = {% for p in include_paths %}-I{{p}} {% endfor %} -LIBRARY_PATHS = {% for p in library_paths %}-L{{p}} {% endfor %} -LIBRARIES = {% for lib in libraries %}-l{{lib}} {% endfor %} -LINKER_SCRIPT = {{linker_script}} +{% block additional_variables %} SOFTDEVICE = mbed/TARGET_NRF51822/TARGET_NORDIC/TARGET_MCU_NRF51822/Lib/s130_nrf51822_1_0_0/s130_nrf51_1.0.0_softdevice.hex +{% endblock %} -############################################################################### -AS = $(GCC_BIN)arm-none-eabi-as -CC = $(GCC_BIN)arm-none-eabi-gcc -CPP = $(GCC_BIN)arm-none-eabi-g++ -LD = $(GCC_BIN)arm-none-eabi-gcc -OBJCOPY = $(GCC_BIN)arm-none-eabi-objcopy -OBJDUMP = $(GCC_BIN)arm-none-eabi-objdump -SIZE = $(GCC_BIN)arm-none-eabi-size +{% block additional_executables %} SREC_CAT = srec_cat +{% endblock %} -CPU = -mcpu=cortex-m0 -mthumb -CC_FLAGS = $(CPU) -c -g -fno-common -fmessage-length=0 -Wall -fno-exceptions -ffunction-sections -fdata-sections -fomit-frame-pointer -CC_FLAGS += -MMD -MP -CC_SYMBOLS = {% for s in symbols %}-D{{s}} {% endfor %} - -LD_FLAGS = $(CPU) -Wl,--gc-sections -Wl,--wrap=main --specs=nano.specs -u _printf_float -u _scanf_float -LD_FLAGS += -Wl,-Map=$(PROJECT).map,--cref -LD_SYS_LIBS = -lstdc++ -lsupc++ -lm -lc -lgcc -lnosys - -ifeq ($(DEBUG), 1) - CC_FLAGS += -DDEBUG -O0 -else - CC_FLAGS += -DNDEBUG -Os -endif - -all: $(PROJECT).bin $(PROJECT).hex - -clean: - rm -f $(PROJECT).bin $(PROJECT).elf $(PROJECT).hex $(PROJECT).map $(PROJECT).lst $(OBJECTS) $(DEPS) - -.s.o: - $(AS) $(CPU) -o $@ $< - -.c.o: - $(CC) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu99 $(INCLUDE_PATHS) -o $@ $< - -.cpp.o: - $(CPP) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu++98 -fno-rtti $(INCLUDE_PATHS) -o $@ $< - - -$(PROJECT).elf: $(OBJECTS) $(SYS_OBJECTS) - $(LD) $(LD_FLAGS) -T$(LINKER_SCRIPT) $(LIBRARY_PATHS) -o $@ $^ $(LIBRARIES) $(LD_SYS_LIBS) $(LIBRARIES) $(LD_SYS_LIBS) - $(SIZE) $@ - -$(PROJECT).bin: $(PROJECT).elf - @$(OBJCOPY) -O binary $< $@ - -$(PROJECT).hex: $(PROJECT).elf - @$(OBJCOPY) -O ihex $< $@ - -$(PROJECT).lst: $(PROJECT).elf - @$(OBJDUMP) -Sdh $< > $@ - -lst: $(PROJECT).lst - -size: - $(SIZE) $(PROJECT).elf - -DEPS = $(OBJECTS:.o=.d) $(SYS_OBJECTS:.o=.d) --include $(DEPS) - +{% block additional_targets %} merge: $(SREC_CAT) $(SOFTDEVICE) -intel $(PROJECT).hex -intel -o combined.hex -intel --line-length=44 +{% endblock %} diff --git a/workspace_tools/export/gcc_arm_nrf51_dk.tmpl b/workspace_tools/export/gcc_arm_nrf51_dk.tmpl index 6771c587fa..2afebf27c5 100644 --- a/workspace_tools/export/gcc_arm_nrf51_dk.tmpl +++ b/workspace_tools/export/gcc_arm_nrf51_dk.tmpl @@ -1,76 +1,14 @@ -# This file was automagically generated by mbed.org. For more information, -# see http://mbed.org/handbook/Exporting-to-GCC-ARM-Embedded +{% extends "gcc_arm_common.tmpl" %} -GCC_BIN = -PROJECT = {{name}} -OBJECTS = {% for f in to_be_compiled %}{{f}} {% endfor %} -SYS_OBJECTS = {% for f in object_files %}{{f}} {% endfor %} -INCLUDE_PATHS = {% for p in include_paths %}-I{{p}} {% endfor %} -LIBRARY_PATHS = {% for p in library_paths %}-L{{p}} {% endfor %} -LIBRARIES = {% for lib in libraries %}-l{{lib}} {% endfor %} -LINKER_SCRIPT = {{linker_script}} +{% block additional_variables %} SOFTDEVICE = mbed/TARGET_NRF51_DK/TARGET_NORDIC/TARGET_MCU_NRF51822/Lib/s110_nrf51822_7_1_0/s110_nrf51822_7.1.0_softdevice.hex +{% endblock %} -############################################################################### -AS = $(GCC_BIN)arm-none-eabi-as -CC = $(GCC_BIN)arm-none-eabi-gcc -CPP = $(GCC_BIN)arm-none-eabi-g++ -LD = $(GCC_BIN)arm-none-eabi-gcc -OBJCOPY = $(GCC_BIN)arm-none-eabi-objcopy -OBJDUMP = $(GCC_BIN)arm-none-eabi-objdump -SIZE = $(GCC_BIN)arm-none-eabi-size +{% block additional_executables %} SREC_CAT = srec_cat +{% endblock %} -CPU = -mcpu=cortex-m0 -mthumb -CC_FLAGS = $(CPU) -c -g -fno-common -fmessage-length=0 -Wall -fno-exceptions -ffunction-sections -fdata-sections -fomit-frame-pointer -CC_FLAGS += -MMD -MP -CC_SYMBOLS = {% for s in symbols %}-D{{s}} {% endfor %} - -LD_FLAGS = $(CPU) -Wl,--gc-sections -Wl,--wrap=main --specs=nano.specs -u _printf_float -u _scanf_float -LD_FLAGS += -Wl,-Map=$(PROJECT).map,--cref -LD_SYS_LIBS = -lstdc++ -lsupc++ -lm -lc -lgcc -lnosys - -ifeq ($(DEBUG), 1) - CC_FLAGS += -DDEBUG -O0 -else - CC_FLAGS += -DNDEBUG -Os -endif - -all: $(PROJECT).bin $(PROJECT).hex - -clean: - rm -f $(PROJECT).bin $(PROJECT).elf $(PROJECT).hex $(PROJECT).map $(PROJECT).lst $(OBJECTS) $(DEPS) - -.s.o: - $(AS) $(CPU) -o $@ $< - -.c.o: - $(CC) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu99 $(INCLUDE_PATHS) -o $@ $< - -.cpp.o: - $(CPP) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu++98 -fno-rtti $(INCLUDE_PATHS) -o $@ $< - - -$(PROJECT).elf: $(OBJECTS) $(SYS_OBJECTS) - $(LD) $(LD_FLAGS) -T$(LINKER_SCRIPT) $(LIBRARY_PATHS) -o $@ $^ $(LIBRARIES) $(LD_SYS_LIBS) $(LIBRARIES) $(LD_SYS_LIBS) - $(SIZE) $@ - -$(PROJECT).bin: $(PROJECT).elf - @$(OBJCOPY) -O binary $< $@ - -$(PROJECT).hex: $(PROJECT).elf - @$(OBJCOPY) -O ihex $< $@ - -$(PROJECT).lst: $(PROJECT).elf - @$(OBJDUMP) -Sdh $< > $@ - -lst: $(PROJECT).lst - -size: - $(SIZE) $(PROJECT).elf - -DEPS = $(OBJECTS:.o=.d) $(SYS_OBJECTS:.o=.d) --include $(DEPS) - +{% block additional_targets %} merge: $(SREC_CAT) $(SOFTDEVICE) -intel $(PROJECT).hex -intel -o combined.hex -intel --line-length=44 +{% endblock %} diff --git a/workspace_tools/export/gcc_arm_nrf51_dongle.tmpl b/workspace_tools/export/gcc_arm_nrf51_dongle.tmpl index 48be881791..c35964e9c4 100644 --- a/workspace_tools/export/gcc_arm_nrf51_dongle.tmpl +++ b/workspace_tools/export/gcc_arm_nrf51_dongle.tmpl @@ -1,76 +1,14 @@ -# This file was automagically generated by mbed.org. For more information, -# see http://mbed.org/handbook/Exporting-to-GCC-ARM-Embedded +{% extends "gcc_arm_common.tmpl" %} -GCC_BIN = -PROJECT = {{name}} -OBJECTS = {% for f in to_be_compiled %}{{f}} {% endfor %} -SYS_OBJECTS = {% for f in object_files %}{{f}} {% endfor %} -INCLUDE_PATHS = {% for p in include_paths %}-I{{p}} {% endfor %} -LIBRARY_PATHS = {% for p in library_paths %}-L{{p}} {% endfor %} -LIBRARIES = {% for lib in libraries %}-l{{lib}} {% endfor %} -LINKER_SCRIPT = {{linker_script}} +{% block additional_variables %} SOFTDEVICE = mbed/TARGET_NRF51822/TARGET_NORDIC/TARGET_MCU_NRF51822/Lib/s110_nrf51822_7_0_0/s110_nrf51822_7.0.0_softdevice.hex +{% endblock %} -############################################################################### -AS = $(GCC_BIN)arm-none-eabi-as -CC = $(GCC_BIN)arm-none-eabi-gcc -CPP = $(GCC_BIN)arm-none-eabi-g++ -LD = $(GCC_BIN)arm-none-eabi-gcc -OBJCOPY = $(GCC_BIN)arm-none-eabi-objcopy -OBJDUMP = $(GCC_BIN)arm-none-eabi-objdump -SIZE = $(GCC_BIN)arm-none-eabi-size +{% block additional_executables %} SREC_CAT = srec_cat +{% endblock %} -CPU = -mcpu=cortex-m0 -mthumb -CC_FLAGS = $(CPU) -c -g -fno-common -fmessage-length=0 -Wall -fno-exceptions -ffunction-sections -fdata-sections -fomit-frame-pointer -CC_FLAGS += -MMD -MP -CC_SYMBOLS = {% for s in symbols %}-D{{s}} {% endfor %} - -LD_FLAGS = $(CPU) -Wl,--gc-sections -Wl,--wrap=main --specs=nano.specs -u _printf_float -u _scanf_float -LD_FLAGS += -Wl,-Map=$(PROJECT).map,--cref -LD_SYS_LIBS = -lstdc++ -lsupc++ -lm -lc -lgcc -lnosys - -ifeq ($(DEBUG), 1) - CC_FLAGS += -DDEBUG -O0 -else - CC_FLAGS += -DNDEBUG -Os -endif - -all: $(PROJECT).bin $(PROJECT).hex - -clean: - rm -f $(PROJECT).bin $(PROJECT).elf $(PROJECT).hex $(PROJECT).map $(PROJECT).lst $(OBJECTS) $(DEPS) - -.s.o: - $(AS) $(CPU) -o $@ $< - -.c.o: - $(CC) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu99 $(INCLUDE_PATHS) -o $@ $< - -.cpp.o: - $(CPP) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu++98 -fno-rtti $(INCLUDE_PATHS) -o $@ $< - - -$(PROJECT).elf: $(OBJECTS) $(SYS_OBJECTS) - $(LD) $(LD_FLAGS) -T$(LINKER_SCRIPT) $(LIBRARY_PATHS) -o $@ $^ $(LIBRARIES) $(LD_SYS_LIBS) $(LIBRARIES) $(LD_SYS_LIBS) - $(SIZE) $@ - -$(PROJECT).bin: $(PROJECT).elf - @$(OBJCOPY) -O binary $< $@ - -$(PROJECT).hex: $(PROJECT).elf - @$(OBJCOPY) -O ihex $< $@ - -$(PROJECT).lst: $(PROJECT).elf - @$(OBJDUMP) -Sdh $< > $@ - -lst: $(PROJECT).lst - -size: - $(SIZE) $(PROJECT).elf - -DEPS = $(OBJECTS:.o=.d) $(SYS_OBJECTS:.o=.d) --include $(DEPS) - +{% block additional_targets %} merge: $(SREC_CAT) $(SOFTDEVICE) -intel $(PROJECT).hex -intel -o combined.hex -intel --line-length=44 +{% endblock %} diff --git a/workspace_tools/export/gcc_arm_nucleo_f030r8.tmpl b/workspace_tools/export/gcc_arm_nucleo_f030r8.tmpl index 4c4286f2ea..6e616cc884 100644 --- a/workspace_tools/export/gcc_arm_nucleo_f030r8.tmpl +++ b/workspace_tools/export/gcc_arm_nucleo_f030r8.tmpl @@ -1,71 +1 @@ -# This file was automagically generated by mbed.org. For more information, -# see http://mbed.org/handbook/Exporting-to-GCC-ARM-Embedded - -GCC_BIN = -PROJECT = {{name}} -OBJECTS = {% for f in to_be_compiled %}{{f}} {% endfor %} -SYS_OBJECTS = {% for f in object_files %}{{f}} {% endfor %} -INCLUDE_PATHS = {% for p in include_paths %}-I{{p}} {% endfor %} -LIBRARY_PATHS = {% for p in library_paths %}-L{{p}} {% endfor %} -LIBRARIES = {% for lib in libraries %}-l{{lib}} {% endfor %} -LINKER_SCRIPT = {{linker_script}} - -############################################################################### -AS = $(GCC_BIN)arm-none-eabi-as -CC = $(GCC_BIN)arm-none-eabi-gcc -CPP = $(GCC_BIN)arm-none-eabi-g++ -LD = $(GCC_BIN)arm-none-eabi-gcc -OBJCOPY = $(GCC_BIN)arm-none-eabi-objcopy -OBJDUMP = $(GCC_BIN)arm-none-eabi-objdump -SIZE = $(GCC_BIN)arm-none-eabi-size - -CPU = -mcpu=cortex-m0 -mthumb -CC_FLAGS = $(CPU) -c -g -fno-common -fmessage-length=0 -Wall -fno-exceptions -ffunction-sections -fdata-sections -CC_FLAGS += -MMD -MP -CC_SYMBOLS = {% for s in symbols %}-D{{s}} {% endfor %} - -LD_FLAGS = $(CPU) -Wl,--gc-sections --specs=nano.specs -u _printf_float -u _scanf_float -Wl,--wrap,main -LD_FLAGS += -Wl,-Map=$(PROJECT).map,--cref -LD_SYS_LIBS = -lstdc++ -lsupc++ -lm -lc -lgcc -lnosys - -ifeq ($(DEBUG), 1) - CC_FLAGS += -DDEBUG -O0 -else - CC_FLAGS += -DNDEBUG -Os -endif - -all: $(PROJECT).bin $(PROJECT).hex size - -clean: - rm -f $(PROJECT).bin $(PROJECT).elf $(PROJECT).hex $(PROJECT).map $(PROJECT).lst $(OBJECTS) $(DEPS) - -.s.o: - $(AS) $(CPU) -o $@ $< - -.c.o: - $(CC) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu99 $(INCLUDE_PATHS) -o $@ $< - -.cpp.o: - $(CPP) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu++98 -fno-rtti $(INCLUDE_PATHS) -o $@ $< - - -$(PROJECT).elf: $(OBJECTS) $(SYS_OBJECTS) - $(LD) $(LD_FLAGS) -T$(LINKER_SCRIPT) $(LIBRARY_PATHS) -o $@ $^ $(LIBRARIES) $(LD_SYS_LIBS) $(LIBRARIES) $(LD_SYS_LIBS) - -$(PROJECT).bin: $(PROJECT).elf - @$(OBJCOPY) -O binary $< $@ - -$(PROJECT).hex: $(PROJECT).elf - @$(OBJCOPY) -O ihex $< $@ - -$(PROJECT).lst: $(PROJECT).elf - @$(OBJDUMP) -Sdh $< > $@ - -lst: $(PROJECT).lst - -size: - $(SIZE) $(PROJECT).elf - -DEPS = $(OBJECTS:.o=.d) $(SYS_OBJECTS:.o=.d) --include $(DEPS) - +{% extends "gcc_arm_common.tmpl" %} diff --git a/workspace_tools/export/gcc_arm_nucleo_f070rb.tmpl b/workspace_tools/export/gcc_arm_nucleo_f070rb.tmpl index 4c4286f2ea..6e616cc884 100644 --- a/workspace_tools/export/gcc_arm_nucleo_f070rb.tmpl +++ b/workspace_tools/export/gcc_arm_nucleo_f070rb.tmpl @@ -1,71 +1 @@ -# This file was automagically generated by mbed.org. For more information, -# see http://mbed.org/handbook/Exporting-to-GCC-ARM-Embedded - -GCC_BIN = -PROJECT = {{name}} -OBJECTS = {% for f in to_be_compiled %}{{f}} {% endfor %} -SYS_OBJECTS = {% for f in object_files %}{{f}} {% endfor %} -INCLUDE_PATHS = {% for p in include_paths %}-I{{p}} {% endfor %} -LIBRARY_PATHS = {% for p in library_paths %}-L{{p}} {% endfor %} -LIBRARIES = {% for lib in libraries %}-l{{lib}} {% endfor %} -LINKER_SCRIPT = {{linker_script}} - -############################################################################### -AS = $(GCC_BIN)arm-none-eabi-as -CC = $(GCC_BIN)arm-none-eabi-gcc -CPP = $(GCC_BIN)arm-none-eabi-g++ -LD = $(GCC_BIN)arm-none-eabi-gcc -OBJCOPY = $(GCC_BIN)arm-none-eabi-objcopy -OBJDUMP = $(GCC_BIN)arm-none-eabi-objdump -SIZE = $(GCC_BIN)arm-none-eabi-size - -CPU = -mcpu=cortex-m0 -mthumb -CC_FLAGS = $(CPU) -c -g -fno-common -fmessage-length=0 -Wall -fno-exceptions -ffunction-sections -fdata-sections -CC_FLAGS += -MMD -MP -CC_SYMBOLS = {% for s in symbols %}-D{{s}} {% endfor %} - -LD_FLAGS = $(CPU) -Wl,--gc-sections --specs=nano.specs -u _printf_float -u _scanf_float -Wl,--wrap,main -LD_FLAGS += -Wl,-Map=$(PROJECT).map,--cref -LD_SYS_LIBS = -lstdc++ -lsupc++ -lm -lc -lgcc -lnosys - -ifeq ($(DEBUG), 1) - CC_FLAGS += -DDEBUG -O0 -else - CC_FLAGS += -DNDEBUG -Os -endif - -all: $(PROJECT).bin $(PROJECT).hex size - -clean: - rm -f $(PROJECT).bin $(PROJECT).elf $(PROJECT).hex $(PROJECT).map $(PROJECT).lst $(OBJECTS) $(DEPS) - -.s.o: - $(AS) $(CPU) -o $@ $< - -.c.o: - $(CC) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu99 $(INCLUDE_PATHS) -o $@ $< - -.cpp.o: - $(CPP) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu++98 -fno-rtti $(INCLUDE_PATHS) -o $@ $< - - -$(PROJECT).elf: $(OBJECTS) $(SYS_OBJECTS) - $(LD) $(LD_FLAGS) -T$(LINKER_SCRIPT) $(LIBRARY_PATHS) -o $@ $^ $(LIBRARIES) $(LD_SYS_LIBS) $(LIBRARIES) $(LD_SYS_LIBS) - -$(PROJECT).bin: $(PROJECT).elf - @$(OBJCOPY) -O binary $< $@ - -$(PROJECT).hex: $(PROJECT).elf - @$(OBJCOPY) -O ihex $< $@ - -$(PROJECT).lst: $(PROJECT).elf - @$(OBJDUMP) -Sdh $< > $@ - -lst: $(PROJECT).lst - -size: - $(SIZE) $(PROJECT).elf - -DEPS = $(OBJECTS:.o=.d) $(SYS_OBJECTS:.o=.d) --include $(DEPS) - +{% extends "gcc_arm_common.tmpl" %} diff --git a/workspace_tools/export/gcc_arm_nucleo_f072rb.tmpl b/workspace_tools/export/gcc_arm_nucleo_f072rb.tmpl index 4c4286f2ea..6e616cc884 100644 --- a/workspace_tools/export/gcc_arm_nucleo_f072rb.tmpl +++ b/workspace_tools/export/gcc_arm_nucleo_f072rb.tmpl @@ -1,71 +1 @@ -# This file was automagically generated by mbed.org. For more information, -# see http://mbed.org/handbook/Exporting-to-GCC-ARM-Embedded - -GCC_BIN = -PROJECT = {{name}} -OBJECTS = {% for f in to_be_compiled %}{{f}} {% endfor %} -SYS_OBJECTS = {% for f in object_files %}{{f}} {% endfor %} -INCLUDE_PATHS = {% for p in include_paths %}-I{{p}} {% endfor %} -LIBRARY_PATHS = {% for p in library_paths %}-L{{p}} {% endfor %} -LIBRARIES = {% for lib in libraries %}-l{{lib}} {% endfor %} -LINKER_SCRIPT = {{linker_script}} - -############################################################################### -AS = $(GCC_BIN)arm-none-eabi-as -CC = $(GCC_BIN)arm-none-eabi-gcc -CPP = $(GCC_BIN)arm-none-eabi-g++ -LD = $(GCC_BIN)arm-none-eabi-gcc -OBJCOPY = $(GCC_BIN)arm-none-eabi-objcopy -OBJDUMP = $(GCC_BIN)arm-none-eabi-objdump -SIZE = $(GCC_BIN)arm-none-eabi-size - -CPU = -mcpu=cortex-m0 -mthumb -CC_FLAGS = $(CPU) -c -g -fno-common -fmessage-length=0 -Wall -fno-exceptions -ffunction-sections -fdata-sections -CC_FLAGS += -MMD -MP -CC_SYMBOLS = {% for s in symbols %}-D{{s}} {% endfor %} - -LD_FLAGS = $(CPU) -Wl,--gc-sections --specs=nano.specs -u _printf_float -u _scanf_float -Wl,--wrap,main -LD_FLAGS += -Wl,-Map=$(PROJECT).map,--cref -LD_SYS_LIBS = -lstdc++ -lsupc++ -lm -lc -lgcc -lnosys - -ifeq ($(DEBUG), 1) - CC_FLAGS += -DDEBUG -O0 -else - CC_FLAGS += -DNDEBUG -Os -endif - -all: $(PROJECT).bin $(PROJECT).hex size - -clean: - rm -f $(PROJECT).bin $(PROJECT).elf $(PROJECT).hex $(PROJECT).map $(PROJECT).lst $(OBJECTS) $(DEPS) - -.s.o: - $(AS) $(CPU) -o $@ $< - -.c.o: - $(CC) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu99 $(INCLUDE_PATHS) -o $@ $< - -.cpp.o: - $(CPP) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu++98 -fno-rtti $(INCLUDE_PATHS) -o $@ $< - - -$(PROJECT).elf: $(OBJECTS) $(SYS_OBJECTS) - $(LD) $(LD_FLAGS) -T$(LINKER_SCRIPT) $(LIBRARY_PATHS) -o $@ $^ $(LIBRARIES) $(LD_SYS_LIBS) $(LIBRARIES) $(LD_SYS_LIBS) - -$(PROJECT).bin: $(PROJECT).elf - @$(OBJCOPY) -O binary $< $@ - -$(PROJECT).hex: $(PROJECT).elf - @$(OBJCOPY) -O ihex $< $@ - -$(PROJECT).lst: $(PROJECT).elf - @$(OBJDUMP) -Sdh $< > $@ - -lst: $(PROJECT).lst - -size: - $(SIZE) $(PROJECT).elf - -DEPS = $(OBJECTS:.o=.d) $(SYS_OBJECTS:.o=.d) --include $(DEPS) - +{% extends "gcc_arm_common.tmpl" %} diff --git a/workspace_tools/export/gcc_arm_nucleo_f091rc.tmpl b/workspace_tools/export/gcc_arm_nucleo_f091rc.tmpl index 4c4286f2ea..6e616cc884 100644 --- a/workspace_tools/export/gcc_arm_nucleo_f091rc.tmpl +++ b/workspace_tools/export/gcc_arm_nucleo_f091rc.tmpl @@ -1,71 +1 @@ -# This file was automagically generated by mbed.org. For more information, -# see http://mbed.org/handbook/Exporting-to-GCC-ARM-Embedded - -GCC_BIN = -PROJECT = {{name}} -OBJECTS = {% for f in to_be_compiled %}{{f}} {% endfor %} -SYS_OBJECTS = {% for f in object_files %}{{f}} {% endfor %} -INCLUDE_PATHS = {% for p in include_paths %}-I{{p}} {% endfor %} -LIBRARY_PATHS = {% for p in library_paths %}-L{{p}} {% endfor %} -LIBRARIES = {% for lib in libraries %}-l{{lib}} {% endfor %} -LINKER_SCRIPT = {{linker_script}} - -############################################################################### -AS = $(GCC_BIN)arm-none-eabi-as -CC = $(GCC_BIN)arm-none-eabi-gcc -CPP = $(GCC_BIN)arm-none-eabi-g++ -LD = $(GCC_BIN)arm-none-eabi-gcc -OBJCOPY = $(GCC_BIN)arm-none-eabi-objcopy -OBJDUMP = $(GCC_BIN)arm-none-eabi-objdump -SIZE = $(GCC_BIN)arm-none-eabi-size - -CPU = -mcpu=cortex-m0 -mthumb -CC_FLAGS = $(CPU) -c -g -fno-common -fmessage-length=0 -Wall -fno-exceptions -ffunction-sections -fdata-sections -CC_FLAGS += -MMD -MP -CC_SYMBOLS = {% for s in symbols %}-D{{s}} {% endfor %} - -LD_FLAGS = $(CPU) -Wl,--gc-sections --specs=nano.specs -u _printf_float -u _scanf_float -Wl,--wrap,main -LD_FLAGS += -Wl,-Map=$(PROJECT).map,--cref -LD_SYS_LIBS = -lstdc++ -lsupc++ -lm -lc -lgcc -lnosys - -ifeq ($(DEBUG), 1) - CC_FLAGS += -DDEBUG -O0 -else - CC_FLAGS += -DNDEBUG -Os -endif - -all: $(PROJECT).bin $(PROJECT).hex size - -clean: - rm -f $(PROJECT).bin $(PROJECT).elf $(PROJECT).hex $(PROJECT).map $(PROJECT).lst $(OBJECTS) $(DEPS) - -.s.o: - $(AS) $(CPU) -o $@ $< - -.c.o: - $(CC) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu99 $(INCLUDE_PATHS) -o $@ $< - -.cpp.o: - $(CPP) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu++98 -fno-rtti $(INCLUDE_PATHS) -o $@ $< - - -$(PROJECT).elf: $(OBJECTS) $(SYS_OBJECTS) - $(LD) $(LD_FLAGS) -T$(LINKER_SCRIPT) $(LIBRARY_PATHS) -o $@ $^ $(LIBRARIES) $(LD_SYS_LIBS) $(LIBRARIES) $(LD_SYS_LIBS) - -$(PROJECT).bin: $(PROJECT).elf - @$(OBJCOPY) -O binary $< $@ - -$(PROJECT).hex: $(PROJECT).elf - @$(OBJCOPY) -O ihex $< $@ - -$(PROJECT).lst: $(PROJECT).elf - @$(OBJDUMP) -Sdh $< > $@ - -lst: $(PROJECT).lst - -size: - $(SIZE) $(PROJECT).elf - -DEPS = $(OBJECTS:.o=.d) $(SYS_OBJECTS:.o=.d) --include $(DEPS) - +{% extends "gcc_arm_common.tmpl" %} diff --git a/workspace_tools/export/gcc_arm_nucleo_f103rb.tmpl b/workspace_tools/export/gcc_arm_nucleo_f103rb.tmpl index 68a5847a58..6e616cc884 100644 --- a/workspace_tools/export/gcc_arm_nucleo_f103rb.tmpl +++ b/workspace_tools/export/gcc_arm_nucleo_f103rb.tmpl @@ -1,72 +1 @@ -# This file was automagically generated by mbed.org. For more information, -# see http://mbed.org/handbook/Exporting-to-GCC-ARM-Embedded - -GCC_BIN = -PROJECT = {{name}} -OBJECTS = {% for f in to_be_compiled %}{{f}} {% endfor %} -SYS_OBJECTS = {% for f in object_files %}{{f}} {% endfor %} -INCLUDE_PATHS = {% for p in include_paths %}-I{{p}} {% endfor %} -LIBRARY_PATHS = {% for p in library_paths %}-L{{p}} {% endfor %} -LIBRARIES = {% for lib in libraries %}-l{{lib}} {% endfor %} -LINKER_SCRIPT = {{linker_script}} - -############################################################################### -AS = $(GCC_BIN)arm-none-eabi-as -CC = $(GCC_BIN)arm-none-eabi-gcc -CPP = $(GCC_BIN)arm-none-eabi-g++ -LD = $(GCC_BIN)arm-none-eabi-gcc -OBJCOPY = $(GCC_BIN)arm-none-eabi-objcopy -OBJDUMP = $(GCC_BIN)arm-none-eabi-objdump -SIZE = $(GCC_BIN)arm-none-eabi-size - -CPU = -mcpu=cortex-m3 -mthumb -CC_FLAGS = $(CPU) -c -g -fno-common -fmessage-length=0 -Wall -fno-exceptions -ffunction-sections -fdata-sections -fomit-frame-pointer -CC_FLAGS += -MMD -MP -CC_SYMBOLS = {% for s in symbols %}-D{{s}} {% endfor %} - -LD_FLAGS = $(CPU) -Wl,--gc-sections --specs=nano.specs -u _printf_float -u _scanf_float -Wl,--wrap,main -LD_FLAGS += -Wl,-Map=$(PROJECT).map,--cref -LD_SYS_LIBS = -lstdc++ -lsupc++ -lm -lc -lgcc -lnosys - -ifeq ($(DEBUG), 1) - CC_FLAGS += -DDEBUG -O0 -else - CC_FLAGS += -DNDEBUG -Os -endif - -all: $(PROJECT).bin $(PROJECT).hex - -clean: - rm -f $(PROJECT).bin $(PROJECT).elf $(PROJECT).hex $(PROJECT).map $(PROJECT).lst $(OBJECTS) $(DEPS) - -.s.o: - $(AS) $(CPU) -o $@ $< - -.c.o: - $(CC) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu99 $(INCLUDE_PATHS) -o $@ $< - -.cpp.o: - $(CPP) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu++98 -fno-rtti $(INCLUDE_PATHS) -o $@ $< - - -$(PROJECT).elf: $(OBJECTS) $(SYS_OBJECTS) - $(LD) $(LD_FLAGS) -T$(LINKER_SCRIPT) $(LIBRARY_PATHS) -o $@ $^ $(LIBRARIES) $(LD_SYS_LIBS) $(LIBRARIES) $(LD_SYS_LIBS) - $(SIZE) $@ - -$(PROJECT).bin: $(PROJECT).elf - @$(OBJCOPY) -O binary $< $@ - -$(PROJECT).hex: $(PROJECT).elf - @$(OBJCOPY) -O ihex $< $@ - -$(PROJECT).lst: $(PROJECT).elf - @$(OBJDUMP) -Sdh $< > $@ - -lst: $(PROJECT).lst - -size: - $(SIZE) $(PROJECT).elf - -DEPS = $(OBJECTS:.o=.d) $(SYS_OBJECTS:.o=.d) --include $(DEPS) - +{% extends "gcc_arm_common.tmpl" %} diff --git a/workspace_tools/export/gcc_arm_nucleo_f302r8.tmpl b/workspace_tools/export/gcc_arm_nucleo_f302r8.tmpl index 224ceb2fae..6e616cc884 100644 --- a/workspace_tools/export/gcc_arm_nucleo_f302r8.tmpl +++ b/workspace_tools/export/gcc_arm_nucleo_f302r8.tmpl @@ -1,78 +1 @@ -# This file was automagically generated by mbed.org. For more information, -# see http://mbed.org/handbook/Exporting-to-GCC-ARM-Embedded - -GCC_BIN = -PROJECT = {{name}} -OBJECTS = {% for f in to_be_compiled %}{{f}} {% endfor %} -SYS_OBJECTS = {% for f in object_files %}{{f}} {% endfor %} -INCLUDE_PATHS = {% for p in include_paths %}-I{{p}} {% endfor %} -LIBRARY_PATHS = {% for p in library_paths %}-L{{p}} {% endfor %} -LIBRARIES = {% for lib in libraries %}-l{{lib}} {% endfor %} -LINKER_SCRIPT = {{linker_script}} - -############################################################################### -AS = $(GCC_BIN)arm-none-eabi-as -CC = $(GCC_BIN)arm-none-eabi-gcc -CPP = $(GCC_BIN)arm-none-eabi-g++ -LD = $(GCC_BIN)arm-none-eabi-gcc -OBJCOPY = $(GCC_BIN)arm-none-eabi-objcopy -OBJDUMP = $(GCC_BIN)arm-none-eabi-objdump -SIZE = $(GCC_BIN)arm-none-eabi-size - -CPU = -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=$(FLOAT_ABI) -CC_FLAGS = $(CPU) -c -g -fno-common -fmessage-length=0 -Wall -fno-exceptions -ffunction-sections -fdata-sections -fomit-frame-pointer -CC_FLAGS += -MMD -MP -CC_SYMBOLS = {% for s in symbols %}-D{{s}} {% endfor %} - -LD_FLAGS = $(CPU) -Wl,--gc-sections --specs=nano.specs -u _printf_float -u _scanf_float -Wl,--wrap,main -LD_FLAGS += -Wl,-Map=$(PROJECT).map,--cref -LD_SYS_LIBS = -lstdc++ -lsupc++ -lm -lc -lgcc -lnosys - -ifeq ($(HARDFP),1) - FLOAT_ABI = hard -else - FLOAT_ABI = softfp -endif - -ifeq ($(DEBUG), 1) - CC_FLAGS += -DDEBUG -O0 -else - CC_FLAGS += -DNDEBUG -Os -endif - -all: $(PROJECT).bin $(PROJECT).hex - -clean: - rm -f $(PROJECT).bin $(PROJECT).elf $(PROJECT).hex $(PROJECT).map $(PROJECT).lst $(OBJECTS) $(DEPS) - -.s.o: - $(AS) $(CPU) -o $@ $< - -.c.o: - $(CC) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu99 $(INCLUDE_PATHS) -o $@ $< - -.cpp.o: - $(CPP) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu++98 -fno-rtti $(INCLUDE_PATHS) -o $@ $< - - -$(PROJECT).elf: $(OBJECTS) $(SYS_OBJECTS) - $(LD) $(LD_FLAGS) -T$(LINKER_SCRIPT) $(LIBRARY_PATHS) -o $@ $^ $(LIBRARIES) $(LD_SYS_LIBS) $(LIBRARIES) $(LD_SYS_LIBS) - $(SIZE) $@ - -$(PROJECT).bin: $(PROJECT).elf - @$(OBJCOPY) -O binary $< $@ - -$(PROJECT).hex: $(PROJECT).elf - @$(OBJCOPY) -O ihex $< $@ - -$(PROJECT).lst: $(PROJECT).elf - @$(OBJDUMP) -Sdh $< > $@ - -lst: $(PROJECT).lst - -size: - $(SIZE) $(PROJECT).elf - -DEPS = $(OBJECTS:.o=.d) $(SYS_OBJECTS:.o=.d) --include $(DEPS) - +{% extends "gcc_arm_common.tmpl" %} diff --git a/workspace_tools/export/gcc_arm_nucleo_f303re.tmpl b/workspace_tools/export/gcc_arm_nucleo_f303re.tmpl index 224ceb2fae..6e616cc884 100644 --- a/workspace_tools/export/gcc_arm_nucleo_f303re.tmpl +++ b/workspace_tools/export/gcc_arm_nucleo_f303re.tmpl @@ -1,78 +1 @@ -# This file was automagically generated by mbed.org. For more information, -# see http://mbed.org/handbook/Exporting-to-GCC-ARM-Embedded - -GCC_BIN = -PROJECT = {{name}} -OBJECTS = {% for f in to_be_compiled %}{{f}} {% endfor %} -SYS_OBJECTS = {% for f in object_files %}{{f}} {% endfor %} -INCLUDE_PATHS = {% for p in include_paths %}-I{{p}} {% endfor %} -LIBRARY_PATHS = {% for p in library_paths %}-L{{p}} {% endfor %} -LIBRARIES = {% for lib in libraries %}-l{{lib}} {% endfor %} -LINKER_SCRIPT = {{linker_script}} - -############################################################################### -AS = $(GCC_BIN)arm-none-eabi-as -CC = $(GCC_BIN)arm-none-eabi-gcc -CPP = $(GCC_BIN)arm-none-eabi-g++ -LD = $(GCC_BIN)arm-none-eabi-gcc -OBJCOPY = $(GCC_BIN)arm-none-eabi-objcopy -OBJDUMP = $(GCC_BIN)arm-none-eabi-objdump -SIZE = $(GCC_BIN)arm-none-eabi-size - -CPU = -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=$(FLOAT_ABI) -CC_FLAGS = $(CPU) -c -g -fno-common -fmessage-length=0 -Wall -fno-exceptions -ffunction-sections -fdata-sections -fomit-frame-pointer -CC_FLAGS += -MMD -MP -CC_SYMBOLS = {% for s in symbols %}-D{{s}} {% endfor %} - -LD_FLAGS = $(CPU) -Wl,--gc-sections --specs=nano.specs -u _printf_float -u _scanf_float -Wl,--wrap,main -LD_FLAGS += -Wl,-Map=$(PROJECT).map,--cref -LD_SYS_LIBS = -lstdc++ -lsupc++ -lm -lc -lgcc -lnosys - -ifeq ($(HARDFP),1) - FLOAT_ABI = hard -else - FLOAT_ABI = softfp -endif - -ifeq ($(DEBUG), 1) - CC_FLAGS += -DDEBUG -O0 -else - CC_FLAGS += -DNDEBUG -Os -endif - -all: $(PROJECT).bin $(PROJECT).hex - -clean: - rm -f $(PROJECT).bin $(PROJECT).elf $(PROJECT).hex $(PROJECT).map $(PROJECT).lst $(OBJECTS) $(DEPS) - -.s.o: - $(AS) $(CPU) -o $@ $< - -.c.o: - $(CC) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu99 $(INCLUDE_PATHS) -o $@ $< - -.cpp.o: - $(CPP) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu++98 -fno-rtti $(INCLUDE_PATHS) -o $@ $< - - -$(PROJECT).elf: $(OBJECTS) $(SYS_OBJECTS) - $(LD) $(LD_FLAGS) -T$(LINKER_SCRIPT) $(LIBRARY_PATHS) -o $@ $^ $(LIBRARIES) $(LD_SYS_LIBS) $(LIBRARIES) $(LD_SYS_LIBS) - $(SIZE) $@ - -$(PROJECT).bin: $(PROJECT).elf - @$(OBJCOPY) -O binary $< $@ - -$(PROJECT).hex: $(PROJECT).elf - @$(OBJCOPY) -O ihex $< $@ - -$(PROJECT).lst: $(PROJECT).elf - @$(OBJDUMP) -Sdh $< > $@ - -lst: $(PROJECT).lst - -size: - $(SIZE) $(PROJECT).elf - -DEPS = $(OBJECTS:.o=.d) $(SYS_OBJECTS:.o=.d) --include $(DEPS) - +{% extends "gcc_arm_common.tmpl" %} diff --git a/workspace_tools/export/gcc_arm_nucleo_f334r8.tmpl b/workspace_tools/export/gcc_arm_nucleo_f334r8.tmpl index 224ceb2fae..6e616cc884 100644 --- a/workspace_tools/export/gcc_arm_nucleo_f334r8.tmpl +++ b/workspace_tools/export/gcc_arm_nucleo_f334r8.tmpl @@ -1,78 +1 @@ -# This file was automagically generated by mbed.org. For more information, -# see http://mbed.org/handbook/Exporting-to-GCC-ARM-Embedded - -GCC_BIN = -PROJECT = {{name}} -OBJECTS = {% for f in to_be_compiled %}{{f}} {% endfor %} -SYS_OBJECTS = {% for f in object_files %}{{f}} {% endfor %} -INCLUDE_PATHS = {% for p in include_paths %}-I{{p}} {% endfor %} -LIBRARY_PATHS = {% for p in library_paths %}-L{{p}} {% endfor %} -LIBRARIES = {% for lib in libraries %}-l{{lib}} {% endfor %} -LINKER_SCRIPT = {{linker_script}} - -############################################################################### -AS = $(GCC_BIN)arm-none-eabi-as -CC = $(GCC_BIN)arm-none-eabi-gcc -CPP = $(GCC_BIN)arm-none-eabi-g++ -LD = $(GCC_BIN)arm-none-eabi-gcc -OBJCOPY = $(GCC_BIN)arm-none-eabi-objcopy -OBJDUMP = $(GCC_BIN)arm-none-eabi-objdump -SIZE = $(GCC_BIN)arm-none-eabi-size - -CPU = -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=$(FLOAT_ABI) -CC_FLAGS = $(CPU) -c -g -fno-common -fmessage-length=0 -Wall -fno-exceptions -ffunction-sections -fdata-sections -fomit-frame-pointer -CC_FLAGS += -MMD -MP -CC_SYMBOLS = {% for s in symbols %}-D{{s}} {% endfor %} - -LD_FLAGS = $(CPU) -Wl,--gc-sections --specs=nano.specs -u _printf_float -u _scanf_float -Wl,--wrap,main -LD_FLAGS += -Wl,-Map=$(PROJECT).map,--cref -LD_SYS_LIBS = -lstdc++ -lsupc++ -lm -lc -lgcc -lnosys - -ifeq ($(HARDFP),1) - FLOAT_ABI = hard -else - FLOAT_ABI = softfp -endif - -ifeq ($(DEBUG), 1) - CC_FLAGS += -DDEBUG -O0 -else - CC_FLAGS += -DNDEBUG -Os -endif - -all: $(PROJECT).bin $(PROJECT).hex - -clean: - rm -f $(PROJECT).bin $(PROJECT).elf $(PROJECT).hex $(PROJECT).map $(PROJECT).lst $(OBJECTS) $(DEPS) - -.s.o: - $(AS) $(CPU) -o $@ $< - -.c.o: - $(CC) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu99 $(INCLUDE_PATHS) -o $@ $< - -.cpp.o: - $(CPP) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu++98 -fno-rtti $(INCLUDE_PATHS) -o $@ $< - - -$(PROJECT).elf: $(OBJECTS) $(SYS_OBJECTS) - $(LD) $(LD_FLAGS) -T$(LINKER_SCRIPT) $(LIBRARY_PATHS) -o $@ $^ $(LIBRARIES) $(LD_SYS_LIBS) $(LIBRARIES) $(LD_SYS_LIBS) - $(SIZE) $@ - -$(PROJECT).bin: $(PROJECT).elf - @$(OBJCOPY) -O binary $< $@ - -$(PROJECT).hex: $(PROJECT).elf - @$(OBJCOPY) -O ihex $< $@ - -$(PROJECT).lst: $(PROJECT).elf - @$(OBJDUMP) -Sdh $< > $@ - -lst: $(PROJECT).lst - -size: - $(SIZE) $(PROJECT).elf - -DEPS = $(OBJECTS:.o=.d) $(SYS_OBJECTS:.o=.d) --include $(DEPS) - +{% extends "gcc_arm_common.tmpl" %} diff --git a/workspace_tools/export/gcc_arm_nucleo_f401re.tmpl b/workspace_tools/export/gcc_arm_nucleo_f401re.tmpl index 224ceb2fae..6e616cc884 100644 --- a/workspace_tools/export/gcc_arm_nucleo_f401re.tmpl +++ b/workspace_tools/export/gcc_arm_nucleo_f401re.tmpl @@ -1,78 +1 @@ -# This file was automagically generated by mbed.org. For more information, -# see http://mbed.org/handbook/Exporting-to-GCC-ARM-Embedded - -GCC_BIN = -PROJECT = {{name}} -OBJECTS = {% for f in to_be_compiled %}{{f}} {% endfor %} -SYS_OBJECTS = {% for f in object_files %}{{f}} {% endfor %} -INCLUDE_PATHS = {% for p in include_paths %}-I{{p}} {% endfor %} -LIBRARY_PATHS = {% for p in library_paths %}-L{{p}} {% endfor %} -LIBRARIES = {% for lib in libraries %}-l{{lib}} {% endfor %} -LINKER_SCRIPT = {{linker_script}} - -############################################################################### -AS = $(GCC_BIN)arm-none-eabi-as -CC = $(GCC_BIN)arm-none-eabi-gcc -CPP = $(GCC_BIN)arm-none-eabi-g++ -LD = $(GCC_BIN)arm-none-eabi-gcc -OBJCOPY = $(GCC_BIN)arm-none-eabi-objcopy -OBJDUMP = $(GCC_BIN)arm-none-eabi-objdump -SIZE = $(GCC_BIN)arm-none-eabi-size - -CPU = -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=$(FLOAT_ABI) -CC_FLAGS = $(CPU) -c -g -fno-common -fmessage-length=0 -Wall -fno-exceptions -ffunction-sections -fdata-sections -fomit-frame-pointer -CC_FLAGS += -MMD -MP -CC_SYMBOLS = {% for s in symbols %}-D{{s}} {% endfor %} - -LD_FLAGS = $(CPU) -Wl,--gc-sections --specs=nano.specs -u _printf_float -u _scanf_float -Wl,--wrap,main -LD_FLAGS += -Wl,-Map=$(PROJECT).map,--cref -LD_SYS_LIBS = -lstdc++ -lsupc++ -lm -lc -lgcc -lnosys - -ifeq ($(HARDFP),1) - FLOAT_ABI = hard -else - FLOAT_ABI = softfp -endif - -ifeq ($(DEBUG), 1) - CC_FLAGS += -DDEBUG -O0 -else - CC_FLAGS += -DNDEBUG -Os -endif - -all: $(PROJECT).bin $(PROJECT).hex - -clean: - rm -f $(PROJECT).bin $(PROJECT).elf $(PROJECT).hex $(PROJECT).map $(PROJECT).lst $(OBJECTS) $(DEPS) - -.s.o: - $(AS) $(CPU) -o $@ $< - -.c.o: - $(CC) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu99 $(INCLUDE_PATHS) -o $@ $< - -.cpp.o: - $(CPP) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu++98 -fno-rtti $(INCLUDE_PATHS) -o $@ $< - - -$(PROJECT).elf: $(OBJECTS) $(SYS_OBJECTS) - $(LD) $(LD_FLAGS) -T$(LINKER_SCRIPT) $(LIBRARY_PATHS) -o $@ $^ $(LIBRARIES) $(LD_SYS_LIBS) $(LIBRARIES) $(LD_SYS_LIBS) - $(SIZE) $@ - -$(PROJECT).bin: $(PROJECT).elf - @$(OBJCOPY) -O binary $< $@ - -$(PROJECT).hex: $(PROJECT).elf - @$(OBJCOPY) -O ihex $< $@ - -$(PROJECT).lst: $(PROJECT).elf - @$(OBJDUMP) -Sdh $< > $@ - -lst: $(PROJECT).lst - -size: - $(SIZE) $(PROJECT).elf - -DEPS = $(OBJECTS:.o=.d) $(SYS_OBJECTS:.o=.d) --include $(DEPS) - +{% extends "gcc_arm_common.tmpl" %} diff --git a/workspace_tools/export/gcc_arm_nucleo_f411re.tmpl b/workspace_tools/export/gcc_arm_nucleo_f411re.tmpl index 224ceb2fae..6e616cc884 100644 --- a/workspace_tools/export/gcc_arm_nucleo_f411re.tmpl +++ b/workspace_tools/export/gcc_arm_nucleo_f411re.tmpl @@ -1,78 +1 @@ -# This file was automagically generated by mbed.org. For more information, -# see http://mbed.org/handbook/Exporting-to-GCC-ARM-Embedded - -GCC_BIN = -PROJECT = {{name}} -OBJECTS = {% for f in to_be_compiled %}{{f}} {% endfor %} -SYS_OBJECTS = {% for f in object_files %}{{f}} {% endfor %} -INCLUDE_PATHS = {% for p in include_paths %}-I{{p}} {% endfor %} -LIBRARY_PATHS = {% for p in library_paths %}-L{{p}} {% endfor %} -LIBRARIES = {% for lib in libraries %}-l{{lib}} {% endfor %} -LINKER_SCRIPT = {{linker_script}} - -############################################################################### -AS = $(GCC_BIN)arm-none-eabi-as -CC = $(GCC_BIN)arm-none-eabi-gcc -CPP = $(GCC_BIN)arm-none-eabi-g++ -LD = $(GCC_BIN)arm-none-eabi-gcc -OBJCOPY = $(GCC_BIN)arm-none-eabi-objcopy -OBJDUMP = $(GCC_BIN)arm-none-eabi-objdump -SIZE = $(GCC_BIN)arm-none-eabi-size - -CPU = -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=$(FLOAT_ABI) -CC_FLAGS = $(CPU) -c -g -fno-common -fmessage-length=0 -Wall -fno-exceptions -ffunction-sections -fdata-sections -fomit-frame-pointer -CC_FLAGS += -MMD -MP -CC_SYMBOLS = {% for s in symbols %}-D{{s}} {% endfor %} - -LD_FLAGS = $(CPU) -Wl,--gc-sections --specs=nano.specs -u _printf_float -u _scanf_float -Wl,--wrap,main -LD_FLAGS += -Wl,-Map=$(PROJECT).map,--cref -LD_SYS_LIBS = -lstdc++ -lsupc++ -lm -lc -lgcc -lnosys - -ifeq ($(HARDFP),1) - FLOAT_ABI = hard -else - FLOAT_ABI = softfp -endif - -ifeq ($(DEBUG), 1) - CC_FLAGS += -DDEBUG -O0 -else - CC_FLAGS += -DNDEBUG -Os -endif - -all: $(PROJECT).bin $(PROJECT).hex - -clean: - rm -f $(PROJECT).bin $(PROJECT).elf $(PROJECT).hex $(PROJECT).map $(PROJECT).lst $(OBJECTS) $(DEPS) - -.s.o: - $(AS) $(CPU) -o $@ $< - -.c.o: - $(CC) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu99 $(INCLUDE_PATHS) -o $@ $< - -.cpp.o: - $(CPP) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu++98 -fno-rtti $(INCLUDE_PATHS) -o $@ $< - - -$(PROJECT).elf: $(OBJECTS) $(SYS_OBJECTS) - $(LD) $(LD_FLAGS) -T$(LINKER_SCRIPT) $(LIBRARY_PATHS) -o $@ $^ $(LIBRARIES) $(LD_SYS_LIBS) $(LIBRARIES) $(LD_SYS_LIBS) - $(SIZE) $@ - -$(PROJECT).bin: $(PROJECT).elf - @$(OBJCOPY) -O binary $< $@ - -$(PROJECT).hex: $(PROJECT).elf - @$(OBJCOPY) -O ihex $< $@ - -$(PROJECT).lst: $(PROJECT).elf - @$(OBJDUMP) -Sdh $< > $@ - -lst: $(PROJECT).lst - -size: - $(SIZE) $(PROJECT).elf - -DEPS = $(OBJECTS:.o=.d) $(SYS_OBJECTS:.o=.d) --include $(DEPS) - +{% extends "gcc_arm_common.tmpl" %} diff --git a/workspace_tools/export/gcc_arm_nucleo_f446re.tmpl b/workspace_tools/export/gcc_arm_nucleo_f446re.tmpl index 224ceb2fae..6e616cc884 100644 --- a/workspace_tools/export/gcc_arm_nucleo_f446re.tmpl +++ b/workspace_tools/export/gcc_arm_nucleo_f446re.tmpl @@ -1,78 +1 @@ -# This file was automagically generated by mbed.org. For more information, -# see http://mbed.org/handbook/Exporting-to-GCC-ARM-Embedded - -GCC_BIN = -PROJECT = {{name}} -OBJECTS = {% for f in to_be_compiled %}{{f}} {% endfor %} -SYS_OBJECTS = {% for f in object_files %}{{f}} {% endfor %} -INCLUDE_PATHS = {% for p in include_paths %}-I{{p}} {% endfor %} -LIBRARY_PATHS = {% for p in library_paths %}-L{{p}} {% endfor %} -LIBRARIES = {% for lib in libraries %}-l{{lib}} {% endfor %} -LINKER_SCRIPT = {{linker_script}} - -############################################################################### -AS = $(GCC_BIN)arm-none-eabi-as -CC = $(GCC_BIN)arm-none-eabi-gcc -CPP = $(GCC_BIN)arm-none-eabi-g++ -LD = $(GCC_BIN)arm-none-eabi-gcc -OBJCOPY = $(GCC_BIN)arm-none-eabi-objcopy -OBJDUMP = $(GCC_BIN)arm-none-eabi-objdump -SIZE = $(GCC_BIN)arm-none-eabi-size - -CPU = -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=$(FLOAT_ABI) -CC_FLAGS = $(CPU) -c -g -fno-common -fmessage-length=0 -Wall -fno-exceptions -ffunction-sections -fdata-sections -fomit-frame-pointer -CC_FLAGS += -MMD -MP -CC_SYMBOLS = {% for s in symbols %}-D{{s}} {% endfor %} - -LD_FLAGS = $(CPU) -Wl,--gc-sections --specs=nano.specs -u _printf_float -u _scanf_float -Wl,--wrap,main -LD_FLAGS += -Wl,-Map=$(PROJECT).map,--cref -LD_SYS_LIBS = -lstdc++ -lsupc++ -lm -lc -lgcc -lnosys - -ifeq ($(HARDFP),1) - FLOAT_ABI = hard -else - FLOAT_ABI = softfp -endif - -ifeq ($(DEBUG), 1) - CC_FLAGS += -DDEBUG -O0 -else - CC_FLAGS += -DNDEBUG -Os -endif - -all: $(PROJECT).bin $(PROJECT).hex - -clean: - rm -f $(PROJECT).bin $(PROJECT).elf $(PROJECT).hex $(PROJECT).map $(PROJECT).lst $(OBJECTS) $(DEPS) - -.s.o: - $(AS) $(CPU) -o $@ $< - -.c.o: - $(CC) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu99 $(INCLUDE_PATHS) -o $@ $< - -.cpp.o: - $(CPP) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu++98 -fno-rtti $(INCLUDE_PATHS) -o $@ $< - - -$(PROJECT).elf: $(OBJECTS) $(SYS_OBJECTS) - $(LD) $(LD_FLAGS) -T$(LINKER_SCRIPT) $(LIBRARY_PATHS) -o $@ $^ $(LIBRARIES) $(LD_SYS_LIBS) $(LIBRARIES) $(LD_SYS_LIBS) - $(SIZE) $@ - -$(PROJECT).bin: $(PROJECT).elf - @$(OBJCOPY) -O binary $< $@ - -$(PROJECT).hex: $(PROJECT).elf - @$(OBJCOPY) -O ihex $< $@ - -$(PROJECT).lst: $(PROJECT).elf - @$(OBJDUMP) -Sdh $< > $@ - -lst: $(PROJECT).lst - -size: - $(SIZE) $(PROJECT).elf - -DEPS = $(OBJECTS:.o=.d) $(SYS_OBJECTS:.o=.d) --include $(DEPS) - +{% extends "gcc_arm_common.tmpl" %} diff --git a/workspace_tools/export/gcc_arm_nucleo_l053r8.tmpl b/workspace_tools/export/gcc_arm_nucleo_l053r8.tmpl index 0b995d5283..6e616cc884 100644 --- a/workspace_tools/export/gcc_arm_nucleo_l053r8.tmpl +++ b/workspace_tools/export/gcc_arm_nucleo_l053r8.tmpl @@ -1,73 +1 @@ -# This file was automagically generated by mbed.org. For more information, -# see http://mbed.org/handbook/Exporting-to-GCC-ARM-Embedded - -GCC_BIN = -PROJECT = {{name}} -OBJECTS = {% for f in to_be_compiled %}{{f}} {% endfor %} -SYS_OBJECTS = {% for f in object_files %}{{f}} {% endfor %} -INCLUDE_PATHS = {% for p in include_paths %}-I{{p}} {% endfor %} -LIBRARY_PATHS = {% for p in library_paths %}-L{{p}} {% endfor %} -LIBRARIES = {% for lib in libraries %}-l{{lib}} {% endfor %} -LINKER_SCRIPT = {{linker_script}} - -############################################################################### -AS = $(GCC_BIN)arm-none-eabi-as -CC = $(GCC_BIN)arm-none-eabi-gcc -CPP = $(GCC_BIN)arm-none-eabi-g++ -LD = $(GCC_BIN)arm-none-eabi-gcc -OBJCOPY = $(GCC_BIN)arm-none-eabi-objcopy -OBJDUMP = $(GCC_BIN)arm-none-eabi-objdump -SIZE = $(GCC_BIN)arm-none-eabi-size - -CPU = -mcpu=cortex-m0plus -mthumb -CC_FLAGS = $(CPU) -c -g -fno-common -fmessage-length=0 -Wall -fno-exceptions -ffunction-sections -fdata-sections -fomit-frame-pointer -CC_FLAGS += -MMD -MP -CC_SYMBOLS = {% for s in symbols %}-D{{s}} {% endfor %} - -LD_FLAGS = $(CPU) -Wl,--gc-sections --specs=nano.specs -Wl,--wrap,main -#LD_FLAGS += -u _printf_float -u _scanf_float -LD_FLAGS += -Wl,-Map=$(PROJECT).map,--cref -LD_SYS_LIBS = -lstdc++ -lsupc++ -lm -lc -lgcc -lnosys - -ifeq ($(DEBUG), 1) - CC_FLAGS += -DDEBUG -O0 -else - CC_FLAGS += -DNDEBUG -Os -endif - -all: $(PROJECT).bin $(PROJECT).hex - -clean: - rm -f $(PROJECT).bin $(PROJECT).elf $(PROJECT).hex $(PROJECT).map $(PROJECT).lst $(OBJECTS) $(DEPS) - -.s.o: - $(AS) $(CPU) -o $@ $< - -.c.o: - $(CC) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu99 $(INCLUDE_PATHS) -o $@ $< - -.cpp.o: - $(CPP) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu++98 -fno-rtti $(INCLUDE_PATHS) -o $@ $< - - -$(PROJECT).elf: $(OBJECTS) $(SYS_OBJECTS) - $(LD) $(LD_FLAGS) -T$(LINKER_SCRIPT) $(LIBRARY_PATHS) -o $@ $^ $(LIBRARIES) $(LD_SYS_LIBS) $(LIBRARIES) $(LD_SYS_LIBS) - $(SIZE) $@ - -$(PROJECT).bin: $(PROJECT).elf - @$(OBJCOPY) -O binary $< $@ - -$(PROJECT).hex: $(PROJECT).elf - @$(OBJCOPY) -O ihex $< $@ - -$(PROJECT).lst: $(PROJECT).elf - @$(OBJDUMP) -Sdh $< > $@ - -lst: $(PROJECT).lst - -size: - $(SIZE) $(PROJECT).elf - -DEPS = $(OBJECTS:.o=.d) $(SYS_OBJECTS:.o=.d) --include $(DEPS) - +{% extends "gcc_arm_common.tmpl" %} diff --git a/workspace_tools/export/gcc_arm_nucleo_l073rz.tmpl b/workspace_tools/export/gcc_arm_nucleo_l073rz.tmpl index 0b995d5283..6e616cc884 100644 --- a/workspace_tools/export/gcc_arm_nucleo_l073rz.tmpl +++ b/workspace_tools/export/gcc_arm_nucleo_l073rz.tmpl @@ -1,73 +1 @@ -# This file was automagically generated by mbed.org. For more information, -# see http://mbed.org/handbook/Exporting-to-GCC-ARM-Embedded - -GCC_BIN = -PROJECT = {{name}} -OBJECTS = {% for f in to_be_compiled %}{{f}} {% endfor %} -SYS_OBJECTS = {% for f in object_files %}{{f}} {% endfor %} -INCLUDE_PATHS = {% for p in include_paths %}-I{{p}} {% endfor %} -LIBRARY_PATHS = {% for p in library_paths %}-L{{p}} {% endfor %} -LIBRARIES = {% for lib in libraries %}-l{{lib}} {% endfor %} -LINKER_SCRIPT = {{linker_script}} - -############################################################################### -AS = $(GCC_BIN)arm-none-eabi-as -CC = $(GCC_BIN)arm-none-eabi-gcc -CPP = $(GCC_BIN)arm-none-eabi-g++ -LD = $(GCC_BIN)arm-none-eabi-gcc -OBJCOPY = $(GCC_BIN)arm-none-eabi-objcopy -OBJDUMP = $(GCC_BIN)arm-none-eabi-objdump -SIZE = $(GCC_BIN)arm-none-eabi-size - -CPU = -mcpu=cortex-m0plus -mthumb -CC_FLAGS = $(CPU) -c -g -fno-common -fmessage-length=0 -Wall -fno-exceptions -ffunction-sections -fdata-sections -fomit-frame-pointer -CC_FLAGS += -MMD -MP -CC_SYMBOLS = {% for s in symbols %}-D{{s}} {% endfor %} - -LD_FLAGS = $(CPU) -Wl,--gc-sections --specs=nano.specs -Wl,--wrap,main -#LD_FLAGS += -u _printf_float -u _scanf_float -LD_FLAGS += -Wl,-Map=$(PROJECT).map,--cref -LD_SYS_LIBS = -lstdc++ -lsupc++ -lm -lc -lgcc -lnosys - -ifeq ($(DEBUG), 1) - CC_FLAGS += -DDEBUG -O0 -else - CC_FLAGS += -DNDEBUG -Os -endif - -all: $(PROJECT).bin $(PROJECT).hex - -clean: - rm -f $(PROJECT).bin $(PROJECT).elf $(PROJECT).hex $(PROJECT).map $(PROJECT).lst $(OBJECTS) $(DEPS) - -.s.o: - $(AS) $(CPU) -o $@ $< - -.c.o: - $(CC) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu99 $(INCLUDE_PATHS) -o $@ $< - -.cpp.o: - $(CPP) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu++98 -fno-rtti $(INCLUDE_PATHS) -o $@ $< - - -$(PROJECT).elf: $(OBJECTS) $(SYS_OBJECTS) - $(LD) $(LD_FLAGS) -T$(LINKER_SCRIPT) $(LIBRARY_PATHS) -o $@ $^ $(LIBRARIES) $(LD_SYS_LIBS) $(LIBRARIES) $(LD_SYS_LIBS) - $(SIZE) $@ - -$(PROJECT).bin: $(PROJECT).elf - @$(OBJCOPY) -O binary $< $@ - -$(PROJECT).hex: $(PROJECT).elf - @$(OBJCOPY) -O ihex $< $@ - -$(PROJECT).lst: $(PROJECT).elf - @$(OBJDUMP) -Sdh $< > $@ - -lst: $(PROJECT).lst - -size: - $(SIZE) $(PROJECT).elf - -DEPS = $(OBJECTS:.o=.d) $(SYS_OBJECTS:.o=.d) --include $(DEPS) - +{% extends "gcc_arm_common.tmpl" %} diff --git a/workspace_tools/export/gcc_arm_nucleo_l152re.tmpl b/workspace_tools/export/gcc_arm_nucleo_l152re.tmpl index 68a5847a58..6e616cc884 100644 --- a/workspace_tools/export/gcc_arm_nucleo_l152re.tmpl +++ b/workspace_tools/export/gcc_arm_nucleo_l152re.tmpl @@ -1,72 +1 @@ -# This file was automagically generated by mbed.org. For more information, -# see http://mbed.org/handbook/Exporting-to-GCC-ARM-Embedded - -GCC_BIN = -PROJECT = {{name}} -OBJECTS = {% for f in to_be_compiled %}{{f}} {% endfor %} -SYS_OBJECTS = {% for f in object_files %}{{f}} {% endfor %} -INCLUDE_PATHS = {% for p in include_paths %}-I{{p}} {% endfor %} -LIBRARY_PATHS = {% for p in library_paths %}-L{{p}} {% endfor %} -LIBRARIES = {% for lib in libraries %}-l{{lib}} {% endfor %} -LINKER_SCRIPT = {{linker_script}} - -############################################################################### -AS = $(GCC_BIN)arm-none-eabi-as -CC = $(GCC_BIN)arm-none-eabi-gcc -CPP = $(GCC_BIN)arm-none-eabi-g++ -LD = $(GCC_BIN)arm-none-eabi-gcc -OBJCOPY = $(GCC_BIN)arm-none-eabi-objcopy -OBJDUMP = $(GCC_BIN)arm-none-eabi-objdump -SIZE = $(GCC_BIN)arm-none-eabi-size - -CPU = -mcpu=cortex-m3 -mthumb -CC_FLAGS = $(CPU) -c -g -fno-common -fmessage-length=0 -Wall -fno-exceptions -ffunction-sections -fdata-sections -fomit-frame-pointer -CC_FLAGS += -MMD -MP -CC_SYMBOLS = {% for s in symbols %}-D{{s}} {% endfor %} - -LD_FLAGS = $(CPU) -Wl,--gc-sections --specs=nano.specs -u _printf_float -u _scanf_float -Wl,--wrap,main -LD_FLAGS += -Wl,-Map=$(PROJECT).map,--cref -LD_SYS_LIBS = -lstdc++ -lsupc++ -lm -lc -lgcc -lnosys - -ifeq ($(DEBUG), 1) - CC_FLAGS += -DDEBUG -O0 -else - CC_FLAGS += -DNDEBUG -Os -endif - -all: $(PROJECT).bin $(PROJECT).hex - -clean: - rm -f $(PROJECT).bin $(PROJECT).elf $(PROJECT).hex $(PROJECT).map $(PROJECT).lst $(OBJECTS) $(DEPS) - -.s.o: - $(AS) $(CPU) -o $@ $< - -.c.o: - $(CC) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu99 $(INCLUDE_PATHS) -o $@ $< - -.cpp.o: - $(CPP) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu++98 -fno-rtti $(INCLUDE_PATHS) -o $@ $< - - -$(PROJECT).elf: $(OBJECTS) $(SYS_OBJECTS) - $(LD) $(LD_FLAGS) -T$(LINKER_SCRIPT) $(LIBRARY_PATHS) -o $@ $^ $(LIBRARIES) $(LD_SYS_LIBS) $(LIBRARIES) $(LD_SYS_LIBS) - $(SIZE) $@ - -$(PROJECT).bin: $(PROJECT).elf - @$(OBJCOPY) -O binary $< $@ - -$(PROJECT).hex: $(PROJECT).elf - @$(OBJCOPY) -O ihex $< $@ - -$(PROJECT).lst: $(PROJECT).elf - @$(OBJDUMP) -Sdh $< > $@ - -lst: $(PROJECT).lst - -size: - $(SIZE) $(PROJECT).elf - -DEPS = $(OBJECTS:.o=.d) $(SYS_OBJECTS:.o=.d) --include $(DEPS) - +{% extends "gcc_arm_common.tmpl" %} diff --git a/workspace_tools/export/gcc_arm_nz32sc151.tmpl b/workspace_tools/export/gcc_arm_nz32sc151.tmpl index 68a5847a58..6e616cc884 100644 --- a/workspace_tools/export/gcc_arm_nz32sc151.tmpl +++ b/workspace_tools/export/gcc_arm_nz32sc151.tmpl @@ -1,72 +1 @@ -# This file was automagically generated by mbed.org. For more information, -# see http://mbed.org/handbook/Exporting-to-GCC-ARM-Embedded - -GCC_BIN = -PROJECT = {{name}} -OBJECTS = {% for f in to_be_compiled %}{{f}} {% endfor %} -SYS_OBJECTS = {% for f in object_files %}{{f}} {% endfor %} -INCLUDE_PATHS = {% for p in include_paths %}-I{{p}} {% endfor %} -LIBRARY_PATHS = {% for p in library_paths %}-L{{p}} {% endfor %} -LIBRARIES = {% for lib in libraries %}-l{{lib}} {% endfor %} -LINKER_SCRIPT = {{linker_script}} - -############################################################################### -AS = $(GCC_BIN)arm-none-eabi-as -CC = $(GCC_BIN)arm-none-eabi-gcc -CPP = $(GCC_BIN)arm-none-eabi-g++ -LD = $(GCC_BIN)arm-none-eabi-gcc -OBJCOPY = $(GCC_BIN)arm-none-eabi-objcopy -OBJDUMP = $(GCC_BIN)arm-none-eabi-objdump -SIZE = $(GCC_BIN)arm-none-eabi-size - -CPU = -mcpu=cortex-m3 -mthumb -CC_FLAGS = $(CPU) -c -g -fno-common -fmessage-length=0 -Wall -fno-exceptions -ffunction-sections -fdata-sections -fomit-frame-pointer -CC_FLAGS += -MMD -MP -CC_SYMBOLS = {% for s in symbols %}-D{{s}} {% endfor %} - -LD_FLAGS = $(CPU) -Wl,--gc-sections --specs=nano.specs -u _printf_float -u _scanf_float -Wl,--wrap,main -LD_FLAGS += -Wl,-Map=$(PROJECT).map,--cref -LD_SYS_LIBS = -lstdc++ -lsupc++ -lm -lc -lgcc -lnosys - -ifeq ($(DEBUG), 1) - CC_FLAGS += -DDEBUG -O0 -else - CC_FLAGS += -DNDEBUG -Os -endif - -all: $(PROJECT).bin $(PROJECT).hex - -clean: - rm -f $(PROJECT).bin $(PROJECT).elf $(PROJECT).hex $(PROJECT).map $(PROJECT).lst $(OBJECTS) $(DEPS) - -.s.o: - $(AS) $(CPU) -o $@ $< - -.c.o: - $(CC) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu99 $(INCLUDE_PATHS) -o $@ $< - -.cpp.o: - $(CPP) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu++98 -fno-rtti $(INCLUDE_PATHS) -o $@ $< - - -$(PROJECT).elf: $(OBJECTS) $(SYS_OBJECTS) - $(LD) $(LD_FLAGS) -T$(LINKER_SCRIPT) $(LIBRARY_PATHS) -o $@ $^ $(LIBRARIES) $(LD_SYS_LIBS) $(LIBRARIES) $(LD_SYS_LIBS) - $(SIZE) $@ - -$(PROJECT).bin: $(PROJECT).elf - @$(OBJCOPY) -O binary $< $@ - -$(PROJECT).hex: $(PROJECT).elf - @$(OBJCOPY) -O ihex $< $@ - -$(PROJECT).lst: $(PROJECT).elf - @$(OBJDUMP) -Sdh $< > $@ - -lst: $(PROJECT).lst - -size: - $(SIZE) $(PROJECT).elf - -DEPS = $(OBJECTS:.o=.d) $(SYS_OBJECTS:.o=.d) --include $(DEPS) - +{% extends "gcc_arm_common.tmpl" %} diff --git a/workspace_tools/export/gcc_arm_rblab_nrf51822.tmpl b/workspace_tools/export/gcc_arm_rblab_nrf51822.tmpl index 8bd27e7992..6a615fd6ad 100644 --- a/workspace_tools/export/gcc_arm_rblab_nrf51822.tmpl +++ b/workspace_tools/export/gcc_arm_rblab_nrf51822.tmpl @@ -1,76 +1,14 @@ -# This file was automagically generated by mbed.org. For more information, -# see http://mbed.org/handbook/Exporting-to-GCC-ARM-Embedded +{% extends "gcc_arm_common.tmpl" %} -GCC_BIN = -PROJECT = {{name}} -OBJECTS = {% for f in to_be_compiled %}{{f}} {% endfor %} -SYS_OBJECTS = {% for f in object_files %}{{f}} {% endfor %} -INCLUDE_PATHS = {% for p in include_paths %}-I{{p}} {% endfor %} -LIBRARY_PATHS = {% for p in library_paths %}-L{{p}} {% endfor %} -LIBRARIES = {% for lib in libraries %}-l{{lib}} {% endfor %} -LINKER_SCRIPT = {{linker_script}} +{% block additional_variables %} SOFTDEVICE = mbed/TARGET_RBLAB_NRF51822/TARGET_NORDIC/TARGET_MCU_NRF51822/Lib/s110_nrf51822_7_1_0/s110_nrf51822_7.1.0_softdevice.hex +{% endblock %} -############################################################################### -AS = $(GCC_BIN)arm-none-eabi-as -CC = $(GCC_BIN)arm-none-eabi-gcc -CPP = $(GCC_BIN)arm-none-eabi-g++ -LD = $(GCC_BIN)arm-none-eabi-gcc -OBJCOPY = $(GCC_BIN)arm-none-eabi-objcopy -OBJDUMP = $(GCC_BIN)arm-none-eabi-objdump -SIZE = $(GCC_BIN)arm-none-eabi-size +{% block additional_executables %} SREC_CAT = srec_cat +{% endblock %} -CPU = -mcpu=cortex-m0 -mthumb -CC_FLAGS = $(CPU) -c -g -fno-common -fmessage-length=0 -Wall -fno-exceptions -ffunction-sections -fdata-sections -fomit-frame-pointer -CC_FLAGS += -MMD -MP -CC_SYMBOLS = {% for s in symbols %}-D{{s}} {% endfor %} - -LD_FLAGS = $(CPU) -Wl,--gc-sections -Wl,--wrap=main --specs=nano.specs -u _printf_float -u _scanf_float -LD_FLAGS += -Wl,-Map=$(PROJECT).map,--cref -LD_SYS_LIBS = -lstdc++ -lsupc++ -lm -lc -lgcc -lnosys - -ifeq ($(DEBUG), 1) - CC_FLAGS += -DDEBUG -O0 -else - CC_FLAGS += -DNDEBUG -Os -endif - -all: $(PROJECT).bin $(PROJECT).hex - -clean: - rm -f $(PROJECT).bin $(PROJECT).elf $(PROJECT).hex $(PROJECT).map $(PROJECT).lst $(OBJECTS) $(DEPS) - -.s.o: - $(AS) $(CPU) -o $@ $< - -.c.o: - $(CC) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu99 $(INCLUDE_PATHS) -o $@ $< - -.cpp.o: - $(CPP) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu++98 -fno-rtti $(INCLUDE_PATHS) -o $@ $< - - -$(PROJECT).elf: $(OBJECTS) $(SYS_OBJECTS) - $(LD) $(LD_FLAGS) -T$(LINKER_SCRIPT) $(LIBRARY_PATHS) -o $@ $^ $(LIBRARIES) $(LD_SYS_LIBS) $(LIBRARIES) $(LD_SYS_LIBS) - $(SIZE) $@ - -$(PROJECT).bin: $(PROJECT).elf - @$(OBJCOPY) -O binary $< $@ - -$(PROJECT).hex: $(PROJECT).elf - @$(OBJCOPY) -O ihex $< $@ - -$(PROJECT).lst: $(PROJECT).elf - @$(OBJDUMP) -Sdh $< > $@ - -lst: $(PROJECT).lst - -size: - $(SIZE) $(PROJECT).elf - -DEPS = $(OBJECTS:.o=.d) $(SYS_OBJECTS:.o=.d) --include $(DEPS) - +{% block additional_targets %} merge: $(SREC_CAT) $(SOFTDEVICE) -intel $(PROJECT).hex -intel -o combined.hex -intel --line-length=44 +{% endblock %} diff --git a/workspace_tools/export/gcc_arm_rz_a1h.tmpl b/workspace_tools/export/gcc_arm_rz_a1h.tmpl index 3880bc28f0..055d0e553c 100644 --- a/workspace_tools/export/gcc_arm_rz_a1h.tmpl +++ b/workspace_tools/export/gcc_arm_rz_a1h.tmpl @@ -1,77 +1,16 @@ -# This file was automagically generated by mbed.org. For more information, -# see http://mbed.org/handbook/Exporting-to-GCC-ARM-Embedded +{% extends "gcc_arm_common.tmpl" %} -GCC_BIN = -PROJECT = {{name}} -OBJECTS = {% for f in to_be_compiled %}{{f}} {% endfor %} -SYS_OBJECTS = {% for f in object_files %}{{f}} {% endfor %} -INCLUDE_PATHS = {% for p in include_paths %}-I{{p}} {% endfor %} -LIBRARY_PATHS = {% for p in library_paths %}-L{{p}} {% endfor %} -LIBRARIES = {% for lib in libraries %}-l{{lib}} {% endfor %} -LINKER_SCRIPT = {{linker_script}} - -############################################################################### -AS = $(GCC_BIN)arm-none-eabi-as -CC = $(GCC_BIN)arm-none-eabi-gcc -CPP = $(GCC_BIN)arm-none-eabi-g++ -LD = $(GCC_BIN)arm-none-eabi-gcc -OBJCOPY = $(GCC_BIN)arm-none-eabi-objcopy -OBJDUMP = $(GCC_BIN)arm-none-eabi-objdump -SIZE = $(GCC_BIN)arm-none-eabi-size - -CPU = -mcpu=cortex-a9 -mthumb-interwork -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=hard -CC_FLAGS = $(CPU) -c -g -fno-common -fmessage-length=0 -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers +{% block cc_flags -%} +$(CPU) -c -g -fno-common -fmessage-length=0 -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers CC_FLAGS += -fno-exceptions -fno-builtin -ffunction-sections -fdata-sections -fno-delete-null-pointer-checks -fomit-frame-pointer -CC_FLAGS += -MMD -MP -mno-unaligned-access -CC_SYMBOLS = {% for s in symbols %}-D{{s}} {% endfor %} -LD_FLAGS = $(CPU) -Wl,--gc-sections --specs=nano.specs -u _printf_float -u _scanf_float -Wl,--wrap,main -LD_FLAGS += -Wl,-Map=$(PROJECT).map,--cref -LD_SYS_LIBS = -lstdc++ -lsupc++ -lm -lc -lgcc -lnosys +CC_FLAGS += -MMD -MP +{% endblock %} -ifeq ($(DEBUG), 1) - CC_FLAGS += -DDEBUG -O0 -else - CC_FLAGS += -DNDEBUG -Os -endif - -all: $(PROJECT).bin $(PROJECT).hex - -clean: - rm -f $(PROJECT).bin $(PROJECT).elf $(PROJECT).hex $(PROJECT).map $(PROJECT).lst $(OBJECTS) $(DEPS) - -.s.o: - $(AS) $(CPU) -o $@ $< - -.c.o: - $(CC) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu99 $(INCLUDE_PATHS) -o $@ $< - -.cpp.o: - $(CPP) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu++98 -fno-rtti $(INCLUDE_PATHS) -o $@ $< - - -$(PROJECT).elf: $(OBJECTS) $(SYS_OBJECTS) - $(LD) $(LD_FLAGS) -T$(LINKER_SCRIPT) $(LIBRARY_PATHS) -o $@ $^ $(LIBRARIES) $(LD_SYS_LIBS) $(LIBRARIES) $(LD_SYS_LIBS) +{% block target_project_elf %} +{{ super() }} @echo "" @echo "*****" @echo "***** You must modify vector checksum value in *.bin and *.hex files." @echo "*****" @echo "" - $(SIZE) $@ - -$(PROJECT).bin: $(PROJECT).elf - @$(OBJCOPY) -O binary $< $@ - -$(PROJECT).hex: $(PROJECT).elf - @$(OBJCOPY) -O ihex $< $@ - -$(PROJECT).lst: $(PROJECT).elf - @$(OBJDUMP) -Sdh $< > $@ - -lst: $(PROJECT).lst - -size: - $(SIZE) $(PROJECT).elf - -DEPS = $(OBJECTS:.o=.d) $(SYS_OBJECTS:.o=.d) --include $(DEPS) - +{% endblock %} diff --git a/workspace_tools/export/gcc_arm_stm32f407.tmpl b/workspace_tools/export/gcc_arm_stm32f407.tmpl index 224ceb2fae..6e616cc884 100644 --- a/workspace_tools/export/gcc_arm_stm32f407.tmpl +++ b/workspace_tools/export/gcc_arm_stm32f407.tmpl @@ -1,78 +1 @@ -# This file was automagically generated by mbed.org. For more information, -# see http://mbed.org/handbook/Exporting-to-GCC-ARM-Embedded - -GCC_BIN = -PROJECT = {{name}} -OBJECTS = {% for f in to_be_compiled %}{{f}} {% endfor %} -SYS_OBJECTS = {% for f in object_files %}{{f}} {% endfor %} -INCLUDE_PATHS = {% for p in include_paths %}-I{{p}} {% endfor %} -LIBRARY_PATHS = {% for p in library_paths %}-L{{p}} {% endfor %} -LIBRARIES = {% for lib in libraries %}-l{{lib}} {% endfor %} -LINKER_SCRIPT = {{linker_script}} - -############################################################################### -AS = $(GCC_BIN)arm-none-eabi-as -CC = $(GCC_BIN)arm-none-eabi-gcc -CPP = $(GCC_BIN)arm-none-eabi-g++ -LD = $(GCC_BIN)arm-none-eabi-gcc -OBJCOPY = $(GCC_BIN)arm-none-eabi-objcopy -OBJDUMP = $(GCC_BIN)arm-none-eabi-objdump -SIZE = $(GCC_BIN)arm-none-eabi-size - -CPU = -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=$(FLOAT_ABI) -CC_FLAGS = $(CPU) -c -g -fno-common -fmessage-length=0 -Wall -fno-exceptions -ffunction-sections -fdata-sections -fomit-frame-pointer -CC_FLAGS += -MMD -MP -CC_SYMBOLS = {% for s in symbols %}-D{{s}} {% endfor %} - -LD_FLAGS = $(CPU) -Wl,--gc-sections --specs=nano.specs -u _printf_float -u _scanf_float -Wl,--wrap,main -LD_FLAGS += -Wl,-Map=$(PROJECT).map,--cref -LD_SYS_LIBS = -lstdc++ -lsupc++ -lm -lc -lgcc -lnosys - -ifeq ($(HARDFP),1) - FLOAT_ABI = hard -else - FLOAT_ABI = softfp -endif - -ifeq ($(DEBUG), 1) - CC_FLAGS += -DDEBUG -O0 -else - CC_FLAGS += -DNDEBUG -Os -endif - -all: $(PROJECT).bin $(PROJECT).hex - -clean: - rm -f $(PROJECT).bin $(PROJECT).elf $(PROJECT).hex $(PROJECT).map $(PROJECT).lst $(OBJECTS) $(DEPS) - -.s.o: - $(AS) $(CPU) -o $@ $< - -.c.o: - $(CC) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu99 $(INCLUDE_PATHS) -o $@ $< - -.cpp.o: - $(CPP) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu++98 -fno-rtti $(INCLUDE_PATHS) -o $@ $< - - -$(PROJECT).elf: $(OBJECTS) $(SYS_OBJECTS) - $(LD) $(LD_FLAGS) -T$(LINKER_SCRIPT) $(LIBRARY_PATHS) -o $@ $^ $(LIBRARIES) $(LD_SYS_LIBS) $(LIBRARIES) $(LD_SYS_LIBS) - $(SIZE) $@ - -$(PROJECT).bin: $(PROJECT).elf - @$(OBJCOPY) -O binary $< $@ - -$(PROJECT).hex: $(PROJECT).elf - @$(OBJCOPY) -O ihex $< $@ - -$(PROJECT).lst: $(PROJECT).elf - @$(OBJDUMP) -Sdh $< > $@ - -lst: $(PROJECT).lst - -size: - $(SIZE) $(PROJECT).elf - -DEPS = $(OBJECTS:.o=.d) $(SYS_OBJECTS:.o=.d) --include $(DEPS) - +{% extends "gcc_arm_common.tmpl" %} diff --git a/workspace_tools/export/gccarm.py b/workspace_tools/export/gccarm.py index 0a70e7f98f..0e274e9be4 100755 --- a/workspace_tools/export/gccarm.py +++ b/workspace_tools/export/gccarm.py @@ -122,6 +122,7 @@ class GccArm(Exporter): 'library_paths': self.resources.lib_dirs, 'linker_script': self.resources.linker_script, 'libraries': libraries, - 'symbols': self.get_symbols() + 'symbols': self.get_symbols(), + 'cpu_flags': self.toolchain.cpu } self.gen_file('gcc_arm_%s.tmpl' % self.target.lower(), ctx, 'Makefile') diff --git a/workspace_tools/export_test.py b/workspace_tools/export_test.py index 32aa57da7e..63d33d5fb5 100755 --- a/workspace_tools/export_test.py +++ b/workspace_tools/export_test.py @@ -170,6 +170,7 @@ if __name__ == '__main__': ('gcc_arm', 'DISCO_F407VG'), ('gcc_arm', 'DISCO_F303VC'), ('gcc_arm', 'DISCO_F334C8'), + ('gcc_arm', 'DISCO_L053C8'), ('gcc_arm', 'NRF51822'), ('gcc_arm', 'HRM1017'), ('gcc_arm', 'NUCLEO_F401RE'), @@ -182,6 +183,17 @@ if __name__ == '__main__': ('gcc_arm', 'RZ_A1H'), ('gcc_arm', 'MAXWSNENV'), ('gcc_arm', 'MAX32600MBED'), + ('gcc_arm', 'ARCH_BLE'), + ('gcc_arm', 'ARCH_MAX'), + ('gcc_arm', 'ARCH_PRO'), + ('gcc_arm', 'DELTA_DFCM_NNN40'), + ('gcc_arm', 'K20D50M'), + ('gcc_arm', 'K22F'), + ('gcc_arm', 'K64F'), + ('gcc_arm', 'KL05Z'), + ('gcc_arm', 'KL25Z'), + ('gcc_arm', 'KL43Z'), + ('gcc_arm', 'KL46Z'), ('ds5_5', 'LPC1768'), ('ds5_5', 'LPC11U24'),