Skip to content

Commit 0b3ad98

Browse files
committed
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 <[email protected]>
1 parent db85427 commit 0b3ad98

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

ports/mimxrt/Makefile

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -327,6 +327,8 @@ SRC_SS = \
327327

328328
SRC_S += shared/runtime/gchelper_thumb2.s \
329329

330+
hal/resethandler_MIMXRT10xx.S: $(GEN_FLEXRAM_CONFIG_SRC)
331+
330332
# =============================================================================
331333
# QSTR Sources
332334
# =============================================================================
@@ -521,16 +523,16 @@ $(BUILD)/firmware.uf2: $(BUILD)/firmware.elf
521523
# any of the objects. The normal dependency generation will deal with the
522524
# case when pins.h is modified. But when it doesn't exist, we don't know
523525
# which source files might need it.
524-
$(OBJ): | $(GEN_PINS_HDR) $(GEN_FLEXRAM_CONFIG_SRC)
526+
$(OBJ): | $(GEN_PINS_HDR)
525527

526528
# With conditional pins, we may need to regenerate qstrdefs.h when config
527529
# options change.
528530
$(HEADER_BUILD)/qstrdefs.generated.h: $(BOARD_DIR)/mpconfigboard.h
529531

530-
$(GEN_FLEXRAM_CONFIG_SRC):
532+
$(GEN_FLEXRAM_CONFIG_SRC): $(HEADER_BUILD)
531533
$(ECHO) "Create $@"
532534
$(Q)$(PYTHON) $(MAKE_FLEXRAM_LD) -d $(TOP)/$(MCU_DIR)/$(MCU_SERIES)$(MCU_CORE).h \
533-
-f $(TOP)/$(MCU_DIR)/$(MCU_SERIES)$(MCU_CORE)_features.h -l boards/$(MCU_SERIES).ld -c $(MCU_SERIES) > $(GEN_FLEXRAM_CONFIG_SRC)
535+
-f $(TOP)/$(MCU_DIR)/$(MCU_SERIES)$(MCU_CORE)_features.h -l boards/$(MCU_SERIES).ld -c $(MCU_SERIES) > $@
534536

535537
# Use a pattern rule here so that make will only call make-pins.py once to make
536538
# both pins_gen.c and pins.h

0 commit comments

Comments
 (0)