mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-13 11:29:58 +03:00
Add STM32F411SX1280 unified target
This commit is contained in:
parent
4fa2dc1115
commit
6d17f3f765
5 changed files with 104 additions and 45 deletions
|
@ -84,7 +84,8 @@ UNIFIED_TARGETS := STM32F405 \
|
|||
STM32F7X2 \
|
||||
STM32F745 \
|
||||
STM32G47X \
|
||||
STM32H743
|
||||
STM32H743 \
|
||||
STM32F411SX1280
|
||||
|
||||
# Legacy targets are targets that have been replaced by Unified Target configurations
|
||||
LEGACY_TARGETS := MATEKF405 \
|
||||
|
|
|
@ -963,4 +963,4 @@ timeDelta_t rxGetFrameDelta(timeDelta_t *frameAgeUs)
|
|||
timeUs_t rxFrameTimeUs(void)
|
||||
{
|
||||
return rxRuntimeState.lastRcFrameTimeUs;
|
||||
}
|
||||
}
|
||||
|
|
0
src/main/target/STM32_UNIFIED/STM32F411SX1280.mk
Normal file
0
src/main/target/STM32_UNIFIED/STM32F411SX1280.mk
Normal file
|
@ -78,6 +78,29 @@
|
|||
#define TARGET_IO_PORTD 0xffff
|
||||
#define TARGET_IO_PORTE 0xffff
|
||||
|
||||
#elif defined(STM32F411SX1280)
|
||||
#define TARGET_BOARD_IDENTIFIER "S4SX"
|
||||
|
||||
#define USBD_PRODUCT_STRING "Betaflight STM32F411SX1280"
|
||||
|
||||
#define USE_UART1
|
||||
#define USE_UART2
|
||||
#define USE_UART6
|
||||
|
||||
#define SERIAL_PORT_COUNT (UNIFIED_SERIAL_PORT_COUNT + 3)
|
||||
|
||||
#define USE_INVERTER
|
||||
|
||||
#define USE_SPI_DEVICE_1
|
||||
#define USE_SPI_DEVICE_2
|
||||
#define USE_SPI_DEVICE_3
|
||||
|
||||
#define TARGET_IO_PORTA 0xffff
|
||||
#define TARGET_IO_PORTB 0xffff
|
||||
#define TARGET_IO_PORTC 0xffff
|
||||
#define TARGET_IO_PORTD 0xffff
|
||||
#define TARGET_IO_PORTE 0xffff
|
||||
|
||||
#elif defined(STM32F7X2)
|
||||
#define TARGET_BOARD_IDENTIFIER "S7X2"
|
||||
|
||||
|
@ -218,6 +241,40 @@
|
|||
// to be supplied when the board is configured for the first time
|
||||
#define USE_UNIFIED_TARGET
|
||||
|
||||
// Only enable ELRS support on STM32F411SX1280 target
|
||||
#if defined(STM32F411SX1280)
|
||||
#define DEFAULT_RX_FEATURE FEATURE_RX_SPI
|
||||
#define RX_SPI_DEFAULT_PROTOCOL RX_SPI_EXPRESSLRS
|
||||
|
||||
#define USE_RX_EXPRESSLRS
|
||||
#define USE_RX_EXPRESSLRS_TELEMETRY
|
||||
#define USE_RX_SX1280
|
||||
#define RX_EXPRESSLRS_TIMER_INSTANCE TIM5
|
||||
#define RX_CHANNELS_AETR
|
||||
|
||||
#else // STM32F411SX1280
|
||||
#define USE_RX_FRSKY_SPI_D
|
||||
#define USE_RX_FRSKY_SPI_X
|
||||
#define USE_RX_SFHSS_SPI
|
||||
#define USE_RX_REDPINE_SPI
|
||||
#define USE_RX_FRSKY_SPI_TELEMETRY
|
||||
#define USE_RX_CC2500_SPI_PA_LNA
|
||||
#define USE_RX_CC2500_SPI_DIVERSITY
|
||||
|
||||
#define USE_RX_FLYSKY
|
||||
#define USE_RX_FLYSKY_SPI_LED
|
||||
|
||||
#define USE_RX_SPEKTRUM
|
||||
#define USE_RX_SPEKTRUM_TELEMETRY
|
||||
|
||||
#define USE_I2C
|
||||
#define I2C_FULL_RECONFIGURABILITY
|
||||
|
||||
#define USE_MAG
|
||||
#define USE_BARO
|
||||
|
||||
#endif // STM32F411SX1280
|
||||
|
||||
#define USE_BEEPER
|
||||
|
||||
// MPU interrupt
|
||||
|
@ -246,7 +303,7 @@
|
|||
#define USE_ACC_SPI_ICM42688P
|
||||
#endif
|
||||
|
||||
#define USE_MAG
|
||||
#ifdef USE_MAG
|
||||
#define USE_MAG_DATA_READY_SIGNAL
|
||||
#define USE_MAG_HMC5883
|
||||
#define USE_MAG_SPI_HMC5883
|
||||
|
@ -256,8 +313,9 @@
|
|||
#define USE_MAG_MPU925X_AK8963
|
||||
#define USE_MAG_SPI_AK8963
|
||||
#define USE_MAG_AK8975
|
||||
#endif
|
||||
|
||||
#define USE_BARO
|
||||
#ifdef USE_BARO
|
||||
#define USE_BARO_MS5611
|
||||
#define USE_BARO_SPI_MS5611
|
||||
#define USE_BARO_BMP280
|
||||
|
@ -270,6 +328,7 @@
|
|||
#define USE_BARO_SPI_QMP6988
|
||||
#define USE_BARO_DPS310
|
||||
#define USE_BARO_SPI_DPS310
|
||||
#endif
|
||||
|
||||
#define USE_SDCARD
|
||||
#define USE_SDCARD_SPI
|
||||
|
@ -292,9 +351,6 @@
|
|||
#define USE_SPI
|
||||
#define SPI_FULL_RECONFIGURABILITY
|
||||
|
||||
#define USE_I2C
|
||||
#define I2C_FULL_RECONFIGURABILITY
|
||||
|
||||
#define USE_VCP
|
||||
|
||||
#define USE_SOFTSERIAL1
|
||||
|
@ -310,20 +366,6 @@
|
|||
|
||||
#define USE_RX_SPI
|
||||
|
||||
#define USE_RX_FRSKY_SPI_D
|
||||
#define USE_RX_FRSKY_SPI_X
|
||||
#define USE_RX_SFHSS_SPI
|
||||
#define USE_RX_REDPINE_SPI
|
||||
#define USE_RX_FRSKY_SPI_TELEMETRY
|
||||
#define USE_RX_CC2500_SPI_PA_LNA
|
||||
#define USE_RX_CC2500_SPI_DIVERSITY
|
||||
|
||||
#define USE_RX_FLYSKY
|
||||
#define USE_RX_FLYSKY_SPI_LED
|
||||
|
||||
#define USE_RX_SPEKTRUM
|
||||
#define USE_RX_SPEKTRUM_TELEMETRY
|
||||
|
||||
#define USE_CUSTOM_DEFAULTS
|
||||
|
||||
// Additional drivers included for targets with > 512KB of flash
|
||||
|
@ -343,6 +385,7 @@
|
|||
#define USE_RANGEFINDER_TF
|
||||
|
||||
#define USE_RX_EXPRESSLRS
|
||||
#define RX_EXPRESSLRS_TIMER_INSTANCE TIM5
|
||||
#define USE_RX_SX1280
|
||||
#define USE_RX_SX127X
|
||||
|
||||
|
|
|
@ -1,3 +1,22 @@
|
|||
RX_SRC = \
|
||||
rx/cc2500_common.c \
|
||||
rx/cc2500_frsky_shared.c \
|
||||
rx/cc2500_frsky_d.c \
|
||||
rx/cc2500_frsky_x.c \
|
||||
rx/cc2500_sfhss.c \
|
||||
rx/cc2500_redpine.c \
|
||||
rx/a7105_flysky.c \
|
||||
rx/cyrf6936_spektrum.c \
|
||||
drivers/rx/expresslrs_driver.c \
|
||||
rx/expresslrs.c \
|
||||
rx/expresslrs_common.c \
|
||||
rx/expresslrs_telemetry.c \
|
||||
drivers/rx/rx_cc2500.c \
|
||||
drivers/rx/rx_a7105.c \
|
||||
drivers/rx/rx_cyrf6936.c \
|
||||
drivers/rx/rx_sx127x.c \
|
||||
drivers/rx/rx_sx1280.c \
|
||||
|
||||
ifeq ($(TARGET), STM32F405)
|
||||
F405_TARGETS += $(TARGET)
|
||||
|
||||
|
@ -5,6 +24,17 @@ else
|
|||
ifeq ($(TARGET), STM32F411)
|
||||
F411_TARGETS += $(TARGET)
|
||||
|
||||
else
|
||||
ifeq ($(TARGET), STM32F411SX1280)
|
||||
F411_TARGETS += $(TARGET)
|
||||
RX_SRC = \
|
||||
drivers/rx/expresslrs_driver.c \
|
||||
drivers/rx/rx_sx127x.c \
|
||||
drivers/rx/rx_sx1280.c \
|
||||
rx/expresslrs_telemetry.c \
|
||||
rx/expresslrs_common.c \
|
||||
rx/expresslrs.c \
|
||||
|
||||
else
|
||||
ifeq ($(TARGET), STM32F7X2)
|
||||
F7X2RE_TARGETS += $(TARGET)
|
||||
|
@ -25,6 +55,7 @@ endif
|
|||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(TARGET), $(filter $(TARGET), STM32F405 STM32F745 STM32H743))
|
||||
# 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
|
||||
|
@ -39,27 +70,11 @@ FEATURES += VCP SDCARD_SPI SDCARD_SDIO ONBOARDFLASH
|
|||
endif
|
||||
|
||||
TARGET_SRC = \
|
||||
$(addprefix drivers/accgyro/,$(notdir $(wildcard $(SRC_DIR)/drivers/accgyro/*.c))) \
|
||||
$(ROOT)/lib/main/BoschSensortec/BMI270-Sensor-API/bmi270_maximum_fifo.c \
|
||||
$(addprefix drivers/barometer/,$(notdir $(wildcard $(SRC_DIR)/drivers/barometer/*.c))) \
|
||||
$(addprefix drivers/compass/,$(notdir $(wildcard $(SRC_DIR)/drivers/compass/*.c))) \
|
||||
drivers/max7456.c \
|
||||
drivers/vtx_rtc6705.c \
|
||||
drivers/vtx_rtc6705_soft_spi.c \
|
||||
rx/cc2500_common.c \
|
||||
rx/cc2500_frsky_shared.c \
|
||||
rx/cc2500_frsky_d.c \
|
||||
rx/cc2500_frsky_x.c \
|
||||
rx/cc2500_sfhss.c \
|
||||
rx/cc2500_redpine.c \
|
||||
rx/a7105_flysky.c \
|
||||
rx/cyrf6936_spektrum.c \
|
||||
drivers/rx/expresslrs_driver.c \
|
||||
rx/expresslrs.c \
|
||||
rx/expresslrs_common.c \
|
||||
rx/expresslrs_telemetry.c \
|
||||
drivers/rx/rx_cc2500.c \
|
||||
drivers/rx/rx_a7105.c \
|
||||
drivers/rx/rx_cyrf6936.c \
|
||||
drivers/rx/rx_sx127x.c \
|
||||
drivers/rx/rx_sx1280.c \
|
||||
$(addprefix drivers/accgyro/,$(notdir $(wildcard $(SRC_DIR)/drivers/accgyro/*.c))) \
|
||||
$(ROOT)/lib/main/BoschSensortec/BMI270-Sensor-API/bmi270_maximum_fifo.c \
|
||||
$(addprefix drivers/barometer/,$(notdir $(wildcard $(SRC_DIR)/drivers/barometer/*.c))) \
|
||||
$(addprefix drivers/compass/,$(notdir $(wildcard $(SRC_DIR)/drivers/compass/*.c))) \
|
||||
drivers/max7456.c \
|
||||
drivers/vtx_rtc6705.c \
|
||||
drivers/vtx_rtc6705_soft_spi.c \
|
||||
$(RX_SRC)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue