PX4 building on MATLAB on Windows

31 views (last 30 days)
Vinay
Vinay on 2 Mar 2023
Answered: John conner on 28 Feb 2024
Hi,
We were trying to build the Firmware for PX4 on windows. We intend to build PX4 for Pixawk 3DR with FMUV2. We have been successful in using this Autopilot on QGround Control and also were able to compile on Linux as well. However, the build on MATLAB is not going through & is giving us the following error, extracted from MW_px4_log.txt. Could anyone kindly help us resolve it ? We are using MATLAB R2022b on Windows 11 PC.
MathWorks PX4 Log File
BUILDSTARTING_02-Mar-2023_13-19-51
CMAKE Config selected : px4_fmu-v2_default
CMake Error at cmake/px4_add_library.cmake:41 (add_library):
Cannot find source file:
monocypher/src/monocypher.c
Tried extensions .c .C .c++ .cc .cpp .cxx .cu .m .M .mm .h .hh .h++ .hm
.hpp .hxx .in .txx
Call Stack (most recent call first):
src/lib/crypto/CMakeLists.txt:34 (px4_add_library)
CMake Error at cmake/px4_add_library.cmake:41 (add_library):
No SOURCES given to target: monocypher
Call Stack (most recent call first):
src/lib/crypto/CMakeLists.txt:34 (px4_add_library)
Error: /cygdrive/c/px4_cygwin/home/Firmware/build/px4_fmu-v2_default is not a directory
make: *** [Makefile:226: px4_fmu-v2_default] Error 1
BUILDCOMPLETE_02-Mar-2023_13-19-51
BUILDSTARTING_02-Mar-2023_13-33-34
CMAKE Config selected : px4_fmu-v2_default
CMake Error at cmake/px4_add_library.cmake:41 (add_library):
Cannot find source file:
monocypher/src/monocypher.c
Tried extensions .c .C .c++ .cc .cpp .cxx .cu .m .M .mm .h .hh .h++ .hm
.hpp .hxx .in .txx
Call Stack (most recent call first):
src/lib/crypto/CMakeLists.txt:34 (px4_add_library)
CMake Error at cmake/px4_add_library.cmake:41 (add_library):
No SOURCES given to target: monocypher
Call Stack (most recent call first):
src/lib/crypto/CMakeLists.txt:34 (px4_add_library)
Error: /cygdrive/c/px4_cygwin/home/Firmware/build/px4_fmu-v2_default is not a directory
make: *** [Makefile:226: px4_fmu-v2_default] Error 1
BUILDCOMPLETE_02-Mar-2023_13-33-34
  1 Comment
Ayush
Ayush on 8 Dec 2023
we are using pixhawk 2.4.8 and facing error in the same step from a long time, still not able to resolve it, tried with a lot of possible actions to be taken, but error is not taking a name to get resolve. Please help us out if you found out any solution for the above, Will be a great help from your side.

Sign in to comment.

Answers (3)

Arun Mathamkode
Arun Mathamkode on 6 Mar 2023
Edited: Arun Mathamkode on 6 Mar 2023
Pixhawk 3DR flight controller has been discontinued and is no longer commercially available. You can use the mRo Pixhawk instead. The main difference is that it is based on the Pixhawk FMUv3 open hardware design, which corrects a bug that limited the original Pixhawk 1 to 1MB of flash.

원지 최
원지 최 on 27 Jun 2023
Did you solve the problem? I had a same outputs and I solve with some messy. But still, I'm not sure this is the right way, lol.
I just compared the 'src/lib/crypto/CMakeLists.txt'files of v1.12.3 and latest version.
Then tweaked some lines. And I could successfully build the SITL.
I hope my case can be helpful for you.
  1 Comment
Ayush
Ayush on 8 Dec 2023
hello, even we are facing the same error in the same step from long time, can you please help us in what exactly steps you have taken, so that the error gets resolved. It would be a great help.

Sign in to comment.


John conner
John conner on 28 Feb 2024

Products


Release

R2022b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!