Skip to content

Commit 96b3590

Browse files
authored
Merge pull request #3222 from theotherjimmy/make-print-executable
[Export - Make] Add message that informs the user which hex to flash
2 parents 5fd81b3 + def0a38 commit 96b3590

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tools/export/makefile/Makefile.tmpl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ else
1313
RM = '$(SHELL)' -c "rm -rf \"$(1)\""
1414
endif
1515

16+
OBJDIR := .build
1617
# Move to the build directory
17-
ifeq (,$(filter .build,$(notdir $(CURDIR))))
18+
ifeq (,$(filter $(OBJDIR),$(notdir $(CURDIR))))
1819
.SUFFIXES:
19-
OBJDIR := .build
2020
mkfile_path := $(abspath $(lastword $(MAKEFILE_LIST)))
2121
MAKETARGET = '$(MAKE)' --no-print-directory -C $(OBJDIR) -f '$(mkfile_path)' \
2222
'SRCDIR=$(CURDIR)' $(MAKECMDGOALS)
@@ -127,6 +127,7 @@ $(PROJECT).elf: $(OBJECTS) $(SYS_OBJECTS) $(LINKER_SCRIPT)
127127

128128
$(PROJECT).bin: $(PROJECT).elf
129129
{%- block elf2bin -%}{%- endblock %}
130+
{% if not hex_files %} +@echo ===== bin file ready to flash: $(OBJDIR)/$@ ===== {% endif %}
130131

131132
$(PROJECT).hex: $(PROJECT).elf
132133
{%- block elf2hex -%}{%- endblock %}
@@ -135,6 +136,7 @@ $(PROJECT).hex: $(PROJECT).elf
135136
$(PROJECT)-combined.hex: $(PROJECT).hex
136137
+@echo "NOTE: the $(SREC_CAT) binary is required to be present in your PATH. Please see http://srecord.sourceforge.net/ for more information."
137138
$(SREC_CAT) {% for f in hex_files %}{{f}} {% endfor %} -intel $(PROJECT).hex -intel -o $(PROJECT)-combined.hex -intel --line-length=44
139+
+@echo ===== hex file ready to flash: $(OBJDIR)/$@ =====
138140
{% endif %}
139141
# Rules
140142
###############################################################################

0 commit comments

Comments
 (0)