Skip to content
This repository has been archived by the owner on Oct 1, 2021. It is now read-only.

Support for STM32F469 FMUv4pro in Pixhawk Pro #76

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions Images/px4fmu-v4pro.prototype
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"board_id": 13,
"magic": "PX4FWv1",
"description": "Firmware for the PX4FMUv4PRO board, based on STM32F469",
"image": "",
"build_time": 0,
"summary": "PX4FMUv4PRO",
"version": "0.1",
"image_size": 0,
"git_identity": "",
"board_revision": 0
}
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,9 @@ px4fmu-v2_default:
px4fmu-v4_default:
$(call cmake-build,nuttx_px4fmu-v4_default)

px4fmu-v4pro_default:
$(call cmake-build,nuttx_px4fmu-v4pro_default)

px4-stm32f4discovery_default:
$(call cmake-build,nuttx_px4-stm32f4discovery_default)

Expand Down Expand Up @@ -203,7 +206,7 @@ uavcan_firmware:
check_format:
@./Tools/check_code_style.sh

check: px4fmu-v1_default px4fmu-v2_default px4fmu-v4_default px4-stm32f4discovery_default check_format tests
check: px4fmu-v1_default px4fmu-v2_default px4fmu-v4_default px4fmu-v4pro_default px4-stm32f4discovery_default check_format tests

unittest: posix_sitl_default
@(cd unittests && cmake -G$(PX4_CMAKE_GENERATOR) && $(PX4_MAKE) $(PX4_MAKE_ARGS) && ctest)
Expand Down
25 changes: 25 additions & 0 deletions ROMFS/px4fmu_common/init.d/rc.sensors
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,31 @@ then
fi
fi

if ver hwcmp PX4FMU_V4PRO
then

# Internal SPI bus ICM-20608-G
if mpu6000 -R 2 -T 20608 start
then
fi

# Internal SPI bus mpu9250
if mpu9250 -R 2 start
then
fi

# Internal SPI bus
#if lis3mdl -R 0 start
#then
#fi

# Possible external compasses
if hmc5883 -C -T -X start
then
fi

fi

if ver hwcmp PX4FMU_V1
then
# FMUv1
Expand Down
193 changes: 193 additions & 0 deletions cmake/configs/nuttx_px4fmu-v4pro_default.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,193 @@
include(nuttx/px4_impl_nuttx)

set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/toolchains/Toolchain-arm-none-eabi.cmake)

set(config_uavcan_num_ifaces 2)

set(config_module_list
#
# Board support modules
#
drivers/device
drivers/stm32
drivers/stm32/adc
drivers/stm32/tone_alarm
drivers/led
drivers/px4fmu
drivers/px4io
drivers/boards/px4fmu-v4pro
drivers/rgbled
drivers/mpu6000
drivers/mpu9250
#drivers/lsm303d
#drivers/l3gd20
drivers/hmc5883
drivers/ms5611
drivers/mb12xx
drivers/srf02
drivers/sf0x
drivers/ll40ls
drivers/trone
drivers/gps
drivers/pwm_out_sim
drivers/hott
drivers/hott/hott_telemetry
drivers/hott/hott_sensors
drivers/blinkm
drivers/airspeed
drivers/ets_airspeed
drivers/meas_airspeed
drivers/frsky_telemetry
modules/sensors
drivers/mkblctrl
drivers/px4flow
drivers/oreoled
drivers/gimbal
drivers/pwm_input
drivers/camera_trigger
drivers/bst
drivers/snapdragon_rc_pwm

#
# System commands
#
systemcmds/bl_update
systemcmds/mixer
systemcmds/param
systemcmds/perf
systemcmds/pwm
systemcmds/esc_calib
systemcmds/reboot
systemcmds/topic_listener
systemcmds/top
systemcmds/config
systemcmds/nshterm
systemcmds/mtd
systemcmds/dumpfile
systemcmds/ver
systemcmds/tests

#
# General system control
#
modules/commander
modules/navigator
modules/mavlink
modules/gpio_led
modules/uavcan
modules/land_detector
modules/ekf2


#
# Estimation modules (EKF/ SO3 / other filters)
#
# Too high RAM usage due to static allocations
# modules/attitude_estimator_ekf
modules/attitude_estimator_q
modules/ekf_att_pos_estimator
modules/position_estimator_inav

#
# Vehicle Control
#
# modules/segway # XXX Needs GCC 4.7 fix
modules/fw_pos_control_l1
modules/fw_att_control
modules/mc_att_control
modules/mc_pos_control
modules/vtol_att_control

#
# Logging
#
modules/sdlog2

#
# Library modules
#
modules/param
modules/systemlib
modules/systemlib/mixer
modules/controllib
modules/uORB
modules/dataman

#
# Libraries
#
lib/mathlib
lib/mathlib/math/filter
lib/ecl
lib/external_lgpl
lib/geo
lib/geo_lookup
lib/conversion
lib/launchdetection
lib/terrain_estimation
lib/runway_takeoff
lib/tailsitter_recovery
platforms/nuttx

# had to add for cmake, not sure why wasn't in original config
platforms/common
platforms/nuttx/px4_layer

#
# OBC challenge
#
#modules/bottle_drop

#
# Rover apps
#
examples/rover_steering_control

#
# Demo apps
#
#examples/math_demo
# Tutorial code from
# https://px4.io/dev/px4_simple_app
examples/px4_simple_app

# Tutorial code from
# https://px4.io/dev/daemon
#examples/px4_daemon_app

# Tutorial code from
# https://px4.io/dev/debug_values
#examples/px4_mavlink_debug

# Tutorial code from
# https://px4.io/dev/example_fixedwing_control
#examples/fixedwing_control

# Hardware test
#examples/hwtest
)

set(config_extra_builtin_cmds
serdis
sercon
)

set(config_io_board
px4io-v2
)

set(config_extra_libs
uavcan
uavcan_stm32_driver
)

set(config_io_extra_libs
)

add_custom_target(sercon)
set_target_properties(sercon PROPERTIES
MAIN "sercon" STACK "2048")

add_custom_target(serdis)
set_target_properties(serdis PROPERTIES
MAIN "serdis" STACK "2048")
11 changes: 11 additions & 0 deletions makefiles/nuttx/board_px4fmu-v4pro.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#
# Board-specific definitions for the PX4FMUv4PRO
#

#
# Configure the toolchain
#
CONFIG_ARCH = CORTEXM4F
CONFIG_BOARD = PX4FMU_V4PRO

include $(PX4_MK_DIR)/toolchain_gnu-arm-eabi.mk
Loading