Added STM32F411 unified target.

This commit is contained in:
mikeller 2019-03-01 03:31:49 +13:00
parent de8f4028e3
commit 6cacaf00a1
8 changed files with 166 additions and 4 deletions

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

@ -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

@ -1,5 +1,7 @@
# Betaflight / CRAZYBEEF4FR (C4FR) 4.0.0 Feb 28 2019 / 18:10:50 (b63a3e117) MSP API: 1.41
# This is not usable yet, as the SPI RX is not fully runtime configurable yet
board_name CRAZYBEEF4FR
manufacturer_id HAMO