mk: initial FMUv4pro support

This commit is contained in:
Kevin Lopez Alvarez 2017-07-15 15:12:39 +10:00 committed by Andrew Tridgell
parent d6d1a3e08c
commit 40f8500122
3 changed files with 31 additions and 2 deletions

View File

@ -0,0 +1,9 @@
#
# Makefile for the px4fmu-v2_APM configuration
#
include $(SKETCHBOOK)/mk/PX4/px4_common.mk
MODULES += drivers/boards/px4fmu-v4pro
MODULES += drivers/pwm_input
MODULES += drivers/px4io

View File

@ -45,6 +45,7 @@ PX4_V1_CONFIG_FILE=$(MK_DIR)/PX4/config_px4fmu-v1_APM.mk
PX4_V2_CONFIG_FILE=$(MK_DIR)/PX4/config_px4fmu-v2_APM.mk
PX4_V3_CONFIG_FILE=$(MK_DIR)/PX4/config_px4fmu-v3_APM.mk
PX4_V4_CONFIG_FILE=$(MK_DIR)/PX4/config_px4fmu-v4_APM.mk
PX4_V4PRO_CONFIG_FILE=$(MK_DIR)/PX4/config_px4fmu-v4pro_APM.mk
# Since actual compiler mode is C++11, the library will default to UAVCAN_CPP11, but it will fail to compile
# because this platform lacks most of the standard library and STL. Hence we need to force C++03 mode.
@ -126,6 +127,16 @@ px4-v4: $(BUILDROOT)/make.flags CHECK_MODULES $(MAVLINK_HEADERS) $(UAVCAN_HEADER
$(v) $(SKETCHBOOK)/Tools/scripts/add_git_hashes.py $(HASHADDER_FLAGS) "$(SKETCH)-v4.px4" "$(SKETCH)-v4.px4"
$(v) echo "PX4 $(SKETCH) Firmware is in $(SKETCH)-v4.px4"
px4-v4pro: $(BUILDROOT)/make.flags CHECK_MODULES $(MAVLINK_HEADERS) $(UAVCAN_HEADERS) $(PX4_ROOT)/Archives/px4fmu-v4pro.export $(SKETCHCPP) module_mk px4-io-v2
$(v) echo Building px4-v4pro
$(RULEHDR)
$(v) cp $(PX4_V4PRO_CONFIG_FILE) $(PX4_ROOT)/makefiles/nuttx/
$(PX4_MAKE) px4fmu-v4pro_APM
$(v) arm-none-eabi-size $(PX4_ROOT)/Build/px4fmu-v4pro_APM.build/firmware.elf
$(v) cp $(PX4_ROOT)/Images/px4fmu-v4pro_APM.px4 $(SKETCH)-v4pro.px4
$(v) $(SKETCHBOOK)/Tools/scripts/add_git_hashes.py $(HASHADDER_FLAGS) "$(SKETCH)-v4pro.px4" "$(SKETCH)-v4pro.px4"
$(v) echo "PX4 $(SKETCH) Firmware is in $(SKETCH)-v4pro.px4"
# force the 3 build types to not run in parallel. We got bad binaries with incorrect parameter handling
# when these were allowed to happen in parallel
px4:
@ -133,6 +144,7 @@ px4:
$(MAKE) px4-v2
$(MAKE) px4-v3
$(MAKE) px4-v4
$(MAKE) px4-v4pro
px4-clean: clean CHECK_MODULES px4-archives-clean px4-cleandep
$(v) /bin/rm -rf $(PX4_ROOT)/makefiles/build $(PX4_ROOT)/Build $(PX4_ROOT)/Images/*.px4 $(PX4_ROOT)/Images/*.bin
@ -166,6 +178,10 @@ px4-v4-upload: px4-v4
$(RULEHDR)
$(v) $(PX4_MAKE) px4fmu-v4_APM upload
px4-v4pro-upload: px4-v4pro
$(RULEHDR)
$(v) $(PX4_MAKE) px4fmu-v4pro_APM upload
px4-upload: px4-v1-upload
px4-archives-clean:
@ -207,6 +223,7 @@ px4-io: px4-io-v1 px4-io-v2
$(PX4_ROOT)/Archives/px4fmu-v2.export \
$(PX4_ROOT)/Archives/px4fmu-v3.export \
$(PX4_ROOT)/Archives/px4fmu-v4.export \
$(PX4_ROOT)/Archives/px4fmu-v4pro.export \
$(PX4_ROOT)/Archives/px4io-v1.export \
$(PX4_ROOT)/Archives/px4io-v2.export
@ -222,6 +239,9 @@ $(PX4_ROOT)/Archives/px4fmu-v3.export:
$(PX4_ROOT)/Archives/px4fmu-v4.export:
$(v) $(PX4_MAKE_ARCHIVES) BOARDS="px4fmu-v4"
$(PX4_ROOT)/Archives/px4fmu-v4pro.export:
$(v) $(PX4_MAKE_ARCHIVES) BOARDS="px4fmu-v4pro"
$(PX4_ROOT)/Archives/px4io-v1.export:
$(v) $(PX4_MAKE_ARCHIVES) BOARDS="px4io-v1"
@ -229,4 +249,4 @@ $(PX4_ROOT)/Archives/px4io-v2.export:
$(v) $(PX4_MAKE_ARCHIVES) BOARDS="px4io-v2"
px4-archives:
$(v) $(PX4_MAKE_ARCHIVES) BOARDS="px4io-v1 px4io-v2 px4fmu-v1 px4fmu-v2 px4fmu-v3 px4fmu-v4"
$(v) $(PX4_MAKE_ARCHIVES) BOARDS="px4io-v1 px4io-v2 px4fmu-v1 px4fmu-v2 px4fmu-v3 px4fmu-v4 px4fmu-v4pro"

View File

@ -110,7 +110,7 @@ qurt: all
# cope with copter and hil targets
FRAMES = heli
BOARDS = apm1 apm2 apm2beta apm1-1280 px4-v1 px4-v2 px4-v3 px4-v4 sitl flymaple linux erle pxf navio navio2 raspilot bbbmini minlure erlebrain2 bhat qflight pxfmini
BOARDS = apm1 apm2 apm2beta apm1-1280 px4-v1 px4-v2 px4-v3 px4-v4 px4-v4pro sitl flymaple linux erle pxf navio navio2 raspilot bbbmini minlure erlebrain2 bhat qflight pxfmini
BOARDS += vrbrain
BOARDS += vrbrain-v51 vrbrain-v52 vrbrain-v54
BOARDS += vrcore-v10