diff --git a/mk/apm.mk b/mk/apm.mk index 908b6f5c58..7845d9e538 100644 --- a/mk/apm.mk +++ b/mk/apm.mk @@ -42,6 +42,10 @@ ifeq ($(HAL_BOARD),HAL_BOARD_PX4) include $(MK_DIR)/board_px4.mk endif +ifeq ($(HAL_BOARD),HAL_BOARD_VRBRAIN) +include $(MK_DIR)/board_vrbrain.mk +endif + ifeq ($(HAL_BOARD),HAL_BOARD_FLYMAPLE) include $(MK_DIR)/board_flymaple.mk endif diff --git a/mk/configure.mk b/mk/configure.mk index ad00713b42..0c6a00a91f 100644 --- a/mk/configure.mk +++ b/mk/configure.mk @@ -18,8 +18,17 @@ endif @echo \# uncomment and fill in the path to Arduino if installed in an exotic location >> $(SKETCHBOOK)/config.mk @echo \# ARDUINO = /path/to/Arduino >> $(SKETCHBOOK)/config.mk @echo >> $(SKETCHBOOK)/config.mk +######################## PX4 #################################### @echo \# PX4Firmware tree: fill in the path to PX4Firmware repository from github.com/diydrones: >> $(SKETCHBOOK)/config.mk @echo PX4_ROOT=../PX4Firmware >> $(SKETCHBOOK)/config.mk @echo >> $(SKETCHBOOK)/config.mk @echo \# PX4NuttX tree: fill in the path to PX4NuttX repository from github.com/diydrones: >> $(SKETCHBOOK)/config.mk @echo NUTTX_SRC=../PX4NuttX/nuttx >> $(SKETCHBOOK)/config.mk +###################### VRBRAIN ################################## + @echo \# VRBRAIN Firmware tree: >> $(SKETCHBOOK)/config.mk + @echo VRBRAIN_ROOT=../VRBRAINFirmware >> $(SKETCHBOOK)/config.mk + @echo >> $(SKETCHBOOK)/config.mk + @echo \# VRBRAIN NuttX tree: >> $(SKETCHBOOK)/config.mk + @echo VRBRAIN_NUTTX_SRC=../VRBRAINFirmware/NuttX/nuttx >> $(SKETCHBOOK)/config.mk + @echo >> $(SKETCHBOOK)/config.mk + \ No newline at end of file diff --git a/mk/environ.mk b/mk/environ.mk index deeb8bb0eb..4b721456ba 100644 --- a/mk/environ.mk +++ b/mk/environ.mk @@ -72,7 +72,15 @@ ifneq ($(findstring px4, $(MAKECMDGOALS)),) # when building px4 we need all sources to be inside the sketchbook directory # as the NuttX build system relies on it BUILDROOT := $(SKETCHBOOK)/Build.$(SKETCH) -else +endif + +ifneq ($(findstring vrbrain, $(MAKECMDGOALS)),) +# when building vrbrain we need all sources to be inside the sketchbook directory +# as the NuttX build system relies on it +BUILDROOT := $(SKETCHBOOK)/Build.$(SKETCH) +endif + +ifeq ($(BUILDROOT),) BUILDROOT := $(abspath $(TMPDIR)/$(SKETCH).build) endif diff --git a/mk/sketch_sources.mk b/mk/sketch_sources.mk index 5ae990c2a8..2e36247893 100644 --- a/mk/sketch_sources.mk +++ b/mk/sketch_sources.mk @@ -53,7 +53,8 @@ SKETCHLIBNAMES := $(notdir $(SKETCHLIBS)) SKETCHLIBSRCDIRS := $(SKETCHLIBS) $(addsuffix /utility,$(SKETCHLIBS)) SKETCHLIBSRCS := $(wildcard $(foreach suffix,$(SRCSUFFIXES),$(addsuffix /$(suffix),$(SKETCHLIBSRCDIRS)))) SKETCHLIBOBJS := $(addsuffix .o,$(basename $(subst $(SKETCHBOOK),$(BUILDROOT),$(SKETCHLIBSRCS)))) -SKETCHLIBINCLUDES := $(addprefix -I,$(SKETCHLIBS)) +SKETCHLIBINCLUDES := $(addprefix -I,$(SRCROOT)) +SKETCHLIBINCLUDES += $(addprefix -I,$(SKETCHLIBS)) SKETCHLIBSRCSRELATIVE := $(subst $(SKETCHBOOK)/,,$(SKETCHLIBSRCS)) ifeq ($(VERBOSE),) diff --git a/mk/targets.mk b/mk/targets.mk index 3b1967ec97..60f6bf70e8 100644 --- a/mk/targets.mk +++ b/mk/targets.mk @@ -40,7 +40,7 @@ empty: all # cope with copter and hil targets FRAMES = quad tri hexa y6 octa octa-quad heli single -BOARDS = apm1 apm2 apm2beta apm1-1280 px4 px4-v1 px4-v2 sitl flymaple linux +BOARDS = apm1 apm2 apm2beta apm1-1280 px4 px4-v1 px4-v2 sitl flymaple linux vrbrain vrbrain-v4 vrbrainv-5 vrhero-v1 define frame_template $(1)-$(2) : EXTRAFLAGS += "-DFRAME_CONFIG=$(shell echo $(2) | tr a-z A-Z | sed s/-/_/g)_FRAME "