1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-19 06:15:16 +03:00

Merge pull request #7677 from mikeller/add_f411_f446_f745_support

Added support for F411, F446, F745, F765.
This commit is contained in:
Michael Keller 2019-03-02 11:48:34 +13:00 committed by GitHub
commit 29db27584f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 656 additions and 20 deletions

View file

@ -167,11 +167,11 @@ extern const timerHardware_t timerHardware[];
#endif
#if defined(USE_TIMER_MGMT)
#if defined(STM32F40_41xxx)
#if defined(STM32F4)
#define FULL_TIMER_CHANNEL_COUNT 70
#elif defined(STM32F722xx)
#elif defined(STM32F7)
#define FULL_TIMER_CHANNEL_COUNT 70

View file

@ -53,7 +53,6 @@ const timerDef_t timerDefinitions[HARDWARE_TIMER_DEFINITION_COUNT] = {
};
#if defined(USE_TIMER_MGMT)
#if defined(STM32F40_41xxx)
const timerHardware_t fullTimerHardware[FULL_TIMER_CHANNEL_COUNT] = {
// Auto-generated from 'timer_def.h'
//PORTA
@ -147,7 +146,6 @@ const timerHardware_t fullTimerHardware[FULL_TIMER_CHANNEL_COUNT] = {
DEF_TIM(TIM11, CH1, PF7, TIM_USE_ANY, 0, 0),
};
#endif
#endif // USE_TIMER_MGMT
/*

View file

@ -48,8 +48,6 @@ const timerDef_t timerDefinitions[HARDWARE_TIMER_DEFINITION_COUNT] = {
};
#if defined(USE_TIMER_MGMT)
#if defined(STM32F722xx)
const timerHardware_t fullTimerHardware[FULL_TIMER_CHANNEL_COUNT] = {
// Auto-generated from 'timer_def.h'
//PORTA
@ -142,7 +140,6 @@ const timerHardware_t fullTimerHardware[FULL_TIMER_CHANNEL_COUNT] = {
DEF_TIM(TIM11, CH1, PF7, TIM_USE_ANY, 0, 0),
};
#endif
#endif // USE_TIMER_MGMT
/*

View file

@ -26,7 +26,7 @@
#define TARGET_BOARD_IDENTIFIER "S405"
#define USBD_PRODUCT_STRING "S405"
#define USBD_PRODUCT_STRING "Betaflight STM32F405"
#define USE_BEEPER

View file

@ -0,0 +1,22 @@
/*
* This file is part of Cleanflight and Betaflight.
*
* Cleanflight and Betaflight are free software. You can redistribute
* this software and/or modify this software under the terms of the
* GNU General Public License as published by the Free Software
* Foundation, either version 3 of the License, or (at your option)
* any later version.
*
* Cleanflight and Betaflight are distributed in the hope that they
* will be useful, but WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this software.
*
* If not, see <http://www.gnu.org/licenses/>.
*/
// Needed to suppress the pedantic warning about an empty file
#include <stddef.h>

View file

@ -0,0 +1,121 @@
/*
* This file is part of Cleanflight and Betaflight.
*
* Cleanflight and Betaflight are free software. You can redistribute
* this software and/or modify this software under the terms of the
* GNU General Public License as published by the Free Software
* Foundation, either version 3 of the License, or (at your option)
* any later version.
*
* Cleanflight and Betaflight are distributed in the hope that they
* will be useful, but WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this software.
*
* If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
// Treat the target as generic, and expect manufacturer id / board name
// to be supplied when the board is configured for the first time
#define USE_UNIFIED_TARGET
#define TARGET_BOARD_IDENTIFIER "S411"
#define USBD_PRODUCT_STRING "Betaflight STM32F411"
#define USE_BEEPER
// MPU interrupt
#define USE_EXTI
#define USE_MPU_DATA_READY_SIGNAL
//#define DEBUG_MPU_DATA_READY_INTERRUPT
#define USE_GYRO_EXTI
#define USE_ACC
#define USE_GYRO
#define USE_ACC_MPU6050
#define USE_GYRO_MPU6050
#define USE_ACC_MPU6500
#define USE_GYRO_MPU6500
#define USE_ACC_SPI_MPU6000
#define USE_GYRO_SPI_MPU6000
#define USE_ACC_SPI_MPU6500
#define USE_GYRO_SPI_MPU6500
#define USE_ACC_SPI_ICM20689
#define USE_GYRO_SPI_ICM20689
// Other USE_ACCs and USE_GYROs should follow
#define USE_MAG
#define USE_MAG_HMC5883
#define USE_MAG_SPI_HMC5883
#define USE_MAG_QMC5883
#define USE_MAG_LIS3MDL
#define USE_MAG_AK8963
#define USE_MAG_SPI_AK8963
#define USE_BARO
#define USE_BARO_MS5611
#define USE_BARO_SPI_MS5611
#define USE_BARO_BMP280
#define USE_BARO_SPI_BMP280
#define USE_BARO_LPS
#define USE_BARO_SPI_LPS
#define USE_SDCARD
#define USE_SDCARD_SPI
#define USE_FLASHFS
#define USE_FLASH_M25P16
#define USE_MAX7456
#define USE_I2C
#define USE_I2C_DEVICE_1
#define USE_I2C_DEVICE_2
#define USE_I2C_DEVICE_3
#define I2C_FULL_RECONFIGURABILITY
#define USE_VCP
#define USE_UART1
#define USE_UART2
#define USE_UART6
#define USE_SOFTSERIAL1
#define USE_SOFTSERIAL2
#define USE_INVERTER
#define SERIAL_PORT_COUNT 6
#define USE_ESCSERIAL
#define USE_SPI
#define USE_SPI_DEVICE_1
#define USE_SPI_DEVICE_2
#define USE_SPI_DEVICE_3
#define SPI_FULL_RECONFIGURABILITY
#define USE_ADC
//TODO: Make this work with runtime configurability
//#define USE_RX_FRSKY_SPI_D
//#define USE_RX_FRSKY_SPI_X
//#define USE_RX_SFHSS_SPI
//#define USE_RX_FRSKY_SPI_TELEMETRY
//#define USE_RX_CC2500_SPI_PA_LNA
//#define USE_RX_CC2500_SPI_DIVERSITY
//TODO: Make this work with runtime configurability
//#define USE_RX_FLYSKY
//#define USE_RX_FLYSKY_SPI_LED
#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
#define TARGET_IO_PORTF 0xffff

View file

@ -0,0 +1,17 @@
F411_TARGETS += $(TARGET)
FEATURES += SDCARD_SPI VCP ONBOARDFLASH
TARGET_SRC = \
$(addprefix drivers/accgyro/,$(notdir $(wildcard $(SRC_DIR)/drivers/accgyro/*.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/rx/rx_cc2500.c \
rx/cc2500_common.c \
rx/cc2500_frsky_shared.c \
rx/cc2500_frsky_d.c \
rx/cc2500_frsky_x.c \
rx/cc2500_sfhss.c \
drivers/rx/rx_a7105.c \
rx/a7105_flysky.c

View file

@ -21,7 +21,7 @@
#pragma once
#define TARGET_BOARD_IDENTIFIER "S411" // STM Discovery F411
#define USBD_PRODUCT_STRING "DISCF411"
#define USBD_PRODUCT_STRING "STM32F411DISCOVERY"
#define USE_SENSOR_NAMES

View file

@ -21,7 +21,7 @@
#pragma once
#define TARGET_BOARD_IDENTIFIER "SDF4"
#define USBD_PRODUCT_STRING "DISCF4"
#define USBD_PRODUCT_STRING "STM32F4DISCOVERY"
#define USE_VTX_TABLE
#define USE_SPI_TRANSACTION

View file

@ -0,0 +1,22 @@
/*
* This file is part of Cleanflight and Betaflight.
*
* Cleanflight and Betaflight are free software. You can redistribute
* this software and/or modify this software under the terms of the
* GNU General Public License as published by the Free Software
* Foundation, either version 3 of the License, or (at your option)
* any later version.
*
* Cleanflight and Betaflight are distributed in the hope that they
* will be useful, but WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this software.
*
* If not, see <http://www.gnu.org/licenses/>.
*/
// Needed to suppress the pedantic warning about an empty file
#include <stddef.h>

View file

@ -0,0 +1,118 @@
/*
* This file is part of Cleanflight and Betaflight.
*
* Cleanflight and Betaflight are free software. You can redistribute
* this software and/or modify this software under the terms of the
* GNU General Public License as published by the Free Software
* Foundation, either version 3 of the License, or (at your option)
* any later version.
*
* Cleanflight and Betaflight are distributed in the hope that they
* will be useful, but WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this software.
*
* If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
// Treat the target as generic, and expect manufacturer id / board name
// to be supplied when the board is configured for the first time
#define USE_UNIFIED_TARGET
#define TARGET_BOARD_IDENTIFIER "S745"
#define USBD_PRODUCT_STRING "Betaflight STM32F745"
#define USE_BEEPER
// MPU interrupt
#define USE_EXTI
#define USE_MPU_DATA_READY_SIGNAL
//#define DEBUG_MPU_DATA_READY_INTERRUPT
#define USE_GYRO_EXTI
#define USE_ACC
#define USE_GYRO
#define USE_ACC_MPU6050
#define USE_GYRO_MPU6050
#define USE_ACC_MPU6500
#define USE_GYRO_MPU6500
#define USE_ACC_SPI_MPU6000
#define USE_GYRO_SPI_MPU6000
#define USE_ACC_SPI_MPU6500
#define USE_GYRO_SPI_MPU6500
#define USE_ACC_SPI_ICM20689
#define USE_GYRO_SPI_ICM20689
// Other USE_ACCs and USE_GYROs should follow
#define USE_MAG
#define USE_MAG_HMC5883
#define USE_MAG_SPI_HMC5883
#define USE_MAG_QMC5883
#define USE_MAG_LIS3MDL
#define USE_MAG_AK8963
#define USE_MAG_SPI_AK8963
#define USE_BARO
#define USE_BARO_MS5611
#define USE_BARO_SPI_MS5611
#define USE_BARO_BMP280
#define USE_BARO_SPI_BMP280
#define USE_BARO_LPS
#define USE_BARO_SPI_LPS
#define USE_SDCARD
#define USE_SDCARD_SPI
#define USE_FLASHFS
#define USE_FLASH_M25P16
#define USE_MAX7456
#define USE_I2C
#define USE_I2C_DEVICE_1
#define USE_I2C_DEVICE_2
#define USE_I2C_DEVICE_3
#define USE_I2C_DEVICE_4
#define I2C_FULL_RECONFIGURABILITY
#define USE_VCP
#define USE_UART1
#define USE_UART2
#define USE_UART3
#define USE_UART4
#define USE_UART5
#define USE_UART6
#define USE_UART7
#define USE_UART8
#define USE_SOFTSERIAL1
#define USE_SOFTSERIAL2
#define SERIAL_PORT_COUNT 11
#define USE_ESCSERIAL
#define USE_SPI
#define USE_SPI_DEVICE_1
#define USE_SPI_DEVICE_2
#define USE_SPI_DEVICE_3
#define USE_SPI_DEVICE_4
#define USE_SPI_DEVICE_5
#define USE_SPI_DEVICE_6
#define SPI_FULL_RECONFIGURABILITY
#define USE_ADC
#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
#define TARGET_IO_PORTF 0xffff

View file

@ -0,0 +1,8 @@
F7X5XG_TARGETS += $(TARGET)
FEATURES += SDCARD_SPI VCP ONBOARDFLASH
TARGET_SRC = \
$(addprefix drivers/accgyro/,$(notdir $(wildcard $(SRC_DIR)/drivers/accgyro/*.c))) \
$(addprefix drivers/barometer/,$(notdir $(wildcard $(SRC_DIR)/drivers/barometer/*.c))) \
$(addprefix drivers/compass/,$(notdir $(wildcard $(SRC_DIR)/drivers/compass/*.c))) \
drivers/max7456.c

View file

@ -26,7 +26,7 @@
#define TARGET_BOARD_IDENTIFIER "S7X2"
#define USBD_PRODUCT_STRING "S7X2"
#define USBD_PRODUCT_STRING "Betaflight STM32F7x2"
#define USE_BEEPER

View file

@ -63,6 +63,7 @@
#define USE_USB_MSC
#define USE_PERSISTENT_MSC_RTC
#define USE_DMA_SPEC
#define USE_TIMER_MGMT
// Re-enable this after 4.0 has been released, and remove the define from STM32F4DISCOVERY
//#define USE_SPI_TRANSACTION
@ -70,10 +71,6 @@
#define USE_OVERCLOCK
#endif
#if defined(STM32F40_41xxx)
#define USE_TIMER_MGMT
#endif
#endif // STM32F4
#ifdef STM32F7
@ -91,13 +88,9 @@
#define USE_PERSISTENT_MSC_RTC
#define USE_MCO
#define USE_DMA_SPEC
#define USE_TIMER_MGMT
// Re-enable this after 4.0 has been released, and remove the define from STM32F4DISCOVERY
//#define USE_SPI_TRANSACTION
#if defined(STM32F722xx)
#define USE_TIMER_MGMT
#endif
#endif // STM32F7
#if defined(STM32F4) || defined(STM32F7)