Skip to content

Commit 74a4cce

Browse files
committed
alif/Makefile: Create firmware.zip with files needed for deploying.
The resulting `firmware.zip` file is self contained with everything needed to deploy the firmware, eg over SE UART. Signed-off-by: Damien George <[email protected]>
1 parent 2f04381 commit 74a4cce

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

ports/alif/Makefile

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ Reset\n\
2121
Exit
2222

2323
ALIF_TOC_CONFIG = alif_cfg.json
24+
ALIF_TOC_BIN = $(BUILD)/firmware.toc.bin
2425
ALIF_TOC_APPS = $(BUILD)/$(ALIF_TOC_CONFIG)
2526
ALIF_TOC_CFLAGS += -DTOC_CFG_FILE=$(ALIF_TOOLKIT_CFG_FILE)
2627

@@ -69,7 +70,7 @@ include $(TOP)/extmod/extmod.mk
6970
# Main targets
7071

7172
.PHONY: all
72-
all: $(BUILD)/firmware.toc.bin
73+
all: $(BUILD)/firmware.zip
7374

7475
# Force make commands to run the targets every time
7576
# regardless of whether firmware.toc.bin already exists
@@ -90,15 +91,19 @@ $(BUILD)/$(ALIF_TOC_CONFIG): mcu/$(ALIF_TOC_CONFIG).in | $(BUILD)
9091
$(ECHO) "Preprocess toc config $@"
9192
$(Q)$(CPP) -P -E $(ALIF_TOC_CFLAGS) - < mcu/$(ALIF_TOC_CONFIG).in > $@
9293

93-
$(BUILD)/firmware.toc.bin: $(ALIF_TOC_APPS)
94+
$(ALIF_TOC_BIN): $(ALIF_TOC_APPS)
9495
$(Q)python $(ALIF_TOOLS)/app-gen-toc.py \
9596
--filename $(abspath $(BUILD)/$(ALIF_TOC_CONFIG)) \
9697
--output-dir $(BUILD) \
9798
--firmware-dir $(BUILD) \
9899
--output $@
99100

101+
$(BUILD)/firmware.zip: $(ALIF_TOC_BIN) $(ALIF_TOC_APPS)
102+
$(ECHO) "Create $@"
103+
$(Q)$(ZIP) -q - $(BUILD)/application_package.ds $^ > $@
104+
100105
.PHONY: deploy
101-
deploy: $(BUILD)/firmware.toc.bin
106+
deploy: $(ALIF_TOC_BIN)
102107
$(ECHO) "Writing $< to the board"
103108
$(Q)python $(ALIF_TOOLS)/app-write-mram.py \
104109
--cfg-part $(ALIF_TOOLKIT_CFG_PART) \

0 commit comments

Comments
 (0)