Build Failed : "Compilation failure for command" with PX4

Hello,
I am trying to test a flight controller algorithm on PX4 Host Target on my Simulink but I get the following error. Does anyone know the solution ?
Top model targets built:
Model Action Rebuild Reason
=========================================================================
attitude_cont Failed Code generation information file does not exist.
0 of 1 models built (0 models already up to date)
Build duration: 0h 0m 22.477s
Compilation failure for command "C:\PX4\run-console_Simulink.bat "cd C:/PX4/home/Firmware/build/px4_sitl_default; bash
/cygdrive/c/ProgramData/MATLAB/SupportPackages/R2023a/toolbox/target/supportpackages/px4/lib/scripts/executeBashCmdCygwin.sh /cygdrive/c/PX4/home/Firmware/build/px4_sitl_default/generateHostTargetObj.txt"" with error "/cygdrive/c/PX4/home/Firmware/build/px4_sitl_default/generateHostTargetObj.txt

1 comentario

zhu
zhu el 23 de Nov. de 2023
Hello, have you solved this problem? I also encountered the same problem, did not solve, can you provide the solution ideas?

Iniciar sesión para comentar.

 Respuesta aceptada

Abhishek Krishna
Abhishek Krishna el 16 de Jun. de 2023
Editada: Stefanie Schwarz el 24 de Mzo. de 2026
Hi,
Here are a few things you can try to resolve the issue:
  1. Check if your model is set up correctly and all the required blocks and parameters are defined.
  2. Verify if the build folder exists and the path to that folder is correctly specified.
  3. Check if there are any errors in the MATLAB Command Window that may have caused the code generation to fail.
  4. Check if the necessary support packages and target files are installed in MATLAB. You may need to download and install the required support packages for PX4 Host Target.
  5. Try generating the code manually via the Build button in Simulink.
  6. Make sure that the cygwin path is set in MATLAB.

1 comentario

Remo Pillat
Remo Pillat hace alrededor de 3 horas
This answer looks good. If none of the steps help, please reach out to MathWorks support.

Iniciar sesión para comentar.

Más respuestas (0)

Productos

Versión

R2023a

Preguntada:

el 28 de Mayo de 2023

Comentada:

hace alrededor de 3 horas

Community Treasure Hunt

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

Start Hunting!

Translated by