diff --git a/mk/px4_targets.mk b/mk/px4_targets.mk index 1eb25eec9e..995836e001 100644 --- a/mk/px4_targets.mk +++ b/mk/px4_targets.mk @@ -54,8 +54,8 @@ export GIT_SUBMODULES_ARE_EVIL = 1 PYTHONPATH=$(SKETCHBOOK)/mk/PX4/Tools/genmsg/src:$(SKETCHBOOK)/mk/PX4/Tools/gencpp/src export PYTHONPATH -PX4_MAKE = $(v) GIT_SUBMODULES_ARE_EVIL=1 ARDUPILOT_BUILD=1 make -C $(SKETCHBOOK) -f $(PX4_ROOT)/Makefile EXTRADEFINES="$(SKETCHFLAGS) $(WARNFLAGS) "'$(EXTRAFLAGS)' APM_MODULE_DIR=$(SKETCHBOOK) SKETCHBOOK=$(SKETCHBOOK) CCACHE=$(CCACHE) 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) CCACHE=$(CCACHE) archives MAXOPTIMIZATION="-Os" +PX4_MAKE = $(v)+ GIT_SUBMODULES_ARE_EVIL=1 ARDUPILOT_BUILD=1 $(MAKE) -C $(SKETCHBOOK) -f $(PX4_ROOT)/Makefile EXTRADEFINES="$(SKETCHFLAGS) $(WARNFLAGS) "'$(EXTRAFLAGS)' APM_MODULE_DIR=$(SKETCHBOOK) SKETCHBOOK=$(SKETCHBOOK) CCACHE=$(CCACHE) 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) CCACHE=$(CCACHE) archives MAXOPTIMIZATION="-Os" HASHADDER_FLAGS += --ardupilot "$(SKETCHBOOK)" @@ -122,7 +122,7 @@ px4-archives-clean: $(v) /bin/rm -rf $(PX4_ROOT)/Archives px4-io-v1: $(PX4_ROOT)/Archives/px4io-v1.export - $(v) make -C $(PX4_ROOT) px4io-v1_default + $(v)+ $(MAKE) -C $(PX4_ROOT) px4io-v1_default $(v) /bin/rm -f px4io-v1.bin $(v) cp $(PX4_ROOT)/Images/px4io-v1_default.bin px4io-v1.bin $(v) cp $(PX4_ROOT)/Build/px4io-v1_default.build/firmware.elf px4io-v1.elf @@ -136,7 +136,7 @@ px4-io-v1: $(PX4_ROOT)/Archives/px4io-v1.export px4-io-v2: $(PX4_ROOT)/Archives/px4io-v2.export - $(v) make -C $(PX4_ROOT) px4io-v2_default + $(v)+ $(MAKE) -C $(PX4_ROOT) px4io-v2_default $(v) /bin/rm -f px4io-v2.bin $(v) cp $(PX4_ROOT)/Build/px4io-v2_default.build/firmware.bin px4io-v2.bin $(v) cp $(PX4_ROOT)/Images/px4io-v2_default.bin px4io-v2.bin @@ -151,6 +151,19 @@ px4-io-v2: $(PX4_ROOT)/Archives/px4io-v2.export px4-io: px4-io-v1 px4-io-v2 +# These targets can't run in parallel because they all need to generate a tool +# to generate the config.h inside them. This could trigger races if done in +# parallel, trying to generate the tool and replacing it while the header is already +# being generated +# +# We could serialize inside PX4Firmware, but it's easier to serialize here +# while maintaining the rest of the build parallelized + +.NOTPARALLEL: \ + $(PX4_ROOT)/Archives/px4fmu-v1.export \ + $(PX4_ROOT)/Archives/px4fmu-v2.export \ + $(PX4_ROOT)/Archives/px4io-v1.export \ + $(PX4_ROOT)/Archives/px4io-v2.export $(PX4_ROOT)/Archives/px4fmu-v1.export: $(v) $(PX4_MAKE_ARCHIVES) BOARDS="px4fmu-v1" diff --git a/modules/PX4Firmware b/modules/PX4Firmware index 51858c810a..1623d181b7 160000 --- a/modules/PX4Firmware +++ b/modules/PX4Firmware @@ -1 +1 @@ -Subproject commit 51858c810a3cb086d7c2041328bd32adec9fa724 +Subproject commit 1623d181b791ed0dfc151db66c2ed41ffb1b9219 diff --git a/modules/PX4NuttX b/modules/PX4NuttX index 7c5ef883fc..d48fa3072b 160000 --- a/modules/PX4NuttX +++ b/modules/PX4NuttX @@ -1 +1 @@ -Subproject commit 7c5ef883fc3307b44bef9d5f7b51cb144cdf400a +Subproject commit d48fa3072b2396c489966c4ab10183ac7cf3dea9