Why do I receive Code generation information file does not exist?

48 visualizaciones (últimos 30 días)
Søren
Søren el 16 de Dic. de 2022
Respondida: Ankur Bose el 15 de Feb. de 2023
Hi,
I'm trying to get started with the UAV Toolbox Support Package for PX4 Autopilot. I have previously managed to get it started with SITL using jMAVsim. Now I want to get started with HITL. I'm trying to use the basic "Code Generation Template" and just build that with nothing changed on my Cube Orange. I have followed this guide for setting it up with Cube Orange: https://se.mathworks.com/help/supportpkg/px4/ug/deployment-cube-orange-autopilot-simulink.html with the only difference being I run it on Ubuntu 20.04 instead of Windows.
But when I try to use build and deploy I get the following error:
Top model targets built:
Model Action Rebuild Reason
=====================================================================
untitled1 Failed Code generation information file does not exist.
0 of 1 models built (0 models already up to date)
Build duration: 0h 0m 23.189s
Compilation failure for command "/opt/gcc-arm-none-eabi-9-2020-q2-update/bin/arm-none-eabi-g++ -DCONFIG_ARCH_BOARD_CUBEPILOT_CUBEORANGE -D_SYS_CDEFS_H_ -D_SYS_REENT_H_ -D__CUSTOM_FILE_IO__ -D__PX4_NUTTX -D__STDC_FORMAT_MACROS -DMODULE_NAME=\"px4_simulink_app\" -DPX4_MAIN=px4_simulink_app_app_main -DMODEL=untitled1 -DNUMST=1 -DNCSTATES=0 -DHAVESTDIO -DMODEL_HAS_DYNAMICALLY_LOADED_SFCNS=0 -DCLASSIC_INTERFACE=0 -DALLOCATIONFCN=0 -DTID01EQ=0 -DTERMFCN=1 -DONESTEPFCN=1 -DMAT_FILE=0 -DMULTI_INSTANCE_CODE=0 -DINTEGER_CODE=0 -DMT=0 -DPX4 -DFMUvx -DNULL=0 -DMW_PX4_NUTTX_BUILD -DEXTMODE_DISABLETESTING -DEXTMODE_DISABLEPRINTF -DEXTMODE_DISABLE_ARGS_PROCESSING=1 -D__linux__ -DXCP_PLATFORM_LINUX_NO_PIE_SUPPORT -DSTACK_SIZE=64 -D__MW_TARGET_USE_HARDWARE_RESOURCES_H__ -DRT -mcpu=cortex-m7 -mthumb -mfpu=fpv5-d16 -mfloat-abi=hard -Os -DNDEBUG -g -fdata-sections -ffunction-sections -fomit-frame-pointer -fmerge-all-constants -fno-signed-zeros -fno-trapping-math -freciprocal-math -fno-math-errno -fno-strict-aliasing -fvisibility=hidden -include visibility.h -Wall -Wextra -Warray-bounds -Wcast-align -Wdisabled-optimization -Wdouble-promotion -Wfatal-errors -Wfloat-equal -Wformat-security -Winit-self -Wlogical-op -Wpointer-arith -Wshadow -Wuninitialized -Wunknown-pragmas -Wunused-variable -Wno-missing-field-initializers -Wno-missing-include-dirs -Wno-unused-parameter -fdiagnostics-color=always -Wno-stringop-truncation -fno-builtin-printf -fno-strength-reduce -Wformat=1 -Wunused-but-set-variable -Wno-format-truncation -fcheck-new -fno-exceptions -fno-rtti -fno-threadsafe-statics -Wreorder -Wno-overloaded-virtual -nostdinc++ -fno-sized-deallocation -Wframe-larger-than=2000 -fpermissive -Wno-narrowing -std=gnu++14 -I../../boards/cubepilot/cubeorange/src -I../../platforms/nuttx/src/px4/common/include -I. -Isrc/lib -I../../platforms/nuttx/src/px4/stm/stm32h7/include -I../../platforms/common -I../../platforms/common/include -I../../src -I../../src/include -I../../src/lib -I../../src/lib/matrix -I../../src/modules -INuttX/nuttx/arch/arm/src/armv7-m -INuttX/nuttx/arch/arm/src/chip -INuttX/nuttx/arch/arm/src/common -INuttX/apps/include -Iexternal/Install/include -I../../src/modules/px4_simulink_app -I../../src/modules/mavlink -I../../mavlink/include/mavlink -I/home/sorenmadsen/t -I/home/sorenmadsen/Documents/MATLAB/SupportPackages/R2022b/toolbox/target/supportpackages/px4/include -I/home/sorenmadsen/t/untitled1_ert_rtw -I/home/sorenmadsen/Desktop/Matlab/extern/include -I/home/sorenmadsen/Desktop/Matlab/simulink/include -I/home/sorenmadsen/Desktop/Matlab/rtw/c/src -I/home/sorenmadsen/Desktop/Matlab/rtw/c/src/ext_mode/common -I/home/sorenmadsen/Desktop/Matlab/rtw/c/ert -I/home/sorenmadsen/Desktop/Matlab/rtw/c/src/ext_mode/serial -o src/modules/px4_simulink_app/CMakeFiles/modules__px4_simulink_app.dir/MW_uORB_Read.cpp.obj -c ../../src/modules/px4_simulink_app/MW_uORB_Read.cpp" with error "In file included from [01m[K<command-line>[m[K:
[01m[K../../src/include/visibility.h:118:10:[m[K [01;31m[Kfatal error: [m[Kcstdlib: No such file or directory
118 | #include [01;31m[K<cstdlib>[m[K
| [01;31m[K^~~~~~~~~[m[K
compilation terminated.
"
Does anyone know the reason for my error?
  2 comentarios
Arun Mathamkode
Arun Mathamkode el 19 de Dic. de 2022
I am not able to see the error. The field looks blank. Can you please add the error message?
Søren
Søren el 28 de Dic. de 2022
@Arun Mathamkode sorry for the late response, I had the flu over Christmas.
Can you see the error now? I don't know why it didn't show up last time.

Iniciar sesión para comentar.

Respuestas (1)

Ankur Bose
Ankur Bose el 15 de Feb. de 2023
This issue is most likely due to GCC unable to find a package while compilation in your Ubuntu 20.04 installation. There are workarounds in Ubuntu forum to resolve this but none of them are guranteed and full-proof.
While we investigate the issue, can you try a simple workaround in your MATLAB? Run the below command in MATLAB command window immediately after launch and try building the Simulink model.
setpref('MW_PX4_Build','FullFirmwareBuild',true)
This command will do the full PX4 Firmware build and the make will pull in the required packages and hence you should not see the issue.

Productos


Versión

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by