Why am I receiving "fatal error: algorithm: No such file or directory" from the MAVLink Serializer block during Build & Deploy on a Pixhawk 1?

38 views (last 30 days)
I have developed a flight control system using Simulink (MATLAB 2022a) connected with a Pixhawk 1 (FMU v3). I have successfully been able to upload the code to the board and had a few months of successful flights, but I would now like to be able to monitor some internal states of the flight controller back on a ground station.
I did some digging and found that using the MAVLink Serializer to send data back to the ground controller is a common method, so I tried to follow along the steps shown in: https://www.mathworks.com/help/supportpkg/nvidia/ug/read-write-mavlink-packets-jetson-cpu.html but I continue to get the same error during the compilation process. Below is an image of the code I have included in the model that has induced the problem.
I have tried both MAVLink V1 and V2 but continue to get the same error. The error code is very long, so I apologize in advance for the length of the error. I have also left the colors to default as it's clearer to read than red text.
[508/1214] Building CXX object src/modules/px4_simulink_app/CMakeFiles/modules__px4_simulink_app.dir/mavlinkcodegen_api.cpp.obj
FAILED: src/modules/px4_simulink_app/CMakeFiles/modules__px4_simulink_app.dir/mavlinkcodegen_api.cpp.obj
/cygdrive/c/PX4/T/toolchain/gcc-arm/bin/arm-none-eabi-g++.exe -DALLOCATIONFCN=0 -DCLASSIC_INTERFACE=0 -DCONFIG_ARCH_BOARD_PX4_FMU_V3 -DEXTMODE_DISABLEPRINTF -DEXTMODE_DISABLETESTING -DEXTMODE_DISABLE_ARGS_PROCESSING=1 -DFMUv2 -DHAVESTDIO -DINTEGER_CODE=0 -DMAT_FILE=0 -DMODEL=LPC_Lite_PX4 -DMODEL_HAS_DYNAMICALLY_LOADED_SFCNS=0 -DMODULE_NAME=\"px4_simulink_app\" -DMT=0 -DMULTI_INSTANCE_CODE=0 -DMW_PX4_NUTTX_BUILD -DNCSTATES=0 -DNULL=0 -DNUMST=1 -DONESTEPFCN=1 -DPX4 -DPX4_MAIN=px4_simulink_app_app_main -DRT -DSTACK_SIZE=64 -DTERMFCN=1 -DTID01EQ=0 -DXCP_PLATFORM_LINUX_NO_PIE_SUPPORT -D__CUSTOM_FILE_IO__ -D__DF_NUTTX -D__MW_TARGET_USE_HARDWARE_RESOURCES_H__ -D__PX4_NUTTX -D__STDC_FORMAT_MACROS -D__linux__ -I../../boards/px4/fmu-v3/src -I../../platforms/nuttx/src/px4/common/include -I. -Isrc -Isrc/lib -Isrc/modules -I../../platforms/nuttx/src/px4/stm/stm32f4/include -I../../platforms/common/include -I../../src -I../../src/include -I../../src/lib -I../../src/lib/DriverFramework/framework/include -I../../src/lib/matrix -I../../src/modules -I../../src/platforms -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 -isystem ../../platforms/nuttx/NuttX/include/cxx -isystem NuttX/nuttx/include/cxx -isystem NuttX/nuttx/include -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-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 -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++ -Wframe-larger-than=2000 -fpermissive -Wno-narrowing -std=gnu++11 -MD -MT src/modules/px4_simulink_app/CMakeFiles/modules__px4_simulink_app.dir/mavlinkcodegen_api.cpp.obj -MF src/modules/px4_simulink_app/CMakeFiles/modules__px4_simulink_app.dir/mavlinkcodegen_api.cpp.obj.d -o src/modules/px4_simulink_app/CMakeFiles/modules__px4_simulink_app.dir/mavlinkcodegen_api.cpp.obj -c ../../src/modules/px4_simulink_app/mavlinkcodegen_api.cpp
../../src/modules/px4_simulink_app/mavlinkcodegen_api.cpp:9:10: fatal error: algorithm: No such file or directory
#include <algorithm>
^~~~~~~~~~~
compilation terminated.
[509/1214] Building CXX object src/modules/px4_simulink_app/CMakeFiles/modules__px4_simulink_app.dir/mavlinkcodegen_CircularQueue.cpp.obj
FAILED: src/modules/px4_simulink_app/CMakeFiles/modules__px4_simulink_app.dir/mavlinkcodegen_CircularQueue.cpp.obj
/cygdrive/c/PX4/T/toolchain/gcc-arm/bin/arm-none-eabi-g++.exe -DALLOCATIONFCN=0 -DCLASSIC_INTERFACE=0 -DCONFIG_ARCH_BOARD_PX4_FMU_V3 -DEXTMODE_DISABLEPRINTF -DEXTMODE_DISABLETESTING -DEXTMODE_DISABLE_ARGS_PROCESSING=1 -DFMUv2 -DHAVESTDIO -DINTEGER_CODE=0 -DMAT_FILE=0 -DMODEL=LPC_Lite_PX4 -DMODEL_HAS_DYNAMICALLY_LOADED_SFCNS=0 -DMODULE_NAME=\"px4_simulink_app\" -DMT=0 -DMULTI_INSTANCE_CODE=0 -DMW_PX4_NUTTX_BUILD -DNCSTATES=0 -DNULL=0 -DNUMST=1 -DONESTEPFCN=1 -DPX4 -DPX4_MAIN=px4_simulink_app_app_main -DRT -DSTACK_SIZE=64 -DTERMFCN=1 -DTID01EQ=0 -DXCP_PLATFORM_LINUX_NO_PIE_SUPPORT -D__CUSTOM_FILE_IO__ -D__DF_NUTTX -D__MW_TARGET_USE_HARDWARE_RESOURCES_H__ -D__PX4_NUTTX -D__STDC_FORMAT_MACROS -D__linux__ -I../../boards/px4/fmu-v3/src -I../../platforms/nuttx/src/px4/common/include -I. -Isrc -Isrc/lib -Isrc/modules -I../../platforms/nuttx/src/px4/stm/stm32f4/include -I../../platforms/common/include -I../../src -I../../src/include -I../../src/lib -I../../src/lib/DriverFramework/framework/include -I../../src/lib/matrix -I../../src/modules -I../../src/platforms -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 -isystem ../../platforms/nuttx/NuttX/include/cxx -isystem NuttX/nuttx/include/cxx -isystem NuttX/nuttx/include -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-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 -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++ -Wframe-larger-than=2000 -fpermissive -Wno-narrowing -std=gnu++11 -MD -MT src/modules/px4_simulink_app/CMakeFiles/modules__px4_simulink_app.dir/mavlinkcodegen_CircularQueue.cpp.obj -MF src/modules/px4_simulink_app/CMakeFiles/modules__px4_simulink_app.dir/mavlinkcodegen_CircularQueue.cpp.obj.d -o src/modules/px4_simulink_app/CMakeFiles/modules__px4_simulink_app.dir/mavlinkcodegen_CircularQueue.cpp.obj -c ../../src/modules/px4_simulink_app/mavlinkcodegen_CircularQueue.cpp
../../src/modules/px4_simulink_app/mavlinkcodegen_CircularQueue.cpp:6:10: fatal error: mavlinkcodegen_CircularQueue.hpp: No such file or directory
#include "mavlinkcodegen_CircularQueue.hpp"
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
[510/1214] Building CXX object src/modules/px4_simulink_app/CMakeFiles/modules__px4_simulink_app.dir/mavlinkcodegen_MAVLinkParser.cpp.obj
FAILED: src/modules/px4_simulink_app/CMakeFiles/modules__px4_simulink_app.dir/mavlinkcodegen_MAVLinkParser.cpp.obj
/cygdrive/c/PX4/T/toolchain/gcc-arm/bin/arm-none-eabi-g++.exe -DALLOCATIONFCN=0 -DCLASSIC_INTERFACE=0 -DCONFIG_ARCH_BOARD_PX4_FMU_V3 -DEXTMODE_DISABLEPRINTF -DEXTMODE_DISABLETESTING -DEXTMODE_DISABLE_ARGS_PROCESSING=1 -DFMUv2 -DHAVESTDIO -DINTEGER_CODE=0 -DMAT_FILE=0 -DMODEL=LPC_Lite_PX4 -DMODEL_HAS_DYNAMICALLY_LOADED_SFCNS=0 -DMODULE_NAME=\"px4_simulink_app\" -DMT=0 -DMULTI_INSTANCE_CODE=0 -DMW_PX4_NUTTX_BUILD -DNCSTATES=0 -DNULL=0 -DNUMST=1 -DONESTEPFCN=1 -DPX4 -DPX4_MAIN=px4_simulink_app_app_main -DRT -DSTACK_SIZE=64 -DTERMFCN=1 -DTID01EQ=0 -DXCP_PLATFORM_LINUX_NO_PIE_SUPPORT -D__CUSTOM_FILE_IO__ -D__DF_NUTTX -D__MW_TARGET_USE_HARDWARE_RESOURCES_H__ -D__PX4_NUTTX -D__STDC_FORMAT_MACROS -D__linux__ -I../../boards/px4/fmu-v3/src -I../../platforms/nuttx/src/px4/common/include -I. -Isrc -Isrc/lib -Isrc/modules -I../../platforms/nuttx/src/px4/stm/stm32f4/include -I../../platforms/common/include -I../../src -I../../src/include -I../../src/lib -I../../src/lib/DriverFramework/framework/include -I../../src/lib/matrix -I../../src/modules -I../../src/platforms -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 -isystem ../../platforms/nuttx/NuttX/include/cxx -isystem NuttX/nuttx/include/cxx -isystem NuttX/nuttx/include -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-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 -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++ -Wframe-larger-than=2000 -fpermissive -Wno-narrowing -std=gnu++11 -MD -MT src/modules/px4_simulink_app/CMakeFiles/modules__px4_simulink_app.dir/mavlinkcodegen_MAVLinkParser.cpp.obj -MF src/modules/px4_simulink_app/CMakeFiles/modules__px4_simulink_app.dir/mavlinkcodegen_MAVLinkParser.cpp.obj.d -o src/modules/px4_simulink_app/CMakeFiles/modules__px4_simulink_app.dir/mavlinkcodegen_MAVLinkParser.cpp.obj -c ../../src/modules/px4_simulink_app/mavlinkcodegen_MAVLinkParser.cpp
../../src/modules/px4_simulink_app/mavlinkcodegen_MAVLinkParser.cpp:6:10: fatal error: mavlinkcodegen_MAVLinkParser.hpp: No such file or directory
#include "mavlinkcodegen_MAVLinkParser.hpp"
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
[511/1214] Building CXX object src/modules/px4_simulink_app/CMakeFiles/modules__px4_simulink_app.dir/mavlinkcodegen_MAVLinkSerializerCodegenImpl.cpp.obj
FAILED: src/modules/px4_simulink_app/CMakeFiles/modules__px4_simulink_app.dir/mavlinkcodegen_MAVLinkSerializerCodegenImpl.cpp.obj
/cygdrive/c/PX4/T/toolchain/gcc-arm/bin/arm-none-eabi-g++.exe -DALLOCATIONFCN=0 -DCLASSIC_INTERFACE=0 -DCONFIG_ARCH_BOARD_PX4_FMU_V3 -DEXTMODE_DISABLEPRINTF -DEXTMODE_DISABLETESTING -DEXTMODE_DISABLE_ARGS_PROCESSING=1 -DFMUv2 -DHAVESTDIO -DINTEGER_CODE=0 -DMAT_FILE=0 -DMODEL=LPC_Lite_PX4 -DMODEL_HAS_DYNAMICALLY_LOADED_SFCNS=0 -DMODULE_NAME=\"px4_simulink_app\" -DMT=0 -DMULTI_INSTANCE_CODE=0 -DMW_PX4_NUTTX_BUILD -DNCSTATES=0 -DNULL=0 -DNUMST=1 -DONESTEPFCN=1 -DPX4 -DPX4_MAIN=px4_simulink_app_app_main -DRT -DSTACK_SIZE=64 -DTERMFCN=1 -DTID01EQ=0 -DXCP_PLATFORM_LINUX_NO_PIE_SUPPORT -D__CUSTOM_FILE_IO__ -D__DF_NUTTX -D__MW_TARGET_USE_HARDWARE_RESOURCES_H__ -D__PX4_NUTTX -D__STDC_FORMAT_MACROS -D__linux__ -I../../boards/px4/fmu-v3/src -I../../platforms/nuttx/src/px4/common/include -I. -Isrc -Isrc/lib -Isrc/modules -I../../platforms/nuttx/src/px4/stm/stm32f4/include -I../../platforms/common/include -I../../src -I../../src/include -I../../src/lib -I../../src/lib/DriverFramework/framework/include -I../../src/lib/matrix -I../../src/modules -I../../src/platforms -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 -isystem ../../platforms/nuttx/NuttX/include/cxx -isystem NuttX/nuttx/include/cxx -isystem NuttX/nuttx/include -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-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 -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++ -Wframe-larger-than=2000 -fpermissive -Wno-narrowing -std=gnu++11 -MD -MT src/modules/px4_simulink_app/CMakeFiles/modules__px4_simulink_app.dir/mavlinkcodegen_MAVLinkSerializerCodegenImpl.cpp.obj -MF src/modules/px4_simulink_app/CMakeFiles/modules__px4_simulink_app.dir/mavlinkcodegen_MAVLinkSerializerCodegenImpl.cpp.obj.d -o src/modules/px4_simulink_app/CMakeFiles/modules__px4_simulink_app.dir/mavlinkcodegen_MAVLinkSerializerCodegenImpl.cpp.obj -c ../../src/modules/px4_simulink_app/mavlinkcodegen_MAVLinkSerializerCodegenImpl.cpp
../../src/modules/px4_simulink_app/mavlinkcodegen_MAVLinkSerializerCodegenImpl.cpp:7:10: fatal error: mavlinkcodegen_MAVLinkParser.hpp: No such file or directory
#include "mavlinkcodegen_MAVLinkParser.hpp"
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
[512/1214] Building CXX object src/modules/px4_simulink_app/CMakeFiles/modules__px4_simulink_app.dir/mavlinkcodegen_MAVLinkWrapper.cpp.obj
FAILED: src/modules/px4_simulink_app/CMakeFiles/modules__px4_simulink_app.dir/mavlinkcodegen_MAVLinkWrapper.cpp.obj
/cygdrive/c/PX4/T/toolchain/gcc-arm/bin/arm-none-eabi-g++.exe -DALLOCATIONFCN=0 -DCLASSIC_INTERFACE=0 -DCONFIG_ARCH_BOARD_PX4_FMU_V3 -DEXTMODE_DISABLEPRINTF -DEXTMODE_DISABLETESTING -DEXTMODE_DISABLE_ARGS_PROCESSING=1 -DFMUv2 -DHAVESTDIO -DINTEGER_CODE=0 -DMAT_FILE=0 -DMODEL=LPC_Lite_PX4 -DMODEL_HAS_DYNAMICALLY_LOADED_SFCNS=0 -DMODULE_NAME=\"px4_simulink_app\" -DMT=0 -DMULTI_INSTANCE_CODE=0 -DMW_PX4_NUTTX_BUILD -DNCSTATES=0 -DNULL=0 -DNUMST=1 -DONESTEPFCN=1 -DPX4 -DPX4_MAIN=px4_simulink_app_app_main -DRT -DSTACK_SIZE=64 -DTERMFCN=1 -DTID01EQ=0 -DXCP_PLATFORM_LINUX_NO_PIE_SUPPORT -D__CUSTOM_FILE_IO__ -D__DF_NUTTX -D__MW_TARGET_USE_HARDWARE_RESOURCES_H__ -D__PX4_NUTTX -D__STDC_FORMAT_MACROS -D__linux__ -I../../boards/px4/fmu-v3/src -I../../platforms/nuttx/src/px4/common/include -I. -Isrc -Isrc/lib -Isrc/modules -I../../platforms/nuttx/src/px4/stm/stm32f4/include -I../../platforms/common/include -I../../src -I../../src/include -I../../src/lib -I../../src/lib/DriverFramework/framework/include -I../../src/lib/matrix -I../../src/modules -I../../src/platforms -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 -isystem ../../platforms/nuttx/NuttX/include/cxx -isystem NuttX/nuttx/include/cxx -isystem NuttX/nuttx/include -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-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 -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++ -Wframe-larger-than=2000 -fpermissive -Wno-narrowing -std=gnu++11 -MD -MT src/modules/px4_simulink_app/CMakeFiles/modules__px4_simulink_app.dir/mavlinkcodegen_MAVLinkWrapper.cpp.obj -MF src/modules/px4_simulink_app/CMakeFiles/modules__px4_simulink_app.dir/mavlinkcodegen_MAVLinkWrapper.cpp.obj.d -o src/modules/px4_simulink_app/CMakeFiles/modules__px4_simulink_app.dir/mavlinkcodegen_MAVLinkWrapper.cpp.obj -c ../../src/modules/px4_simulink_app/mavlinkcodegen_MAVLinkWrapper.cpp
../../src/modules/px4_simulink_app/mavlinkcodegen_MAVLinkWrapper.cpp:6:10: fatal error: mavlinkcodegen_MAVLinkWrapper.hpp: No such file or directory
#include "mavlinkcodegen_MAVLinkWrapper.hpp"
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
[513/1214] Building CXX object src/modules/px4_simulink_app/CMakeFiles/modules__px4_simulink_app.dir/MW_ParameterRead.cpp.obj
[514/1214] Building CXX object src/modules/px4_simulink_app/CMakeFiles/modules__px4_simulink_app.dir/MW_PX4_PWM.cpp.obj
[515/1214] Building CXX object src/modules/px4_simulink_app/CMakeFiles/modules__px4_simulink_app.dir/MW_uORB_Read.cpp.obj
[516/1214] Building CXX object src/modules/px4_simulink_app/CMakeFiles/modules__px4_simulink_app.dir/ert_main.cpp.obj
FAILED: src/modules/px4_simulink_app/CMakeFiles/modules__px4_simulink_app.dir/ert_main.cpp.obj
/cygdrive/c/PX4/T/toolchain/gcc-arm/bin/arm-none-eabi-g++.exe -DALLOCATIONFCN=0 -DCLASSIC_INTERFACE=0 -DCONFIG_ARCH_BOARD_PX4_FMU_V3 -DEXTMODE_DISABLEPRINTF -DEXTMODE_DISABLETESTING -DEXTMODE_DISABLE_ARGS_PROCESSING=1 -DFMUv2 -DHAVESTDIO -DINTEGER_CODE=0 -DMAT_FILE=0 -DMODEL=LPC_Lite_PX4 -DMODEL_HAS_DYNAMICALLY_LOADED_SFCNS=0 -DMODULE_NAME=\"px4_simulink_app\" -DMT=0 -DMULTI_INSTANCE_CODE=0 -DMW_PX4_NUTTX_BUILD -DNCSTATES=0 -DNULL=0 -DNUMST=1 -DONESTEPFCN=1 -DPX4 -DPX4_MAIN=px4_simulink_app_app_main -DRT -DSTACK_SIZE=64 -DTERMFCN=1 -DTID01EQ=0 -DXCP_PLATFORM_LINUX_NO_PIE_SUPPORT -D__CUSTOM_FILE_IO__ -D__DF_NUTTX -D__MW_TARGET_USE_HARDWARE_RESOURCES_H__ -D__PX4_NUTTX -D__STDC_FORMAT_MACROS -D__linux__ -I../../boards/px4/fmu-v3/src -I../../platforms/nuttx/src/px4/common/include -I. -Isrc -Isrc/lib -Isrc/modules -I../../platforms/nuttx/src/px4/stm/stm32f4/include -I../../platforms/common/include -I../../src -I../../src/include -I../../src/lib -I../../src/lib/DriverFramework/framework/include -I../../src/lib/matrix -I../../src/modules -I../../src/platforms -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 -isystem ../../platforms/nuttx/NuttX/include/cxx -isystem NuttX/nuttx/include/cxx -isystem NuttX/nuttx/include -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-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 -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++ -Wframe-larger-than=2000 -fpermissive -Wno-narrowing -std=gnu++11 -MD -MT src/modules/px4_simulink_app/CMakeFiles/modules__px4_simulink_app.dir/ert_main.cpp.obj -MF src/modules/px4_simulink_app/CMakeFiles/modules__px4_simulink_app.dir/ert_main.cpp.obj.d -o src/modules/px4_simulink_app/CMakeFiles/modules__px4_simulink_app.dir/ert_main.cpp.obj -c ../../src/modules/px4_simulink_app/ert_main.cpp
In file included from ../../src/modules/px4_simulink_app/ert_main.cpp:21:0:
../../src/modules/px4_simulink_app/LPC_Lite_PX4.h:27:10: fatal error: mavlinkcodegen_api.hpp: No such file or directory
#include "mavlinkcodegen_api.hpp"
^~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
[517/1214] Building CXX object src/modules/px4_simulink_app/CMakeFiles/modules__px4_simulink_app.dir/MW_SCI.cpp.obj
[518/1214] Building CXX object src/drivers/uavcan/CMakeFiles/modules__uavcan.dir/actuators/hardpoint.cpp.obj
[519/1214] Building CXX object src/drivers/uavcan/CMakeFiles/modules__uavcan.dir/actuators/esc.cpp.obj
[520/1214] Building CXX object src/drivers/uavcan/CMakeFiles/modules__uavcan.dir/sensors/sensor_bridge.cpp.obj
[521/1214] Building CXX object src/drivers/uavcan/CMakeFiles/modules__uavcan.dir/sensors/mag.cpp.obj
[522/1214] Building CXX object src/drivers/uavcan/CMakeFiles/modules__uavcan.dir/sensors/flow.cpp.obj
[523/1214] Building CXX object src/drivers/uavcan/CMakeFiles/modules__uavcan.dir/sensors/baro.cpp.obj
[524/1214] Building CXX object src/drivers/uavcan/CMakeFiles/modules__uavcan.dir/sensors/battery.cpp.obj
[525/1214] Generating nuttx/mm/libmm.a
[526/1214] Building CXX object src/drivers/uavcan/CMakeFiles/modules__uavcan.dir/sensors/gnss.cpp.obj
[527/1214] Building CXX object src/drivers/uavcan/CMakeFiles/modules__uavcan.dir/uavcan_main.cpp.obj
[528/1214] Building CXX object src/drivers/uavcan/CMakeFiles/modules__uavcan.dir/uavcan_servers.cpp.obj
[529/1214] Generating nuttx/fs/libfs.a
[530/1214] Generating nuttx/arch/arm/src/libarch.a
[531/1214] Generating nuttx/sched/libsched.a
[532/1214] Generating nuttx/libs/libc/libc.a
[533/1214] Generating nuttx/drivers/libdrivers.a
ninja: build stopped: subcommand failed.
make: *** [Makefile:195: px4_fmu-v3_default] Error 1
PX4 Cygwin returned an error of 2
I dug inside the file where the error originates but I wasn't able to understand what exactly it's trying to call and how to even fix the fact that something appears to be missing.
Any help would be greatly appreciated. Thank you in advance.

Accepted Answer

Ankur Bose
Ankur Bose on 16 Aug 2023
The MAVLink blocks in Simulink can only be deployed on a Linux target as mentioned here.
The Pixhawk board does not rub Linux but Nuttx OS and hence the blocks cant be deployed on these boards

More Answers (0)

Products


Release

R2022a

Community Treasure Hunt

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

Start Hunting!