1 BASE_TARGETS
= $(sort $(notdir $(patsubst %/,%,$(dir $(wildcard $(ROOT
)/src
/main
/target
/*/target.mk
)))))
2 VALID_TARGETS
= $(sort $(BASE_TARGETS
))
4 CI_TARGETS
:= $(VALID_TARGETS
)
6 # silently ignore if the file is not present. Allows for target defaults.
7 -include $(ROOT
)/src
/main
/target
/$(TARGET
)/target.mk
9 F4_TARGETS
:= $(F405_TARGETS
) $(F411_TARGETS
) $(F446_TARGETS
)
10 F7_TARGETS
:= $(F7X2RE_TARGETS
) $(F7X5XE_TARGETS
) $(F7X5XG_TARGETS
) $(F7X5XI_TARGETS
) $(F7X6XG_TARGETS
)
11 G4_TARGETS
:= $(G47X_TARGETS
)
12 H7_TARGETS
:= $(H743xI_TARGETS
) $(H750xB_TARGETS
) $(H7A3xI_TARGETS
) $(H7A3xIQ_TARGETS
) $(H723xG_TARGETS
) $(H725xG_TARGETS
) $(H730xB_TARGETS
)
14 ifeq ($(filter $(TARGET
),$(VALID_TARGETS
)),)
15 $(error Target
'$(TARGET)' is not valid
, must be one of
$(VALID_TARGETS
). Have you prepared a valid target.mk?
)
18 ifeq ($(filter $(TARGET
), $(F4_TARGETS
) $(F7_TARGETS
) $(G4_TARGETS
) $(H7_TARGETS
) $(SITL_TARGETS
)),)
19 $(error Target
'$(TARGET)' has not specified a valid STM group
, must be one of F405
, F411
, F446
, F7X2RE
, F7X5XE
, F7X5XG
, F7X5XI
, F7X6XG
, G47X or H7X3XI. Have you prepared a valid target.mk?
)
22 ifeq ($(TARGET
),$(filter $(TARGET
), $(F4_TARGETS
)))
25 else ifeq ($(TARGET
),$(filter $(TARGET
), $(F7_TARGETS
)))
28 else ifeq ($(TARGET
),$(filter $(TARGET
), $(G4_TARGETS
)))
31 else ifeq ($(TARGET
),$(filter $(TARGET
), $(H7_TARGETS
)))
34 else ifeq ($(TARGET
),$(filter $(TARGET
), $(SITL_TARGETS
)))
39 $(error Unknown target MCU specified.
)
42 TARGET_FLAGS
:= $(TARGET_FLAGS
) -D
$(TARGET_MCU
)