From d7a91278051ff75e3edc3e999a6d8096fa4deec4 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Sun, 3 Mar 2024 16:37:09 -0800 Subject: [PATCH] altos/easytimer-v2: Generate combined .ihx file for seeed testing The test plan for seeed requires a combined loader and firmware image for a single flashing step. Signed-off-by: Keith Packard --- src/easytimer-v2/Makefile | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/easytimer-v2/Makefile b/src/easytimer-v2/Makefile index 2298ab48..32b9117a 100644 --- a/src/easytimer-v2/Makefile +++ b/src/easytimer-v2/Makefile @@ -71,17 +71,30 @@ CFLAGS = $(PRODUCT_DEF) $(SAMD21_CFLAGS) $(PROFILE_DEF) $(SAMPLE_PROFILE_DEF) $( PROGNAME=easytimer-v2 PROG=$(PROGNAME)-$(VERSION).elf HEX=$(PROGNAME)-$(VERSION).ihx +FLASH_PROG=flash-loader/$(PROGNAME)-altos-flash-$(VERSION).elf +BOTH_HEX=$(PROGNAME)-combined-$(VERSION).ihx + +ELFTOHEX=$(TOPDIR)/../ao-tools/ao-elftohex/ao-elftohex SRC=$(ALTOS_SRC) ao_easytimer.c OBJ=$(SRC:.c=.o) -all: $(PROG) $(HEX) +all: $(PROG) $(HEX) $(BOTH_HEX) $(PROG): Makefile $(OBJ) $(call quiet,CC) $(LDFLAGS) -o $(PROG) $(OBJ) $(LIBS) +$(BOTH_HEX): $(PROG) $(FLASH_PROG) + $(ELFTOHEX) --nosym --output=$@ $(FLASH_PROG) $(PROG) + $(OBJ): $(INC) + +$(FLASH_PROG): FRC + +cd flash-loader && make + +FRC: + distclean: clean clean: -- 2.30.2