From 073bf6dd235eff2049a3d0fbcfea00546714a741 Mon Sep 17 00:00:00 2001
From: YI-BOYANG <46438966+YI-BOYANG@users.noreply.github.com>
Date: Tue, 26 Nov 2024 14:40:25 +0800
Subject: [PATCH 1/2] add GEPRC_TAKER_H743
---
.../target/GEPRC_TAKER_H743/CMakeLists.txt | 1 +
src/main/target/GEPRC_TAKER_H743/config.c | 63 ++++++
src/main/target/GEPRC_TAKER_H743/target.c | 52 +++++
src/main/target/GEPRC_TAKER_H743/target.h | 196 ++++++++++++++++++
4 files changed, 312 insertions(+)
create mode 100644 src/main/target/GEPRC_TAKER_H743/CMakeLists.txt
create mode 100644 src/main/target/GEPRC_TAKER_H743/config.c
create mode 100644 src/main/target/GEPRC_TAKER_H743/target.c
create mode 100644 src/main/target/GEPRC_TAKER_H743/target.h
diff --git a/src/main/target/GEPRC_TAKER_H743/CMakeLists.txt b/src/main/target/GEPRC_TAKER_H743/CMakeLists.txt
new file mode 100644
index 00000000000..f7c2c61480f
--- /dev/null
+++ b/src/main/target/GEPRC_TAKER_H743/CMakeLists.txt
@@ -0,0 +1 @@
+target_stm32h743xi(GEPRC_TAKER_H743)
\ No newline at end of file
diff --git a/src/main/target/GEPRC_TAKER_H743/config.c b/src/main/target/GEPRC_TAKER_H743/config.c
new file mode 100644
index 00000000000..d2f972270a2
--- /dev/null
+++ b/src/main/target/GEPRC_TAKER_H743/config.c
@@ -0,0 +1,63 @@
+/*
+ * This file is part of INAV.
+ *
+ * INAV is free software: you can redistribute it and/or modify
+ * it 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.
+ *
+ * INAV is distributed in the hope that it 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 INAV. If not, see .
+ */
+
+#include
+#include
+
+#include
+
+#include "common/axis.h"
+
+#include "config/config_master.h"
+#include "config/feature.h"
+
+#include "drivers/sensor.h"
+#include "drivers/pwm_esc_detect.h"
+#include "drivers/pwm_output.h"
+#include "drivers/serial.h"
+
+#include "fc/rc_controls.h"
+
+#include "flight/failsafe.h"
+#include "flight/mixer.h"
+#include "flight/pid.h"
+
+#include "rx/rx.h"
+
+#include "io/serial.h"
+
+#include "sensors/battery.h"
+#include "sensors/sensors.h"
+
+#include "telemetry/telemetry.h"
+
+#include "fc/fc_msp_box.h"
+
+#include "io/piniobox.h"
+
+
+#define BLUETOOTH_MSP_BAUDRATE BAUD_115200
+
+void targetConfiguration(void)
+{
+ pinioBoxConfigMutable()->permanentId[0] = BOXARM;
+ pinioBoxConfigMutable()->permanentId[1] = BOX_PERMANENT_ID_USER1;
+
+ serialConfigMutable()->portConfigs[findSerialPortIndexByIdentifier(SERIAL_PORT_USART3)].functionMask = FUNCTION_MSP;
+ serialConfigMutable()->portConfigs[findSerialPortIndexByIdentifier(SERIAL_PORT_USART3)].msp_baudrateIndex = BLUETOOTH_MSP_BAUDRATE;
+}
+
diff --git a/src/main/target/GEPRC_TAKER_H743/target.c b/src/main/target/GEPRC_TAKER_H743/target.c
new file mode 100644
index 00000000000..a04e65b2d58
--- /dev/null
+++ b/src/main/target/GEPRC_TAKER_H743/target.c
@@ -0,0 +1,52 @@
+/*
+* This file is part of INAV Project.
+*
+* INAV is free software: you can redistribute it and/or modify
+* it 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.
+*
+* INAV is distributed in the hope that it 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 INAV. If not, see .
+*/
+
+#include
+
+#include "platform.h"
+
+#include "drivers/bus.h"
+#include "drivers/io.h"
+#include "drivers/pwm_mapping.h"
+#include "drivers/timer.h"
+#include "drivers/sensor.h"
+
+
+BUSDEV_REGISTER_SPI_TAG(busdev_mpu6000, DEVHW_MPU6000, IMU1_SPI_BUS, IMU1_CS_PIN, NONE, 0, DEVFLAGS_NONE, IMU1_ALIGN);
+BUSDEV_REGISTER_SPI_TAG(busdev_mpu6000_2, DEVHW_MPU6000, IMU2_SPI_BUS, IMU2_CS_PIN, NONE, 1, DEVFLAGS_NONE, IMU2_ALIGN);
+
+BUSDEV_REGISTER_SPI_TAG(busdev_icm42688, DEVHW_MPU6000, IMU1_SPI_BUS, IMU1_CS_PIN, NONE, 0, DEVFLAGS_NONE, IMU1_ALIGN);
+BUSDEV_REGISTER_SPI_TAG(busdev_icm42688_2, DEVHW_ICM42605, IMU2_SPI_BUS, IMU2_CS_PIN, NONE, 1, DEVFLAGS_NONE, IMU2_ALIGN);
+
+
+
+timerHardware_t timerHardware[] = {
+
+ DEF_TIM(TIM3, CH3, PB0, TIM_USE_OUTPUT_AUTO, 0, 0),
+ DEF_TIM(TIM3, CH4, PB1, TIM_USE_OUTPUT_AUTO, 0, 1),
+ DEF_TIM(TIM3, CH2, PB5, TIM_USE_OUTPUT_AUTO, 0, 2),
+ DEF_TIM(TIM3, CH1, PB4, TIM_USE_OUTPUT_AUTO, 0, 3),
+
+ DEF_TIM(TIM4, CH1, PD12, TIM_USE_OUTPUT_AUTO, 0, 4),
+ DEF_TIM(TIM4, CH2, PD13, TIM_USE_OUTPUT_AUTO, 0, 5),
+ DEF_TIM(TIM8, CH3, PC8, TIM_USE_OUTPUT_AUTO, 0, 6),
+ DEF_TIM(TIM8, CH4, PC9, TIM_USE_OUTPUT_AUTO, 0, 7),
+
+ DEF_TIM(TIM1, CH1, PA8, TIM_USE_LED, 0, 8),
+};
+
+const int timerHardwareCount = sizeof(timerHardware) / sizeof(timerHardware[0]);
diff --git a/src/main/target/GEPRC_TAKER_H743/target.h b/src/main/target/GEPRC_TAKER_H743/target.h
new file mode 100644
index 00000000000..7f2756ebf9c
--- /dev/null
+++ b/src/main/target/GEPRC_TAKER_H743/target.h
@@ -0,0 +1,196 @@
+/*
+ * This file is part of INAV Project.
+ *
+ * INAV is free software: you can redistribute it and/or modify
+ * it 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.
+ *
+ * INAV is distributed in the hope that it 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 INAV. If not, see .
+ */
+
+#pragma once
+
+#define TARGET_BOARD_IDENTIFIER "GEPR"
+#define USBD_PRODUCT_STRING "GEPRC_TAKER_H743"
+
+#define USE_TARGET_CONFIG
+
+#define LED0 PC13
+
+#define BEEPER PD2
+#define BEEPER_INVERTED
+
+
+//**************** SPI BUS *************************
+#define USE_SPI
+
+#define USE_SPI_DEVICE_1
+#define SPI1_SCK_PIN PA5
+#define SPI1_MISO_PIN PA6
+#define SPI1_MOSI_PIN PA7
+
+#define USE_SPI_DEVICE_2
+#define SPI2_SCK_PIN PB13
+#define SPI2_MISO_PIN PB14
+#define SPI2_MOSI_PIN PB15
+
+#define USE_SPI_DEVICE_3
+#define SPI3_SCK_PIN PC10
+#define SPI3_MISO_PIN PC11
+#define SPI3_MOSI_PIN PC12
+
+#define USE_SPI_DEVICE_4
+#define SPI4_SCK_PIN PE2
+#define SPI4_MISO_PIN PE5
+#define SPI4_MOSI_PIN PE6
+
+
+
+// *************** Gyro & ACC **********************
+
+#define USE_DUAL_GYRO
+#define USE_TARGET_IMU_HARDWARE_DESCRIPTORS
+#define USE_IMU_MPU6000
+#define USE_IMU_ICM42605
+
+
+// *****IMU1 MPU6000 & ICM42688 ON SPI1 **************
+#define IMU1_ALIGN CW180_DEG
+#define IMU1_SPI_BUS BUS_SPI1
+#define IMU1_CS_PIN PA4
+
+
+
+// *****IMU2 MPU6000 & ICM42688 ON SPI2 **************
+#define IMU2_ALIGN CW0_DEG
+#define IMU2_SPI_BUS BUS_SPI2
+#define IMU2_CS_PIN PB12
+
+
+// *************** I2C/Baro/Mag *********************
+#define USE_I2C
+#define USE_I2C_DEVICE_1
+#define I2C1_SCL PB8
+#define I2C1_SDA PB9
+
+
+#define USE_BARO
+#define BARO_I2C_BUS BUS_I2C1
+#define USE_BARO_BMP280
+#define USE_BARO_DPS310
+#define USE_BARO_MS5611
+
+#define USE_MAG
+#define MAG_I2C_BUS BUS_I2C1
+#define USE_MAG_ALL
+
+#define TEMPERATURE_I2C_BUS BUS_I2C1
+
+#define PITOT_I2C_BUS BUS_I2C1
+
+#define USE_RANGEFINDER
+#define RANGEFINDER_I2C_BUS BUS_I2C1
+#define BNO055_I2C_BUS BUS_I2C1
+
+// *************** FLASH **************************
+#define USE_SDCARD
+#define USE_SDCARD_SPI
+#define SDCARD_SPI_BUS BUS_SPI3
+#define SDCARD_CS_PIN PA15
+
+#define ENABLE_BLACKBOX_LOGGING_ON_SDCARD_BY_DEFAULT
+
+
+// ************PINIO to disable BT*****************
+#define USE_PINIO
+#define USE_PINIOBOX
+#define PINIO1_PIN PE13
+#define PINIO1_FLAGS PINIO_FLAGS_INVERTED
+
+
+// ************PINIO to other
+#define PINIO2_PIN PC14 //Enable vsw
+
+
+// *************** OSD *****************************
+#define USE_MAX7456
+#define MAX7456_SPI_BUS BUS_SPI4
+#define MAX7456_CS_PIN PE4
+
+// *************** UART *****************************
+#define USE_VCP
+
+#define USE_UART1
+#define UART1_RX_PIN PA10
+#define UART1_TX_PIN PA9
+
+#define USE_UART2
+#define UART2_RX_PIN PA3
+#define UART2_TX_PIN PA2
+
+#define USE_UART3
+#define UART3_RX_PIN PB11
+#define UART3_TX_PIN PB10
+
+#define USE_UART4
+#define UART4_RX_PIN PA1
+#define UART4_TX_PIN PA0
+
+#define USE_UART6
+#define UART6_RX_PIN PC7
+#define UART6_TX_PIN PC6
+
+#define USE_UART7
+#define UART7_RX_PIN PE7
+#define UART7_TX_PIN PE8
+
+#define USE_UART8
+#define UART8_RX_PIN PE0
+#define UART8_TX_PIN PE1
+
+#define SERIAL_PORT_COUNT 8
+
+#define DEFAULT_RX_TYPE RX_TYPE_SERIAL
+#define SERIALRX_PROVIDER SERIALRX_SBUS
+#define SERIALRX_UART SERIAL_PORT_USART2
+
+// *************** ADC *****************************
+#define USE_ADC
+#define ADC_INSTANCE ADC3
+// #define ADC1_DMA_STREAM DMA2_Stream0
+#define ADC_CHANNEL_1_PIN PC3
+#define ADC_CHANNEL_2_PIN PC5
+#define ADC_CHANNEL_3_PIN PC2
+
+#define VBAT_ADC_CHANNEL ADC_CHN_1
+#define RSSI_ADC_CHANNEL ADC_CHN_2
+#define CURRENT_METER_ADC_CHANNEL ADC_CHN_3
+
+#define VBAT_SCALE_DEFAULT 1120
+
+//****************************************************
+
+#define DEFAULT_FEATURES (FEATURE_TX_PROF_SEL | FEATURE_CURRENT_METER | FEATURE_TELEMETRY | FEATURE_VBAT | FEATURE_OSD | FEATURE_BLACKBOX)
+
+#define USE_LED_STRIP
+#define WS2811_PIN PA8
+
+#define USE_SERIAL_4WAY_BLHELI_INTERFACE
+
+#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 MAX_PWM_OUTPUT_PORTS 8
+
+#define USE_DSHOT
+#define USE_ESC_SENSOR
From 75e2b72ded43cd2cbd42d1d1f139ff1d4f8b9eff Mon Sep 17 00:00:00 2001
From: "Pawel Spychalski (DzikuVx)"
Date: Wed, 27 Nov 2024 12:22:49 +0100
Subject: [PATCH 2/2] Potential fix for failing CI
---
.github/workflows/ci.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 68eefc7b9c2..4d2965b5e8f 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -18,7 +18,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
- id: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]
+ id: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
steps:
- uses: actions/checkout@v4