I’m having a hard time compiling Ardupilot 3.2.1 on my Windows machine, although I clearly remember compiling it (it might be 3.2, I can’t remember) a few weeks ago.
The error I’m getting is a weird one:
$ make px4-v2
// BUILDROOT=/c/Users/Nitay/Documents/Work/Ardupilot/ardupilot/Build.ArduCopter HAL_BOARD=HAL_BOARD_PX4 HAL_BOARD_SUBT
YPE= TOOLCHAIN=NATIVE EXTRAFLAGS=-DGIT_VERSION="748e306f" -DNUTTX_GIT_VERSION="475b8c15" -DPX4_GIT_VERSION="ce602658"
make[1]: Entering directory `/c/Users/Nitay/Documents/Work/Ardupilot/PX4Firmware'
%% Configuring NuttX for aerocore
0 [main] sh 69820 open_stackdumpfile: Dumping stack trace to sh.exe.stackdump
0 [main] sh 26164 open_stackdumpfile: Dumping stack trace to sh.exe.stackdump
%% Exporting NuttX for aerocore
0 [main] make 52036 open_stackdumpfile: Dumping stack trace to make.exe.stackdump
make[3]: *** wait: No children. Stop.
make[2]: *** [tools/mkconfig] Error 2
make[1]: *** [/c/Users/Nitay/Documents/Work/Ardupilot/PX4Firmware/Archives/aerocore.export] Error 2
make[1]: Leaving directory `/c/Users/Nitay/Documents/Work/Ardupilot/PX4Firmware'
make: *** [/c/Users/Nitay/Documents/Work/Ardupilot/PX4Firmware/Archives/px4fmu-v2.export] Error 2
I’ve tried cleaning (make clean, then make px4-clean) but no go. I also tried deleting PX4Firmware and cloning it again. The PX4Firmware, PX4NuttX, ardupilot all on branch ArduCopter 3.2.1.
Can anyone help me debug this?
How do I even start finding out what caused this?
I’ve checked out the 3.2 branches on all projects, and i’m getting a slightly different error:
$ make px4-v2
// BUILDROOT=/c/Users/Nitay/Documents/Work/Ardupilot/ardupilot/Build.ArduCopter HAL_BOARD=HAL_BOARD_PX4 HAL_BOARD_SUBTYPE= TOOLCHAIN=NATIVE EXTRAFLAGS=-DGIT_VERSION="f5fb21b1" -DNUTTX_GIT_VERSION="7a62e351" -DPX4_GIT_VERSION="954af84c"
make[1]: Entering directory `/c/Users/Nitay/Documents/Work/Ardupilot/PX4Firmware'
%% Configuring NuttX for px4fmu-v1
0 [main] sh 16156 open_stackdumpfile: Dumping stack trace to sh.exe.stackdump
0 [main] sh 65900 open_stackdumpfile: Dumping stack trace to sh.exe.stackdump
%% Exporting NuttX for px4fmu-v1
0 [main] make 44684 open_stackdumpfile: Dumping stack trace to make.exe.stackdump
make[3]: *** wait: No children. Stop.
make[2]: *** [tools/mkconfig] Error 2
make[1]: *** [/c/Users/Nitay/Documents/Work/Ardupilot/PX4Firmware/Archives/px4fmu-v1.export] Error 2
make[1]: Leaving directory `/c/Users/Nitay/Documents/Work/Ardupilot/PX4Firmware'
make: *** [/c/Users/Nitay/Documents/Work/Ardupilot/PX4Firmware/Archives/px4fmu-v2.export] Error 2
Notice the “%% Configuring NuttX for px4fmu-v1” as opposing to “%% Configuring NuttX for aerocore”.
So still no go, but maybe hints for the veteran builders among us…
Okay, more updates. Recloned everything in master and it compiled ok!
Checked out branch 3.2.1 - “make clean”, “make px4-clean”, “make px4-v2” - Problem returned.
Checked out master - (no make clean) - Compiled ok!
Checked out branch 3.2 - (no make clean) - Problem returned
Cloned everything again, on branch 3.2, ‘make configure’, ‘make px4-v2’ - Same problem returned
So it’s something to do with the 3.2 branch, and solved on master.
This isn’t good for me - Because I need to develop on top of the 3.2 version upwards, and I don’t trust the master yet.
Please share if you any ideas!
If someone encounters this problem in the future - The solution is something to do with the submodules.
Notice PX4Firmware has some submodules in it, so make sure to do ‘git submodule init’ & ‘git submodule update’ after you checkout.
See here - git-scm.com/book/en/v2/Git-Tools … Submodules
This didn’t help me solve the 3.2.1 compilation problem (which failed only on the PX4Firmware), but I did manage to compile 3.2
Anyway, I’m using master for now. This compiles okay