mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-03-03 12:14:10 -04:00
build: enable uavcan if ../uavcan directory is present
This commit is contained in:
parent
a9ee2ae253
commit
6d10797c59
@ -358,6 +358,16 @@ else
|
|||||||
sh /etc/init.d/rc.error
|
sh /etc/init.d/rc.error
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ -f /bin/uavcan ]
|
||||||
|
then
|
||||||
|
if uavcan start 1
|
||||||
|
then
|
||||||
|
echo "started uavcan OK"
|
||||||
|
else
|
||||||
|
echo "failed to start uavcan"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
if [ $BOARD == FMUv2 ]
|
if [ $BOARD == FMUv2 ]
|
||||||
then
|
then
|
||||||
# the ramtron on FMUv2 is very fast and can handle trillions of
|
# the ramtron on FMUv2 is very fast and can handle trillions of
|
||||||
|
@ -74,6 +74,12 @@ MODULES += modules/libtomcrypt
|
|||||||
endif
|
endif
|
||||||
MODULES += lib/conversion
|
MODULES += lib/conversion
|
||||||
|
|
||||||
|
ifneq ($(wildcard $(SKETCHBOOK)/../uavcan),)
|
||||||
|
MODULES += modules/uavcan
|
||||||
|
MODULES += lib/mathlib
|
||||||
|
LIBRARIES += lib/mathlib/CMSIS
|
||||||
|
endif
|
||||||
|
|
||||||
#
|
#
|
||||||
# Transitional support - add commands from the NuttX export archive.
|
# Transitional support - add commands from the NuttX export archive.
|
||||||
#
|
#
|
||||||
|
@ -12,6 +12,10 @@ 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
|
||||||
|
|
||||||
|
ifneq ($(wildcard $(SKETCHBOOK)/../uavcan),)
|
||||||
|
UAVCAN_DIR=$(shell cd $(SKETCHBOOK)/../uavcan && pwd)/
|
||||||
|
endif
|
||||||
|
|
||||||
# default to PX4NuttX above the PX4Firmware tree
|
# default to PX4NuttX above the PX4Firmware tree
|
||||||
ifeq ($(NUTTX_SRC),)
|
ifeq ($(NUTTX_SRC),)
|
||||||
NUTTX_SRC := $(shell cd $(PX4_ROOT)/../PX4NuttX/nuttx && pwd)/
|
NUTTX_SRC := $(shell cd $(PX4_ROOT)/../PX4NuttX/nuttx && pwd)/
|
||||||
@ -31,6 +35,9 @@ PX4_GIT_VERSION := $(shell cd $(PX4_ROOT) && git rev-parse HEAD | cut -c1-8)
|
|||||||
|
|
||||||
EXTRAFLAGS += -DNUTTX_GIT_VERSION="\"$(NUTTX_GIT_VERSION)\""
|
EXTRAFLAGS += -DNUTTX_GIT_VERSION="\"$(NUTTX_GIT_VERSION)\""
|
||||||
EXTRAFLAGS += -DPX4_GIT_VERSION="\"$(PX4_GIT_VERSION)\""
|
EXTRAFLAGS += -DPX4_GIT_VERSION="\"$(PX4_GIT_VERSION)\""
|
||||||
|
ifneq ($(wildcard $(SKETCHBOOK)/../uavcan),)
|
||||||
|
EXTRAFLAGS += -DUAVCAN=1
|
||||||
|
endif
|
||||||
|
|
||||||
# we have different config files for V1 and V2
|
# we have different config files for V1 and V2
|
||||||
PX4_V1_CONFIG_FILE=$(MK_DIR)/PX4/config_px4fmu-v1_APM.mk
|
PX4_V1_CONFIG_FILE=$(MK_DIR)/PX4/config_px4fmu-v1_APM.mk
|
||||||
@ -43,7 +50,7 @@ WARNFLAGS = -Wno-psabi -Wno-packed -Wno-error=double-promotion -Wno-error=unused
|
|||||||
# avoid PX4 submodules
|
# avoid PX4 submodules
|
||||||
export GIT_SUBMODULES_ARE_EVIL = 1
|
export GIT_SUBMODULES_ARE_EVIL = 1
|
||||||
|
|
||||||
PX4_MAKE = $(v) GIT_SUBMODULES_ARE_EVIL=1 make -C $(SKETCHBOOK) -f $(PX4_ROOT)/Makefile EXTRADEFINES="$(SKETCHFLAGS) $(WARNFLAGS) "'$(EXTRAFLAGS)' APM_MODULE_DIR=$(SKETCHBOOK) SKETCHBOOK=$(SKETCHBOOK) PX4_ROOT=$(PX4_ROOT) NUTTX_SRC=$(NUTTX_SRC) MAXOPTIMIZATION="-Os"
|
PX4_MAKE = $(v) GIT_SUBMODULES_ARE_EVIL=1 make -C $(SKETCHBOOK) -f $(PX4_ROOT)/Makefile EXTRADEFINES="$(SKETCHFLAGS) $(WARNFLAGS) "'$(EXTRAFLAGS)' APM_MODULE_DIR=$(SKETCHBOOK) SKETCHBOOK=$(SKETCHBOOK) PX4_ROOT=$(PX4_ROOT) NUTTX_SRC=$(NUTTX_SRC) MAXOPTIMIZATION="-Os" UAVCAN_DIR=$(UAVCAN_DIR)
|
||||||
PX4_MAKE_ARCHIVES = make -C $(PX4_ROOT) NUTTX_SRC=$(NUTTX_SRC) archives MAXOPTIMIZATION="-Os"
|
PX4_MAKE_ARCHIVES = make -C $(PX4_ROOT) NUTTX_SRC=$(NUTTX_SRC) archives MAXOPTIMIZATION="-Os"
|
||||||
|
|
||||||
.PHONY: module_mk
|
.PHONY: module_mk
|
||||||
|
Loading…
Reference in New Issue
Block a user