summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien George <damien@micropython.org>2025-04-10 13:54:01 +1000
committerDamien George <damien@micropython.org>2025-04-10 13:56:51 +1000
commit0b3ad98ea97bc504bb594639f5fcced5b5397eec (patch)
treeb9d58101cae4f94d088a200869a64a5927ac4441
parentdb854270719bfa4dda003d38893c1b8f39bf58de (diff)
mimxrt/Makefile: Fix dependencies for generation of flexram_config.s.
Prior to this fix the following would fail: $ make build-TEENSY40/flexram_config.s because it didn't create the build directory before generating the file. Also, make `hal/resethandler_MIMXRT10xx.S` have an explicit dependency on `flexram_config.s` rather than the latter just being forced to be built before everything else. Signed-off-by: Damien George <damien@micropython.org>
-rw-r--r--ports/mimxrt/Makefile8
1 files changed, 5 insertions, 3 deletions
diff --git a/ports/mimxrt/Makefile b/ports/mimxrt/Makefile
index 5c5429502..c0358387f 100644
--- a/ports/mimxrt/Makefile
+++ b/ports/mimxrt/Makefile
@@ -327,6 +327,8 @@ SRC_SS = \
SRC_S += shared/runtime/gchelper_thumb2.s \
+hal/resethandler_MIMXRT10xx.S: $(GEN_FLEXRAM_CONFIG_SRC)
+
# =============================================================================
# QSTR Sources
# =============================================================================
@@ -521,16 +523,16 @@ $(BUILD)/firmware.uf2: $(BUILD)/firmware.elf
# any of the objects. The normal dependency generation will deal with the
# case when pins.h is modified. But when it doesn't exist, we don't know
# which source files might need it.
-$(OBJ): | $(GEN_PINS_HDR) $(GEN_FLEXRAM_CONFIG_SRC)
+$(OBJ): | $(GEN_PINS_HDR)
# With conditional pins, we may need to regenerate qstrdefs.h when config
# options change.
$(HEADER_BUILD)/qstrdefs.generated.h: $(BOARD_DIR)/mpconfigboard.h
-$(GEN_FLEXRAM_CONFIG_SRC):
+$(GEN_FLEXRAM_CONFIG_SRC): $(HEADER_BUILD)
$(ECHO) "Create $@"
$(Q)$(PYTHON) $(MAKE_FLEXRAM_LD) -d $(TOP)/$(MCU_DIR)/$(MCU_SERIES)$(MCU_CORE).h \
- -f $(TOP)/$(MCU_DIR)/$(MCU_SERIES)$(MCU_CORE)_features.h -l boards/$(MCU_SERIES).ld -c $(MCU_SERIES) > $(GEN_FLEXRAM_CONFIG_SRC)
+ -f $(TOP)/$(MCU_DIR)/$(MCU_SERIES)$(MCU_CORE)_features.h -l boards/$(MCU_SERIES).ld -c $(MCU_SERIES) > $@
# Use a pattern rule here so that make will only call make-pins.py once to make
# both pins_gen.c and pins.h