Skip to content

Commit c913050

Browse files
committed
Move hex file merging to common makefile
1 parent 4ac92da commit c913050

13 files changed

+11
-179
lines changed

tools/export/gcc_arm_arch_ble.tmpl

Lines changed: 0 additions & 14 deletions
This file was deleted.

tools/export/gcc_arm_common.tmpl

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@ LD = $(GCC_BIN)arm-none-eabi-gcc
4949
OBJCOPY = $(GCC_BIN)arm-none-eabi-objcopy
5050
OBJDUMP = $(GCC_BIN)arm-none-eabi-objdump
5151
SIZE = $(GCC_BIN)arm-none-eabi-size
52+
{% if hex_files %}
53+
SREC_CAT = srec_cat
54+
{% endif %}
5255
{%- block additional_executables -%}{% endblock %}
5356

5457
{%- block flags -%}
@@ -82,9 +85,11 @@ endif
8285

8386
.PHONY: all lst size
8487

85-
{% block target_all -%}
88+
{% if hex_files -%}
89+
all: $(PROJECT).bin $(PROJECT)-combined.hex size
90+
{% else %}
8691
all: $(PROJECT).bin $(PROJECT).hex size
87-
{% endblock %}
92+
{% endif %}
8893

8994

9095
.asm.o:
@@ -128,6 +133,9 @@ size: $(PROJECT).elf
128133
DEPS = $(OBJECTS:.o=.d) $(SYS_OBJECTS:.o=.d)
129134
-include $(DEPS)
130135

131-
{% block additional_targets %}{% endblock %}
136+
{% if hex_files %}
137+
$(PROJECT)-combined.hex: $(PROJECT).hex
138+
$(SREC_CAT) {% for f in hex_files %}{{f}} {% endfor %} -intel $(PROJECT).hex -intel -o $(PROJECT)-combined.hex -intel --line-length=44
139+
{% endif %}
132140
endif
133141

tools/export/gcc_arm_delta_dfcm_nnn40.tmpl

Lines changed: 0 additions & 14 deletions
This file was deleted.

tools/export/gcc_arm_hrm1017.tmpl

Lines changed: 0 additions & 14 deletions
This file was deleted.

tools/export/gcc_arm_mtm_mtconnect04S.tmpl

Lines changed: 0 additions & 14 deletions
This file was deleted.

tools/export/gcc_arm_nrf51822.tmpl

Lines changed: 0 additions & 14 deletions
This file was deleted.

tools/export/gcc_arm_nrf51_dk.tmpl

Lines changed: 0 additions & 18 deletions
This file was deleted.

tools/export/gcc_arm_nrf51_dongle.tmpl

Lines changed: 0 additions & 14 deletions
This file was deleted.

tools/export/gcc_arm_nrf51_microbit.tmpl

Lines changed: 0 additions & 14 deletions
This file was deleted.

tools/export/gcc_arm_rblab_blenano.tmpl

Lines changed: 0 additions & 14 deletions
This file was deleted.

0 commit comments

Comments
 (0)