Move hex file merging to common makefile

pull/2577/head
Jimmy Brisson 2016-08-17 15:19:51 -05:00
parent 4ac92daac9
commit c913050053
13 changed files with 11 additions and 179 deletions

View File

@ -1,14 +0,0 @@
{% extends "gcc_arm_common.tmpl" %}
{% 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 %}
{% block additional_executables %}
SREC_CAT = srec_cat
{% endblock %}
{% block additional_targets %}
merge:
$(SREC_CAT) $(SOFTDEVICE) -intel $(PROJECT).hex -intel -o combined.hex -intel --line-length=44
{% endblock %}

View File

@ -49,6 +49,9 @@ 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
{% if hex_files %}
SREC_CAT = srec_cat
{% endif %}
{%- block additional_executables -%}{% endblock %}
{%- block flags -%}
@ -82,9 +85,11 @@ endif
.PHONY: all lst size
{% block target_all -%}
{% if hex_files -%}
all: $(PROJECT).bin $(PROJECT)-combined.hex size
{% else %}
all: $(PROJECT).bin $(PROJECT).hex size
{% endblock %}
{% endif %}
.asm.o:
@ -128,6 +133,9 @@ size: $(PROJECT).elf
DEPS = $(OBJECTS:.o=.d) $(SYS_OBJECTS:.o=.d)
-include $(DEPS)
{% block additional_targets %}{% endblock %}
{% if hex_files %}
$(PROJECT)-combined.hex: $(PROJECT).hex
$(SREC_CAT) {% for f in hex_files %}{{f}} {% endfor %} -intel $(PROJECT).hex -intel -o $(PROJECT)-combined.hex -intel --line-length=44
{% endif %}
endif

View File

@ -1,14 +0,0 @@
{% extends "gcc_arm_common.tmpl" %}
{% 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 %}
{% block additional_executables %}
SREC_CAT = srec_cat
{% endblock %}
{% block additional_targets %}
merge:
$(SREC_CAT) $(SOFTDEVICE) -intel $(PROJECT).hex -intel -o combined.hex -intel --line-length=44
{% endblock %}

View File

@ -1,14 +0,0 @@
{% extends "gcc_arm_common.tmpl" %}
{% block additional_variables %}
SOFTDEVICE = mbed/TARGET_HRM1017/TARGET_NORDIC/TARGET_MCU_NRF51822/Lib/s130_nrf51822_1_0_0/s130_nrf51_1.0.0_softdevice.hex
{% endblock %}
{% block additional_executables %}
SREC_CAT = srec_cat
{% endblock %}
{% block additional_targets %}
merge:
$(SREC_CAT) $(SOFTDEVICE) -intel $(PROJECT).hex -intel -o combined.hex -intel --line-length=44
{% endblock %}

View File

@ -1,14 +0,0 @@
{% extends "gcc_arm_common.tmpl" %}
{% block additional_variables %}
SOFTDEVICE = mbed/TARGET_MTM_MTCONNECT04S/TARGET_NORDIC/TARGET_MCU_NRF51822/Lib/s130_nrf51822_1_0_0/s130_nrf51_1.0.0_softdevice.hex
{% endblock %}
{% block additional_executables %}
SREC_CAT = srec_cat
{% endblock %}
{% block additional_targets %}
merge:
$(SREC_CAT) $(SOFTDEVICE) -intel $(PROJECT).hex -intel -o combined.hex -intel --line-length=44
{% endblock %}

View File

@ -1,14 +0,0 @@
{% extends "gcc_arm_common.tmpl" %}
{% 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 %}
{% block additional_executables %}
SREC_CAT = srec_cat
{% endblock %}
{% block additional_targets %}
merge:
$(SREC_CAT) $(SOFTDEVICE) -intel $(PROJECT).hex -intel -o combined.hex -intel --line-length=44
{% endblock %}

View File

@ -1,18 +0,0 @@
{% extends "gcc_arm_common.tmpl" %}
{% block target_all %}
all: $(PROJECT).bin $(PROJECT)-combined.hex size
{% endblock %}
{% block additional_variables %}
SOFTDEVICE = {% for f in hex_files %}{{f}} {% endfor %}
{% endblock %}
{% block additional_executables %}
SREC_CAT = srec_cat
{% endblock %}
{% block additional_targets %}
$(PROJECT)-combined.hex: $(PROJECT).hex
$(SREC_CAT) $(SOFTDEVICE) -intel $(PROJECT).hex -intel -o $(PROJECT)-combined.hex -intel --line-length=44
{% endblock %}

View File

@ -1,14 +0,0 @@
{% extends "gcc_arm_common.tmpl" %}
{% 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 %}
{% block additional_executables %}
SREC_CAT = srec_cat
{% endblock %}
{% block additional_targets %}
merge:
$(SREC_CAT) $(SOFTDEVICE) -intel $(PROJECT).hex -intel -o combined.hex -intel --line-length=44
{% endblock %}

View File

@ -1,14 +0,0 @@
{% extends "gcc_arm_common.tmpl" %}
{% block additional_variables %}
SOFTDEVICE = mbed/TARGET_NRF51_MICROBIT/TARGET_NORDIC/TARGET_MCU_NRF51822/Lib/s110_nrf51822_8_0_0/s110_nrf51822_8.0.0_softdevice.hex
{% endblock %}
{% block additional_executables %}
SREC_CAT = srec_cat
{% endblock %}
{% block additional_targets %}
merge:
$(SREC_CAT) $(SOFTDEVICE) -intel $(PROJECT).hex -intel -o combined.hex -intel --line-length=44
{% endblock %}

View File

@ -1,14 +0,0 @@
{% extends "gcc_arm_common.tmpl" %}
{% block additional_variables %}
SOFTDEVICE = mbed/TARGET_RBLAB_BLENANO/TARGET_NORDIC/TARGET_MCU_NRF51822/Lib/s130_nrf51822_1_0_0/s130_nrf51_1.0.0_softdevice.hex
{% endblock %}
{% block additional_executables %}
SREC_CAT = srec_cat
{% endblock %}
{% block additional_targets %}
merge:
$(SREC_CAT) $(SOFTDEVICE) -intel $(PROJECT).hex -intel -o combined.hex -intel --line-length=44
{% endblock %}

View File

@ -1,14 +0,0 @@
{% extends "gcc_arm_common.tmpl" %}
{% 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 %}
{% block additional_executables %}
SREC_CAT = srec_cat
{% endblock %}
{% block additional_targets %}
merge:
$(SREC_CAT) $(SOFTDEVICE) -intel $(PROJECT).hex -intel -o combined.hex -intel --line-length=44
{% endblock %}

View File

@ -1,14 +0,0 @@
{% extends "gcc_arm_common.tmpl" %}
{% 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 %}
{% block additional_executables %}
SREC_CAT = srec_cat
{% endblock %}
{% block additional_targets %}
merge:
$(SREC_CAT) $(SOFTDEVICE) -intel $(PROJECT).hex -intel -o combined.hex -intel --line-length=44
{% endblock %}

View File

@ -1,18 +0,0 @@
{% extends "gcc_arm_common.tmpl" %}
{% block target_all %}
all: $(PROJECT).bin $(PROJECT)-combined.hex size
{% endblock %}
{% block additional_variables %}
SOFTDEVICE = {% for f in hex_files %}{{f}} {% endfor %}
{% endblock %}
{% block additional_executables %}
SREC_CAT = srec_cat
{% endblock %}
{% block additional_targets %}
$(PROJECT)-combined.hex: $(PROJECT).hex
$(SREC_CAT) $(SOFTDEVICE) -intel $(PROJECT).hex -intel -o $(PROJECT)-combined.hex -intel --line-length=44
{% endblock %}