Px4_fmu-v5_default build error on windows 10

Hi, I’m trying to build px4_fmu-v5 for the pixhawk 4, on windows 10.
i followed the instructions on Windows Development Environment | PX4 User Guide
installed the toolchain
run-console.bat
cloned my fork
then when i run “make px4_fmu-v5”, i ve this error
make px4_fmu-v5
– PX4 version: v1.12.0-beta5-244-g5b3c29237d
– PX4 config file: /cygdrive/d/D_Documents/ICL/AquaMAV/Autopilot/PX4/home/Firmware/boards/px4/fmu-v5/default.cmake
– PX4 config: px4_fmu-v5_default
– PX4 platform: nuttx
– cmake build type: MinSizeRel
– The CXX compiler identification is GNU 7.3.1
– The C compiler identification is GNU 7.3.1
– The ASM compiler identification is GNU
– Found assembler: /cygdrive/d/D_Documents/ICL/AquaMAV/Autopilot/PX4/toolchain/gcc-arm/bin/arm-none-eabi-gcc.exe
– Check for working CXX compiler: /cygdrive/d/D_Documents/ICL/AquaMAV/Autopilot/PX4/toolchain/gcc-arm/bin/arm-none-eabi-g++.exe
– Check for working CXX compiler: /cygdrive/d/D_Documents/ICL/AquaMAV/Autopilot/PX4/toolchain/gcc-arm/bin/arm-none-eabi-g++.exe – works
– Detecting CXX compiler ABI info
– Detecting CXX compiler ABI info - failed
– Detecting CXX compile features
– Detecting CXX compile features - failed
– Check for working C compiler: /cygdrive/d/D_Documents/ICL/AquaMAV/Autopilot/PX4/toolchain/gcc-arm/bin/arm-none-eabi-gcc.exe
– Check for working C compiler: /cygdrive/d/D_Documents/ICL/AquaMAV/Autopilot/PX4/toolchain/gcc-arm/bin/arm-none-eabi-gcc.exe – works
– Detecting C compiler ABI info
– Detecting C compiler ABI info - failed
– Detecting C compile features
– Detecting C compile features - failed
– Enabling double FP precision hardware instructions
– Found PythonInterp: /usr/bin/python3 (found suitable version “3.6.9”, minimum required is “3”)
– Build files have been written to: /cygdrive/d/D_Documents/ICL/AquaMAV/Autopilot/PX4/home/Firmware/build/px4_fmu-v5_default/external/Build/px4io_firmware
[29/1372] Performing build step for ‘px4io_firmware’
[0/244] git submodule platforms/nuttx/NuttX/nuttx
[7/244] git submodule platforms/nuttx/NuttX/apps
[19/244] Generating apps/libapps.a
FAILED: NuttX/apps/libapps.a
cd /cygdrive/d/D_Documents/ICL/AquaMAV/Autopilot/PX4/home/Firmware/build/px4_fmu-v5_default/external/Build/px4io_firmware/NuttX/apps && find /cygdrive/d/D_Documents/ICL/AquaMAV/Autopilot/PX4/home/Firmware/build/px4_fmu-v5_default/external/Build/px4io_firmware/NuttX/apps -name *.o -delete && make --quiet --no-print-directory TOPDIR="/cygdrive/d/D_Documents/ICL/AquaMAV/Autopilot/PX4/home/Firmware/build/px4_fmu-v5_default/external/Build/px4io_firmware/NuttX/nuttx" > nuttx_apps.log
Assembler messages:
Fatal error: can’t create dummy.cygdrive.d.D_Documents.ICL.AquaMAV.Autopilot.PX4.home.Firmware.build.px4_fmu-v5_default.external.Build.px4io_firmware.NuttX.apps.platform.o: No such file or directory
make[3]: *** [/cygdrive/d/D_Documents/ICL/AquaMAV/Autopilot/PX4/home/Firmware/build/px4_fmu-v5_default/external/Build/px4io_firmware/NuttX/apps/Application.mk:134: dummy.cygdrive.d.D_Documents.ICL.AquaMAV.Autopilot.PX4.home.Firmware.build.px4_fmu-v5_default.external.Build.px4io_firmware.NuttX.apps.platform.o] Error 1
make[2]: *** [Makefile:59: /cygdrive/d/D_Documents/ICL/AquaMAV/Autopilot/PX4/home/Firmware/build/px4_fmu-v5_default/external/Build/px4io_firmware/NuttX/apps/platform_all] Error 2
make[1]: *** [Makefile:53: all] Error 2
[22/244] Generating nuttx/fs/libfs.a
ninja: build stopped: interrupted by user.
[791/1372] Building CXX object src/drivers/magnetometer/isentek/ist8308/CMakeFiles/drivers__magnetometer__isentek__ist8308.dir/IST8308.cpp.obj
ninja: build stopped: interrupted by user.
make: *** [Makefile:228: px4_fmu-v5] Interrupt

px4_fmu-v4 and pix_sitl_default work.
Any idea what could be wrong there ?
Thanks,
Julien

Same problem here too. @Julien_Di_Tria have you solved the problem?
$ make px4_fmu-v5_default
– PX4 version: v1.13.0-alpha1-3464-g4c6621f6cf
– Found PythonInterp: /usr/bin/python3 (found suitable version “3.6.9”, minimum required is “3”)
– PX4 config file: /cygdrive/c/PX4/home/PX4-Autopilot/boards/px4/fmu-v5/default.px4board
– PLATFORM nuttx
– TOOLCHAIN arm-none-eabi
– ARCHITECTURE cortex-m7
– ROMFSROOT px4fmu_common
– IO px4_io-v2_default
– SERIAL_GPS1 /dev/ttyS0
– SERIAL_TEL1 /dev/ttyS1
– SERIAL_TEL2 /dev/ttyS2
– SERIAL_TEL4 /dev/ttyS3
– UAVCAN_INTERFACES 2
– UAVCAN_TIMER_OVERRIDE 6
– PX4 config: px4_fmu-v5_default
– PX4 platform: nuttx
– cmake build type: MinSizeRel
– The CXX compiler identification is GNU 7.3.1
– The C compiler identification is GNU 7.3.1
– The ASM compiler identification is GNU
– Found assembler: /cygdrive/c/PX4/toolchain/gcc-arm/bin/arm-none-eabi-gcc.exe
– Check for working CXX compiler: /cygdrive/c/PX4/toolchain/gcc-arm/bin/arm-none-eabi-g++.exe
– Check for working CXX compiler: /cygdrive/c/PX4/toolchain/gcc-arm/bin/arm-none-eabi-g++.exe – works
– Detecting CXX compiler ABI info
– Detecting CXX compiler ABI info - failed
– Detecting CXX compile features
– Detecting CXX compile features - failed
– Check for working C compiler: /cygdrive/c/PX4/toolchain/gcc-arm/bin/arm-none-eabi-gcc.exe
– Check for working C compiler: /cygdrive/c/PX4/toolchain/gcc-arm/bin/arm-none-eabi-gcc.exe – works
– Detecting C compiler ABI info
– Detecting C compiler ABI info - failed
– Detecting C compile features
– Detecting C compile features - failed
– Enabling double FP precision hardware instructions
– drivers/px4io: ROMFS including px4_io-v2_default
CMake Error at src/drivers/px4io/CMakeLists.txt:55 (cmake_policy):
Policy “CMP0097” is not known to this version of CMake.

– Found PythonInterp: /usr/bin/python3 (found version “3.6.9”)
– Using C++11
– Release build type: MinSizeRel
– ROMFS: ROMFS/px4fmu_common
– ROMFS: Adding platforms/nuttx/init/stm32f7/rc.board_arch_defaults → /etc/init.d/rc.board_arch_defaults
– ROMFS: Adding boards/px4/fmu-v5/init/rc.board_defaults → /etc/init.d/rc.board_defaults
– ROMFS: Adding boards/px4/fmu-v5/init/rc.board_sensors → /etc/init.d/rc.board_sensors
– ROMFS: Adding boards/px4/fmu-v5/extras/px4_fmu-v5_bootloader.bin → /etc/extras/px4_fmu-v5_bootloader.bin
– ROMFS: Adding boards/px4/fmu-v5/extras/px4_io-v2_default.bin → /etc/extras/px4_io-v2_default.bin
– Configuring incomplete, errors occurred!
See also “/cygdrive/c/PX4/home/PX4-Autopilot/build/px4_fmu-v5_default/CMakeFiles/CMakeOutput.log”.
See also “/cygdrive/c/PX4/home/PX4-Autopilot/build/px4_fmu-v5_default/CMakeFiles/CMakeError.log”.
Error: /cygdrive/c/PX4/home/PX4-Autopilot/build/px4_fmu-v5_default is not a directory
make: *** [Makefile:225: px4_fmu-v5_default] Error 1

@Julien_Di_Tria have you solved the problem?

Hi I’ve encountered the same cmake error problem but in Ubuntu-18.04, when make px4_fmu-v5_default and make px4_sitl gazebo both don’t work. If you look at the error message

CMake Error at src/drivers/px4io/CMakeLists.txt:55 (cmake_policy):
Policy “CMP0097” is not known to this version of CMake.

The problem to me is the out-dated cmake version. My original cmake version is 3.10. After I upgraded it to the latest 3.20, the two make commands worked.

Details of upgrading cmake can be found here:

I think upgrading the cmake in Windows 10 also solve the above. Cheers.