Merge pull request #11195 from mathiasvr/pr-elrs-clean
[betaflight.git] / src / main / target / STM32_UNIFIED / target.mk
blobc5e6a16f175ec202fdaa858b83ca07d655f9d2b6
1 RX_SRC = \
2 rx/cc2500_common.c \
3 rx/cc2500_frsky_shared.c \
4 rx/cc2500_frsky_d.c \
5 rx/cc2500_frsky_x.c \
6 rx/cc2500_sfhss.c \
7 rx/cc2500_redpine.c \
8 rx/a7105_flysky.c \
9 rx/cyrf6936_spektrum.c \
10 drivers/rx/expresslrs_driver.c \
11 rx/expresslrs.c \
12 rx/expresslrs_common.c \
13 rx/expresslrs_telemetry.c \
14 drivers/rx/rx_cc2500.c \
15 drivers/rx/rx_a7105.c \
16 drivers/rx/rx_cyrf6936.c \
17 drivers/rx/rx_sx127x.c \
18 drivers/rx/rx_sx1280.c \
20 ifeq ($(TARGET), STM32F405)
21 F405_TARGETS += $(TARGET)
23 else
24 ifeq ($(TARGET), STM32F411)
25 F411_TARGETS += $(TARGET)
27 else
28 ifeq ($(TARGET), STM32F411SX1280)
29 F411_TARGETS += $(TARGET)
30 RX_SRC = \
31 drivers/rx/expresslrs_driver.c \
32 drivers/rx/rx_sx127x.c \
33 drivers/rx/rx_sx1280.c \
34 rx/expresslrs_telemetry.c \
35 rx/expresslrs_common.c \
36 rx/expresslrs.c \
38 else
39 ifeq ($(TARGET), STM32F7X2)
40 F7X2RE_TARGETS += $(TARGET)
42 else
43 ifeq ($(TARGET), STM32F745)
44 F7X5XG_TARGETS += $(TARGET)
46 else
47 ifeq ($(TARGET), STM32G47X)
48 G47X_TARGETS += $(TARGET)
50 else # STM32H743
51 H743xI_TARGETS += $(TARGET)
53 endif
54 endif
55 endif
56 endif
57 endif
58 endif
60 ifeq ($(TARGET), $(filter $(TARGET), STM32F405 STM32F745 STM32H743))
61 # Use a full block (16 kB) of flash for custom defaults - with 1 MB flash we have more than we know how to use anyway
63 CUSTOM_DEFAULTS_EXTENDED = yes
64 endif
66 ifeq ($(TARGET), STM32G47X)
67 FEATURES += VCP SDCARD_SPI ONBOARDFLASH
68 else
69 FEATURES += VCP SDCARD_SPI SDCARD_SDIO ONBOARDFLASH
70 endif
72 TARGET_SRC = \
73 $(addprefix drivers/accgyro/,$(notdir $(wildcard $(SRC_DIR)/drivers/accgyro/*.c))) \
74 $(ROOT)/lib/main/BoschSensortec/BMI270-Sensor-API/bmi270_maximum_fifo.c \
75 $(addprefix drivers/barometer/,$(notdir $(wildcard $(SRC_DIR)/drivers/barometer/*.c))) \
76 $(addprefix drivers/compass/,$(notdir $(wildcard $(SRC_DIR)/drivers/compass/*.c))) \
77 drivers/max7456.c \
78 drivers/vtx_rtc6705.c \
79 drivers/vtx_rtc6705_soft_spi.c \
80 $(RX_SRC)