Clear Filters
Clear Filters

Unable to link PX4 Simulink file to real board OR SITL with JMAVSIM

5 views (last 30 days)
Hi everyone, I am having an issue running the Simulink PX4 GPS demo on my real board (CubeOrange) or in simulation. When attempting to run with connected IO I get the error below - both for the real board or in simulation. I have no idea what might be causing it.
MATLAB System block 'PX4/GPS/PX4 uORB Read/SourceBlock' error occurred when invoking 'setupImpl' method of 'px4.internal.block.Subscriber'. The error was thrown from '
'/root/Documents/MATLAB/SupportPackages/R2023b/toolbox/target/supportpackages/px4/+px4/+internal/+block/Subscriber.p' at line 196
'/usr/local/MATLAB/R2023b/toolbox/target/codertarget/sltoolstrip/m/+codertarget/+internal/+sltoolstrip/ConnectedIOHandler.m' at line 106
'/usr/local/MATLAB/R2023b/toolbox/target/codertarget/sltoolstrip/m/+codertarget/+sltoolstrip/EmbeddedHardwareBoardContext.m' at line 523'.
Caused by:
Compilation failure for command "/usr/bin/ccache /usr/bin/c++ -DCONFIG_ARCH_BOARD_PX4_SITL -DENABLE_LOCKSTEP_SCHEDULER -D__CUSTOM_FILE_IO__ -D__PX4_LINUX -D__PX4_POSIX -D__STDC_FORMAT_MACROS -Dnoreturn_function="__attribute__((noreturn))" -DMODULE_NAME=\"px4_simulink_app\" -DPX4_MAIN=px4_simulink_app_app_main -DMODEL=connectedIO -DNUMST=1 -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 -DSTACK_SIZE=64 -D__MW_TARGET_USE_HARDWARE_RESOURCES_H__ -DRT -DNULL=0 -DPX4_CONNECTEDIO -DHOST_TARGET -DMW_PX4_POSIX_BUILD -O2 -g -DNDEBUG -fPIC -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 -fpermissive -Wno-narrowing -std=gnu++14 -I/root/Documents/MATLAB/SupportPackages/R2023b/toolbox/target/supportpackages/px4/include -I/root/Documents/MATLAB/SupportPackages/R2023b/toolbox/target/supportpackages/px4/ConnectedIO/include -I/usr/local/MATLAB/R2023b/toolbox/target/shared/svd/common/include -I/usr/local/MATLAB/R2023b/toolbox/target/shared/ioserver/ioserver/inc -I/tmp/px4_connectedIO/PX4HostTarget -o src/modules/px4_simulink_app/CMakeFiles/modules__px4_simulink_app.dir/MW_uORB_Read.cpp.o -c ../../src/modules/px4_simulink_app/MW_uORB_Read.cpp" with error "*[01m*[K<command-line>:*[m*[K *[01;31m*[Kfatal error: *[m*[Kvisibility.h: No such file or directory
compilation terminated.
[I have removed some broken characters in the last line that was preventing me posting the error on the forum]

Answers (1)

Ankur Bose
Ankur Bose on 19 Aug 2024 at 7:31
Can you upgrade to MATLAB R2024a and see if you are still running into this issue?

Community Treasure Hunt

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

Start Hunting!