stm32/boards/make-pins.py: Don't generate qstrs.
Qstrs are picked up from the generated pin source files in the usual qstr processing stage. Similarly for the stm constant qstrs. This work was funded through GitHub Sponsors. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
This commit is contained in:
committed by
Damien George
parent
c3c7c602da
commit
fc54d25a45
@@ -25,12 +25,11 @@ include ../../py/mkenv.mk
|
||||
-include mpconfigport.mk
|
||||
include $(BOARD_DIR)/mpconfigboard.mk
|
||||
|
||||
# Files that are generated and needed before the QSTR build.
|
||||
QSTR_GENERATED_HEADERS = $(GEN_PINS_QSTR) $(GEN_STMCONST_QSTR)
|
||||
|
||||
# qstr definitions (must come before including py.mk)
|
||||
QSTR_DEFS += qstrdefsport.h $(QSTR_GENERATED_HEADERS)
|
||||
QSTR_GLOBAL_DEPENDENCIES += mpconfigboard_common.h $(BOARD_DIR)/mpconfigboard.h $(QSTR_GENERATED_HEADERS)
|
||||
QSTR_DEFS += qstrdefsport.h
|
||||
|
||||
# Files that are generated and needed before the QSTR build.
|
||||
QSTR_GLOBAL_DEPENDENCIES += mpconfigboard_common.h $(BOARD_DIR)/mpconfigboard.h $(GEN_STMCONST_HDR)
|
||||
|
||||
# MicroPython feature configurations
|
||||
MICROPY_ROM_TEXT_COMPRESSION ?= 1
|
||||
@@ -71,7 +70,6 @@ BOARD_PINS = $(BOARD_DIR)/pins.csv
|
||||
PREFIX_FILE = boards/stm32f4xx_prefix.c
|
||||
GEN_PINS_SRC = $(BUILD)/pins_$(BOARD).c
|
||||
GEN_PINS_HDR = $(HEADER_BUILD)/pins.h
|
||||
GEN_PINS_QSTR = $(BUILD)/pins_qstr.h
|
||||
GEN_PINS_AF_CONST = $(HEADER_BUILD)/pins_af_const.h
|
||||
GEN_PINS_AF_DEFS = $(HEADER_BUILD)/pins_af_defs.h
|
||||
GEN_PINS_AF_PY = $(BUILD)/pins_af.py
|
||||
@@ -86,7 +84,6 @@ GEN_CDCINF_HEADER = $(HEADER_BUILD)/pybcdc_inf.h
|
||||
|
||||
GEN_PLLFREQTABLE_HDR = $(HEADER_BUILD)/pllfreqtable.h
|
||||
GEN_STMCONST_HDR = $(HEADER_BUILD)/modstm_const.h
|
||||
GEN_STMCONST_QSTR = $(BUILD)/modstm_qstr.h
|
||||
GEN_STMCONST_MPZ = $(HEADER_BUILD)/modstm_mpz.h
|
||||
CMSIS_MCU_HDR = $(STM32LIB_CMSIS_ABS)/Include/$(CMSIS_MCU_LOWER).h
|
||||
|
||||
@@ -655,7 +652,7 @@ $(BUILD)/firmware.elf: $(OBJ)
|
||||
$(call GENERATE_ELF,$@,$^)
|
||||
|
||||
# List of sources for qstr extraction
|
||||
SRC_QSTR += $(SRC_C) $(SRC_CXX) $(SHARED_SRC_C)
|
||||
SRC_QSTR += $(SRC_C) $(SRC_CXX) $(SHARED_SRC_C) $(GEN_PINS_SRC)
|
||||
# Append any auto-generated sources that are needed by sources listed in
|
||||
# SRC_QSTR
|
||||
SRC_QSTR_AUTO_DEPS += $(GEN_CDCINF_HEADER)
|
||||
@@ -676,13 +673,12 @@ main.c: $(GEN_CDCINF_HEADER)
|
||||
|
||||
# Use a pattern rule here so that make will only call make-pins.py once to make
|
||||
# both pins_$(BOARD).c and pins.h
|
||||
$(BUILD)/%_$(BOARD).c $(HEADER_BUILD)/%.h $(HEADER_BUILD)/%_af_const.h $(HEADER_BUILD)/%_af_defs.h $(BUILD)/%_qstr.h: $(BOARD_DIR)/%.csv $(MAKE_PINS) $(AF_FILE) $(PREFIX_FILE) | $(HEADER_BUILD)
|
||||
$(BUILD)/%_$(BOARD).c $(HEADER_BUILD)/%.h $(HEADER_BUILD)/%_af_const.h $(HEADER_BUILD)/%_af_defs.h: $(BOARD_DIR)/%.csv $(MAKE_PINS) $(AF_FILE) $(PREFIX_FILE) | $(HEADER_BUILD)
|
||||
$(ECHO) "GEN $@"
|
||||
$(Q)$(PYTHON) $(MAKE_PINS) --board $(BOARD_PINS) --af $(AF_FILE) \
|
||||
--prefix $(PREFIX_FILE) --hdr $(GEN_PINS_HDR) --hdr-obj-decls \
|
||||
--qstr $(GEN_PINS_QSTR) --af-const $(GEN_PINS_AF_CONST) \
|
||||
--af-defs $(GEN_PINS_AF_DEFS) --af-defs-cmp-strings \
|
||||
--af-py $(GEN_PINS_AF_PY) > $(GEN_PINS_SRC)
|
||||
--af-const $(GEN_PINS_AF_CONST) --af-defs $(GEN_PINS_AF_DEFS) \
|
||||
--af-defs-cmp-strings --af-py $(GEN_PINS_AF_PY) > $(GEN_PINS_SRC)
|
||||
|
||||
modmachine.c: $(GEN_PLLFREQTABLE_HDR)
|
||||
$(GEN_PLLFREQTABLE_HDR): $(PLLVALUES) | $(HEADER_BUILD)
|
||||
@@ -690,11 +686,9 @@ $(GEN_PLLFREQTABLE_HDR): $(PLLVALUES) | $(HEADER_BUILD)
|
||||
$(Q)$(PYTHON) $(PLLVALUES) -c -m $(CMSIS_MCU_LOWER) file:$(BOARD_DIR)/stm32$(MCU_SERIES)xx_hal_conf.h > $@
|
||||
|
||||
$(BUILD)/modstm.o: $(GEN_STMCONST_HDR)
|
||||
# Use a pattern rule here so that make will only call make-stmconst.py once to
|
||||
# make both modstm_const.h and modstm_qstr.h
|
||||
$(HEADER_BUILD)/%_const.h $(BUILD)/%_qstr.h: $(CMSIS_MCU_HDR) make-stmconst.py | $(HEADER_BUILD)
|
||||
$(HEADER_BUILD)/modstm_const.h: $(CMSIS_MCU_HDR) make-stmconst.py | $(HEADER_BUILD)
|
||||
$(ECHO) "GEN stmconst $@"
|
||||
$(Q)$(PYTHON) make-stmconst.py --qstr $(GEN_STMCONST_QSTR) --mpz $(GEN_STMCONST_MPZ) $(CMSIS_MCU_HDR) > $(GEN_STMCONST_HDR)
|
||||
$(Q)$(PYTHON) make-stmconst.py --mpz $(GEN_STMCONST_MPZ) $(CMSIS_MCU_HDR) > $(GEN_STMCONST_HDR)
|
||||
|
||||
$(GEN_CDCINF_HEADER): $(GEN_CDCINF_FILE) $(FILE2H) | $(HEADER_BUILD)
|
||||
$(ECHO) "GEN $@"
|
||||
|
||||
Reference in New Issue
Block a user