summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--stmhal/Makefile13
1 files changed, 13 insertions, 0 deletions
diff --git a/stmhal/Makefile b/stmhal/Makefile
index 9f8c13a87e..1edc31daa8 100644
--- a/stmhal/Makefile
+++ b/stmhal/Makefile
@@ -264,6 +264,19 @@ $(BUILD)/$(HAL_DIR)/src/stm32$(MCU_SERIES)xx_hal_sd.o: COPT += -Os
all: $(BUILD)/firmware.dfu $(BUILD)/firmware.hex
+ifneq ($(FROZEN_DIR),)
+CFLAGS += -DMICROPY_MODULE_FROZEN
+OBJ += $(BUILD)/frozen-files.o
+MAKE_FROZEN = ../tools/make-frozen.py
+
+$(BUILD)/frozen-files.o: $(BUILD)/frozen-files.c
+ $(call compile_c)
+
+$(BUILD)/frozen-files.c: $(shell find $(FROZEN_DIR) -type f)
+ @$(ECHO) "Creating $@"
+ $(Q)$(PYTHON) $(MAKE_FROZEN) $(FROZEN_DIR) > $@
+endif
+
.PHONY: deploy
deploy: $(BUILD)/firmware.dfu