From: Keith Packard Date: Mon, 4 Mar 2024 00:37:09 +0000 (-0800) Subject: altos/easytimer-v2: Generate combined .ihx file for seeed testing X-Git-Tag: 1.9.18~2^2~9 X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=commitdiff_plain;h=d7a91278051ff75e3edc3e999a6d8096fa4deec4 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 --- 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: