Skip to content

Commit d7a9127

Browse files
committed
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 <[email protected]>
1 parent a017cfc commit d7a9127

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

src/easytimer-v2/Makefile

+14-1
Original file line numberDiff line numberDiff line change
@@ -71,17 +71,30 @@ CFLAGS = $(PRODUCT_DEF) $(SAMD21_CFLAGS) $(PROFILE_DEF) $(SAMPLE_PROFILE_DEF) $(
7171
PROGNAME=easytimer-v2
7272
PROG=$(PROGNAME)-$(VERSION).elf
7373
HEX=$(PROGNAME)-$(VERSION).ihx
74+
FLASH_PROG=flash-loader/$(PROGNAME)-altos-flash-$(VERSION).elf
75+
BOTH_HEX=$(PROGNAME)-combined-$(VERSION).ihx
76+
77+
ELFTOHEX=$(TOPDIR)/../ao-tools/ao-elftohex/ao-elftohex
7478

7579
SRC=$(ALTOS_SRC) ao_easytimer.c
7680
OBJ=$(SRC:.c=.o)
7781

78-
all: $(PROG) $(HEX)
82+
all: $(PROG) $(HEX) $(BOTH_HEX)
7983

8084
$(PROG): Makefile $(OBJ)
8185
$(call quiet,CC) $(LDFLAGS) -o $(PROG) $(OBJ) $(LIBS)
8286

87+
$(BOTH_HEX): $(PROG) $(FLASH_PROG)
88+
$(ELFTOHEX) --nosym --output=$@ $(FLASH_PROG) $(PROG)
89+
8390
$(OBJ): $(INC)
8491

92+
93+
$(FLASH_PROG): FRC
94+
+cd flash-loader && make
95+
96+
FRC:
97+
8598
distclean: clean
8699

87100
clean:

0 commit comments

Comments
 (0)