-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[chibios] Update chibios and add Pixhawk 6X autopilot
- Loading branch information
1 parent
893a65f
commit 9ddcd69
Showing
45 changed files
with
3,237 additions
and
121 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
# Hey Emacs, this is a -*- makefile -*- | ||
# | ||
# cube_orange.makefile | ||
# | ||
# This is for the main MCU (STM32F767) on the PX4 board | ||
# See https://pixhawk.org/modules/pixhawk for details | ||
# | ||
|
||
BOARD=px4fmu | ||
BOARD_VERSION=v6x | ||
BOARD_DIR=$(BOARD)/chibios/$(BOARD_VERSION) | ||
BOARD_CFG=\"arch/chibios/common_board.h\" | ||
|
||
ARCH=chibios | ||
$(TARGET).ARCHDIR = $(ARCH) | ||
|
||
RTOS=chibios | ||
MCU=cortex-m7 | ||
|
||
# FPU on F7 | ||
USE_FPU=hard | ||
USE_FPU_OPT= -mfpu=fpv5-d16 | ||
|
||
#USE_LTO=yes | ||
|
||
$(TARGET).CFLAGS += -DPPRZLINK_ENABLE_FD | ||
|
||
############################################################################## | ||
# Architecture or project specific options | ||
# | ||
# Define project name here (target) | ||
PROJECT = $(TARGET) | ||
|
||
# Project specific files and paths (see Makefile.chibios for details) | ||
CHIBIOS_BOARD_PLATFORM = STM32H7xx/platform.mk | ||
CHIBIOS_LINKER_DIR = $(PAPARAZZI_SRC)/sw/airborne/arch/chibios/ | ||
CHIBIOS_BOARD_LINKER = STM32H743xI.ld | ||
CHIBIOS_BOARD_STARTUP = startup_stm32h7xx.mk | ||
|
||
############################################################################## | ||
# Compiler settings | ||
# | ||
|
||
# default flash mode is the PX4 bootloader | ||
# possibilities: DFU, SWD, PX4 bootloader | ||
FLASH_MODE ?= PX4_BOOTLOADER | ||
PX4_TARGET = "ap" | ||
PX4_PROTOTYPE ?= "${PAPARAZZI_HOME}/sw/tools/px4/px4fmu_v6x.prototype" | ||
PX4_BL_PORT ?= "/dev/serial/by-id/*-BL_*,/dev/serial/by-id/*_BL_*" | ||
|
||
# | ||
# default LED configuration | ||
# | ||
SDLOG_LED ?= none | ||
RADIO_CONTROL_LED ?= none | ||
BARO_LED ?= none | ||
AHRS_ALIGNER_LED ?= none | ||
GPS_LED ?= none | ||
SYS_TIME_LED ?= 4 | ||
|
||
# | ||
# default UART configuration (modem, gps, spektrum) | ||
# The TELEM2 port | ||
SBUS_PORT ?= UART6 | ||
RADIO_CONTROL_SPEKTRUM_PRIMARY_PORT ?= UART6 | ||
|
||
# The TELEM1 port (UART5 is TELEM2, UART2 is TELEM3) | ||
MODEM_PORT ?= UART7 | ||
MODEM_BAUD ?= B57600 | ||
|
||
# The GPS1 port (UART1 is GPS2) | ||
GPS_PORT ?= UART8 | ||
GPS_BAUD ?= B460800 | ||
|
||
# InterMCU port connected to the IO processor | ||
#INTERMCU_PORT ?= UART6 | ||
#INTERMCU_BAUD ?= B1500000 | ||
|
||
# | ||
# default actuator configuration | ||
# | ||
# you can use different actuators by adding a configure option to your firmware section | ||
# e.g. <configure name="ACTUATORS" value="actuators_ppm/> | ||
# and by setting the correct "driver" attribute in servo section | ||
# e.g. <servo driver="Ppm"> | ||
# | ||
ACTUATORS ?= actuators_pwm | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<!DOCTYPE module SYSTEM "../module.dtd"> | ||
|
||
<module name="pixhawk_v6x" dir="boards"> | ||
<doc> | ||
<description> | ||
Specific configuration for Pixhawk V6X with ChibiOS | ||
</description> | ||
</doc> | ||
<dep> | ||
<depends>spi_master,baro_bmp3</depends> | ||
</dep> | ||
<makefile target="!sim|nps|fbw"> | ||
<define name="USE_RTC_BACKUP" value="TRUE"/> | ||
<configure name="SDLOG_USE_RTC" value="FALSE"/> | ||
<configure name="SDLOG_SDIO" value="SDCD2"/> | ||
|
||
<!-- On FMU board --> | ||
<!--configure name="BMP3_I2C_DEV" value="i2c2"/> | ||
<define name="BMP3_SLAVE_ADDR" value="BMP3_I2C_ADDR"/--> | ||
|
||
<!-- On IMU board --> | ||
<configure name="BMP3_I2C_DEV" value="i2c4"/> | ||
<define name="BMP3_SLAVE_ADDR" value="BMP3_I2C_ADDR_ALT"/> | ||
</makefile> | ||
</module> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
<!DOCTYPE module SYSTEM "module.dtd"> | ||
|
||
<module name="imu_pixhawk6x" dir="imu" task="sensors"> | ||
<doc> | ||
<description> | ||
IMU driver for the sensors inside the Pixhawk 6X autopilots | ||
- IMU1: ICM42670 | ||
- IMU2: ??? | ||
- IMU3: ??? | ||
</description> | ||
</doc> | ||
<dep> | ||
<depends>spi_master,i2c,imu_common,imu_heater</depends> | ||
<provides>imu</provides> | ||
</dep> | ||
<header> | ||
<file name="imu_pixhawk6x.h"/> | ||
</header> | ||
<init fun="imu_pixhawk6x_init()"/> | ||
<periodic fun="imu_pixhawk6x_periodic()"/> | ||
<event fun="imu_pixhawk6x_event()"/> | ||
<makefile target="!sim|nps|fbw"> | ||
<!-- Files --> | ||
<file name="invensense2.c" dir="peripherals"/> | ||
<file name="invensense3.c" dir="peripherals"/> | ||
<file name="imu_pixhawk6x.c"/> | ||
|
||
<!-- IMU1: ICM42670 --> | ||
<configure name="PIXHAWK6X_IMU1_SPI_DEV" default="spi1" case="lower|upper"/> | ||
<configure name="PIXHAWK6X_IMU1_SPI_SLAVE_IDX" default="SPI_SLAVE1"/> | ||
<define name="PIXHAWK6X_IMU1_SPI_DEV" value="$(PIXHAWK6X_IMU1_SPI_DEV_LOWER)"/> | ||
<define name="USE_$(PIXHAWK6X_IMU1_SPI_DEV_UPPER)"/> | ||
<define name="PIXHAWK6X_IMU1_SPI_SLAVE_IDX" value="$(PIXHAWK6X_IMU1_SPI_SLAVE_IDX)"/> | ||
<define name="USE_$(PIXHAWK6X_IMU1_SPI_SLAVE_IDX)"/> | ||
|
||
<!-- IMU2: ICM42688--> | ||
<configure name="PIXHAWK6X_IMU2_SPI_DEV" default="spi2" case="lower|upper"/> | ||
<configure name="PIXHAWK6X_IMU2_SPI_SLAVE_IDX" default="SPI_SLAVE2"/> | ||
<define name="PIXHAWK6X_IMU2_SPI_DEV" value="$(PIXHAWK6X_IMU2_SPI_DEV_LOWER)"/> | ||
<define name="USE_$(PIXHAWK6X_IMU2_SPI_DEV_UPPER)"/> | ||
<define name="PIXHAWK6X_IMU2_SPI_SLAVE_IDX" value="$(PIXHAWK6X_IMU2_SPI_SLAVE_IDX)"/> | ||
<define name="USE_$(PIXHAWK6X_IMU2_SPI_SLAVE_IDX)"/> | ||
|
||
<!-- IMU3: BMI088 / ICM20649 --> | ||
<configure name="PIXHAWK6X_IMU3_SPI_DEV" default="spi3" case="lower|upper"/> | ||
<configure name="PIXHAWK6X_IMU3_SPI_SLAVE_IDX" default="SPI_SLAVE3"/> | ||
<define name="PIXHAWK6X_IMU3_SPI_DEV" value="$(PIXHAWK6X_IMU3_SPI_DEV_LOWER)"/> | ||
<define name="USE_$(PIXHAWK6X_IMU3_SPI_DEV_UPPER)"/> | ||
<define name="PIXHAWK6X_IMU3_SPI_SLAVE_IDX" value="$(PIXHAWK6X_IMU3_SPI_SLAVE_IDX)"/> | ||
<define name="USE_$(PIXHAWK6X_IMU3_SPI_SLAVE_IDX)"/> | ||
|
||
<!-- Configure the heater (ICM42688) --> | ||
<define name="IMU_HEATER_GYRO_ID" value="IMU_PIXHAWK2_ID"/> | ||
<define name="IMU_HEATER_TARGET_TEMP" value="45.0"/> | ||
<define name="IMU_HEATER_P_GAIN" value="50.0"/> | ||
<define name="IMU_HEATER_I_GAIN" value="0.07"/> | ||
|
||
<test> | ||
<define name="SPI_MASTER"/> | ||
<define name="PIXHAWK6X_IMU1_SPI_DEV" value="spi1"/> | ||
<define name="PIXHAWK6X_IMU1_SPI_SLAVE_IDX" value="1"/> | ||
<define name="PIXHAWK6X_IMU2_SPI_DEV" value="spi2"/> | ||
<define name="PIXHAWK6X_IMU2_SPI_SLAVE_IDX" value="2"/> | ||
<define name="PIXHAWK6X_IMU3_SPI_DEV" value="spi3"/> | ||
<define name="PIXHAWK6X_IMU3_SPI_SLAVE_IDX" value="3"/> | ||
<define name="USE_SPI1"/> | ||
<define name="USE_SPI2"/> | ||
<define name="USE_SPI3"/> | ||
<define name="USE_SPI_SLAVE1"/> | ||
<define name="USE_SPI_SLAVE2"/> | ||
<define name="USE_SPI_SLAVE3"/> | ||
<define name="PERIODIC_FREQUENCY" value="512"/> | ||
<define name="IMU_PIXHAWK6X_PERIODIC_FREQ" value="512"/> | ||
</test> | ||
</makefile> | ||
</module> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.