PX4: setup build layout to assume PX4Firmware and PX4NuttX trees
both in directory above ardupilot
This commit is contained in:
parent
b7c915e7c4
commit
935546d80d
@ -3,7 +3,6 @@
|
|||||||
export PATH=$HOME/.local/bin:/usr/local/bin:$HOME/prefix/bin:$HOME/APM/px4/gcc-arm-none-eabi-4_6-2012q2/bin:$PATH
|
export PATH=$HOME/.local/bin:/usr/local/bin:$HOME/prefix/bin:$HOME/APM/px4/gcc-arm-none-eabi-4_6-2012q2/bin:$PATH
|
||||||
export PYTHONUNBUFFERED=1
|
export PYTHONUNBUFFERED=1
|
||||||
export PYTHONPATH=$HOME/APM
|
export PYTHONPATH=$HOME/APM
|
||||||
export PX4_ROOT=$HOME/APM/px4/PX4Firmware
|
|
||||||
|
|
||||||
cd $HOME/APM || exit 1
|
cd $HOME/APM || exit 1
|
||||||
|
|
||||||
@ -83,7 +82,12 @@ popd
|
|||||||
|
|
||||||
rsync -a APM/Tools/autotest/web-firmware/ buildlogs/binaries/
|
rsync -a APM/Tools/autotest/web-firmware/ buildlogs/binaries/
|
||||||
|
|
||||||
pushd px4/PX4Firmware
|
pushd PX4Firmware
|
||||||
|
git fetch origin
|
||||||
|
git reset --hard origin/master
|
||||||
|
popd
|
||||||
|
|
||||||
|
pushd PX4NuttX
|
||||||
git fetch origin
|
git fetch origin
|
||||||
git reset --hard origin/master
|
git reset --hard origin/master
|
||||||
popd
|
popd
|
||||||
|
@ -18,5 +18,8 @@ endif
|
|||||||
@echo \# uncomment and fill in the path to Arduino if installed in an exotic location >> $(SKETCHBOOK)/config.mk
|
@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 \# ARDUINO = /path/to/Arduino >> $(SKETCHBOOK)/config.mk
|
||||||
@echo >> $(SKETCHBOOK)/config.mk
|
@echo >> $(SKETCHBOOK)/config.mk
|
||||||
@echo \# PX4 app build: fill in the path to PX4Firmware repository from github.com/diydrones: >> $(SKETCHBOOK)/config.mk
|
@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 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
|
||||||
|
@ -2,23 +2,28 @@
|
|||||||
|
|
||||||
ifneq ($(PX4_ROOT),)
|
ifneq ($(PX4_ROOT),)
|
||||||
|
|
||||||
# try to cope with relative paths
|
# cope with relative paths
|
||||||
ifeq ($(wildcard $(PX4_ROOT)/nuttx-configs),)
|
ifeq ($(wildcard $(PX4_ROOT)/nuttx-configs),)
|
||||||
PX4_ROOT := $(shell cd $(SKETCHBOOK)/$(PX4_ROOT) && pwd)
|
PX4_ROOT := $(shell cd $(SKETCHBOOK)/$(PX4_ROOT) && pwd)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# check it is a valid PX4Firmware tree
|
||||||
ifeq ($(wildcard $(PX4_ROOT)/nuttx-configs),)
|
ifeq ($(wildcard $(PX4_ROOT)/nuttx-configs),)
|
||||||
$(error ERROR: PX4_ROOT not set correctly - no nuttx-configs directory found)
|
$(error ERROR: PX4_ROOT not set correctly - no nuttx-configs directory found)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# allow user to have NuttX git tree in directory above Firmware tree. This
|
# default to PX4NuttX above the PX4Firmware tree
|
||||||
# makes life simpler for git usage
|
ifeq ($(NUTTX_SRC),)
|
||||||
ifeq ($(wildcard $(PX4_ROOT)/NuttX),)
|
NUTTX_SRC := $(shell cd $(PX4_ROOT)/../PX4NuttX/nuttx && pwd)/
|
||||||
ifeq ($(wildcard $(PX4_ROOT)/../NuttX),)
|
endif
|
||||||
$(error ERROR: NuttX git tree not found)
|
|
||||||
endif
|
# cope with relative paths for NUTTX_SRC
|
||||||
NUTTX_SRC := $(shell cd $(PX4_ROOT)/../NuttX/nuttx && pwd)/
|
ifeq ($(wildcard $(NUTTX_SRC)/configs),)
|
||||||
else
|
NUTTX_SRC := $(shell cd $(SKETCHBOOK)/$(NUTTX_SRC) && pwd)/
|
||||||
NUTTX_SRC := $(shell cd $(PX4_ROOT)/NuttX/nuttx && pwd)/
|
endif
|
||||||
|
|
||||||
|
ifeq ($(wildcard $(NUTTX_SRC)configs),)
|
||||||
|
$(error ERROR: NUTTX_SRC not set correctly - no configs directory found)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# we have different config files for V1 and V2
|
# we have different config files for V1 and V2
|
||||||
|
Loading…
Reference in New Issue
Block a user