Skip to content
Snippets Groups Projects
Commit 42a6364a authored by Dave Hylands's avatar Dave Hylands Committed by Damien George
Browse files

stmhal: Add support for building frozen files.

This allows FROZEN_DIR=some-directory to be specified on the make
command line, which will then add all of the files contained within
the indicated frozen directory as frozen files in the image.

There is no change in flash/ram usage if not using the feature.

This is especially useful on smaller MCUs (like the 401) which only
has 64K flash file system.
parent 6c8b3a7f
No related branches found
No related tags found
No related merge requests found
...@@ -264,6 +264,19 @@ $(BUILD)/$(HAL_DIR)/src/stm32$(MCU_SERIES)xx_hal_sd.o: COPT += -Os ...@@ -264,6 +264,19 @@ $(BUILD)/$(HAL_DIR)/src/stm32$(MCU_SERIES)xx_hal_sd.o: COPT += -Os
all: $(BUILD)/firmware.dfu $(BUILD)/firmware.hex 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 .PHONY: deploy
deploy: $(BUILD)/firmware.dfu deploy: $(BUILD)/firmware.dfu
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment