mk: support px4-v3 with make

I really wish we didn't still need this!
This commit is contained in:
Andrew Tridgell 2016-12-10 19:10:24 +11:00
parent 0870e02584
commit 979c3a6270
6 changed files with 34 additions and 24 deletions

View File

@ -3,12 +3,6 @@
#
include $(SKETCHBOOK)/mk/PX4/px4_common.mk
MODULES += drivers/lsm303d
MODULES += drivers/l3gd20
MODULES += drivers/mpu9250
MODULES += drivers/boards/px4fmu-v2
MODULES += drivers/pwm_input
MODULES += modules/uavcan
MODULES += lib/mathlib
MODULES += drivers/px4io
MODULES += drivers/oreoled

View File

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

View File

@ -3,8 +3,7 @@
#
include $(SKETCHBOOK)/mk/PX4/px4_common.mk
MODULES += drivers/mpu9250
MODULES += drivers/boards/px4fmu-v4
MODULES += drivers/pwm_input
MODULES += modules/uavcan
MODULES += lib/mathlib
MODULES += modules/uavcan

View File

@ -18,9 +18,6 @@ MODULES += drivers/stm32/tone_alarm
MODULES += drivers/led
MODULES += drivers/px4fmu
MODULES += drivers/rgbled
MODULES += drivers/mpu6000
MODULES += drivers/hmc5883
MODULES += drivers/ms5611
MODULES += drivers/mb12xx
MODULES += drivers/ll40ls
MODULES += drivers/trone
@ -38,21 +35,13 @@ MODULES += drivers/batt_smbus
MODULES += systemcmds/bl_update
MODULES += systemcmds/mixer
MODULES += systemcmds/perf
MODULES += systemcmds/pwm
MODULES += systemcmds/reboot
MODULES += systemcmds/top
#MODULES += systemcmds/tests
MODULES += systemcmds/nshterm
MODULES += systemcmds/mtd
MODULES += systemcmds/ver
MODULES += systemcmds/otp
ifneq ($(wildcard $(PX4_ROOT)/src/systemcmds/reflect),)
MODULES += systemcmds/reflect
endif
ifneq ($(wildcard $(PX4_ROOT)/src/systemcmds/motor_test),)
MODULES += systemcmds/motor_test
endif
ifneq ($(wildcard $(PX4_ROOT)/src/systemcmds/usb_connected),)
MODULES += systemcmds/usb_connected
endif
@ -63,7 +52,6 @@ endif
MODULES += modules/systemlib
MODULES += modules/systemlib/mixer
MODULES += modules/uORB
MODULES += lib/mathlib/math/filter
# Note: auth disabled to keep us under 1MB flash because of STM32 bug
#ifneq ($(wildcard $(PX4_ROOT)/src/systemcmds/auth),)
@ -74,8 +62,6 @@ MODULES += lib/mathlib/math/filter
#MODULES += modules/libtomcrypt
#endif
MODULES += lib/conversion
#
# Transitional support - add commands from the NuttX export archive.
#

View File

@ -22,6 +22,7 @@ help:
@echo ""
@echo " px4-v1 - the PX4v1 board"
@echo " px4-v2 - the Pixhawk"
@echo " px4-v3 - the Pixhawk with 2M flash"
@echo " px4-v4 - the XRacer"
@echo " pxf - the Beagle Bone Black (BBB) + PXF cape combination"
@echo " navio - the RaspberryPi + NavIO cape combination"

View File

@ -41,6 +41,7 @@ EXTRAFLAGS += -I$(BUILDROOT)/libraries/GCS_MAVLink/include/mavlink
# we have different config files for V1 and V2
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
SKETCHFLAGS=$(SKETCHLIBINCLUDES) -DARDUPILOT_BUILD -DTESTS_MATHLIB_DISABLE -DCONFIG_HAL_BOARD=HAL_BOARD_PX4 -DSKETCHNAME="\\\"$(SKETCH)\\\"" -DSKETCH_MAIN=ArduPilot_main -DAPM_BUILD_DIRECTORY=APM_BUILD_$(SKETCH)
@ -99,6 +100,16 @@ px4-v2: $(BUILDROOT)/make.flags CHECK_MODULES $(MAVLINK_HEADERS) $(PX4_ROOT)/Arc
$(v) $(SKETCHBOOK)/Tools/scripts/add_git_hashes.py $(HASHADDER_FLAGS) "$(SKETCH)-v2.px4" "$(SKETCH)-v2.px4"
$(v) echo "PX4 $(SKETCH) Firmware is in $(SKETCH)-v2.px4"
px4-v3: $(BUILDROOT)/make.flags CHECK_MODULES $(MAVLINK_HEADERS) $(PX4_ROOT)/Archives/px4fmu-v3.export $(SKETCHCPP) module_mk px4-io-v2
$(v) echo Building px4-v3
$(RULEHDR)
$(v) cp $(PX4_V3_CONFIG_FILE) $(PX4_ROOT)/makefiles/nuttx/
$(PX4_MAKE) px4fmu-v3_APM
$(v) arm-none-eabi-size $(PX4_ROOT)/Build/px4fmu-v3_APM.build/firmware.elf
$(v) cp $(PX4_ROOT)/Images/px4fmu-v3_APM.px4 $(SKETCH)-v3.px4
$(v) $(SKETCHBOOK)/Tools/scripts/add_git_hashes.py $(HASHADDER_FLAGS) "$(SKETCH)-v3.px4" "$(SKETCH)-v3.px4"
$(v) echo "PX4 $(SKETCH) Firmware is in $(SKETCH)-v3.px4"
px4-v4: $(BUILDROOT)/make.flags CHECK_MODULES $(MAVLINK_HEADERS) $(PX4_ROOT)/Archives/px4fmu-v4.export $(SKETCHCPP) module_mk
$(v) echo Building px4-v4
$(RULEHDR)
@ -116,6 +127,7 @@ px4-v4: $(BUILDROOT)/make.flags CHECK_MODULES $(MAVLINK_HEADERS) $(PX4_ROOT)/Arc
px4:
$(MAKE) px4-v1
$(MAKE) px4-v2
$(MAKE) px4-v3
$(MAKE) px4-v4
px4-clean: clean CHECK_MODULES px4-archives-clean px4-cleandep
@ -142,6 +154,10 @@ px4-v2-upload: px4-v2
$(RULEHDR)
$(v) $(PX4_MAKE) px4fmu-v2_APM upload
px4-v3-upload: px4-v3
$(RULEHDR)
$(v) $(PX4_MAKE) px4fmu-v3_APM upload
px4-v4-upload: px4-v4
$(RULEHDR)
$(v) $(PX4_MAKE) px4fmu-v4_APM upload
@ -185,6 +201,7 @@ px4-io: px4-io-v1 px4-io-v2
.NOTPARALLEL: \
$(PX4_ROOT)/Archives/px4fmu-v1.export \
$(PX4_ROOT)/Archives/px4fmu-v2.export \
$(PX4_ROOT)/Archives/px4fmu-v3.export \
$(PX4_ROOT)/Archives/px4fmu-v4.export \
$(PX4_ROOT)/Archives/px4io-v1.export \
$(PX4_ROOT)/Archives/px4io-v2.export
@ -195,6 +212,9 @@ $(PX4_ROOT)/Archives/px4fmu-v1.export:
$(PX4_ROOT)/Archives/px4fmu-v2.export:
$(v) $(PX4_MAKE_ARCHIVES) BOARDS="px4fmu-v2"
$(PX4_ROOT)/Archives/px4fmu-v3.export:
$(v) $(PX4_MAKE_ARCHIVES) BOARDS="px4fmu-v3"
$(PX4_ROOT)/Archives/px4fmu-v4.export:
$(v) $(PX4_MAKE_ARCHIVES) BOARDS="px4fmu-v4"
@ -205,4 +225,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-v4"
$(v) $(PX4_MAKE_ARCHIVES) BOARDS="px4io-v1 px4io-v2 px4fmu-v1 px4fmu-v2 px4fmu-v3 px4fmu-v4"