Error in building simulink code for PX4-V6x
古いコメントを表示
Dear everyone,
I am building Simulink code for PX4 6x. However I got this issue. Could you let me know the solution?
Error:Compilation failure for command /opt/gcc-arm-none-eabi-9-2020-q2-update/bin/arm-none-eabi-g++ -DCONFIG_ARCH_BOARD_PX4_FMU_V6X -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=waypoint_following -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 -DFMUv6x -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 -Wreorder -Wno-overloaded-virtual -fno-rtti -fno-exceptions -fno-sized-deallocation -fno-threadsafe-statics -nostdinc++ -Wframe-larger-than=2000 -fpermissive -Wno-narrowing -Wno-address-of-packed-member -Wno-cast-align -D__KERNEL__ -std=gnu++14 -I/home/thaibahoa2024/PX4-Autopilot/boards/px4/fmu-v6x/src -I/home/thaibahoa2024/PX4-Autopilot/platforms/nuttx/src/px4/common/include -I/home/thaibahoa2024/PX4-Autopilot/build/px4_fmu-v6x_multicopter -I/home/thaibahoa2024/PX4-Autopilot/build/px4_fmu-v6x_multicopter/src/lib -I/home/thaibahoa2024/PX4-Autopilot/platforms/nuttx/src/px4/stm/stm32h7/include -I/home/thaibahoa2024/PX4-Autopilot/platforms/common -I/home/thaibahoa2024/PX4-Autopilot/platforms/common/include -I/home/thaibahoa2024/PX4-Autopilot/src -I/home/thaibahoa2024/PX4-Autopilot/src/include -I/home/thaibahoa2024/PX4-Autopilot/src/lib -I/home/thaibahoa2024/PX4-Autopilot/src/lib/matrix -I/home/thaibahoa2024/PX4-Autopilot/src/modules -I/home/thaibahoa2024/PX4-Autopilot/platforms/nuttx/NuttX/nuttx/arch/arm/src/armv7-m -I/home/thaibahoa2024/PX4-Autopilot/platforms/nuttx/NuttX/nuttx/arch/arm/src/chip -I/home/thaibahoa2024/PX4-Autopilot/platforms/nuttx/NuttX/nuttx/arch/arm/src/common -I/home/thaibahoa2024/PX4-Autopilot/platforms/nuttx/NuttX/apps/include -I/home/thaibahoa2024/PX4-Autopilot/build/px4_fmu-v6x_multicopter/external/Install/include -I/home/thaibahoa2024/PX4-Autopilot/src/modules/px4_simulink_app -I/home/thaibahoa2024/PX4-Autopilot/src/modules/mavlink -I/home/thaibahoa2024/PX4-Autopilot/build/px4_fmu-v6x_multicopter/mavlink -I/home/thaibahoa2024/PX4-Autopilot/build/px4_fmu-v6x_multicopter/mavlink/common -I/home/thaibahoa2024/PX4-Autopilot/build/px4_fmu-v6x_multicopter/mavlink/uAvionix -isystem /home/thaibahoa2024/PX4-Autopilot/platforms/nuttx/NuttX/include/cxx -isystem /home/thaibahoa2024/PX4-Autopilot/platforms/nuttx/NuttX/nuttx/include/cxx -isystem /home/thaibahoa2024/PX4-Autopilot/platforms/nuttx/NuttX/nuttx/include -o src/modules/px4_simulink_app/CMakeFiles/modules__px4_simulink_app.dir/MW_ParameterRead.cpp.obj -c ../../src/modules/px4_simulink_app/MW_ParameterRead.cpp with error '\\wsl.localhost\ubuntu-22.04\home\thaibahoa2024\PX4-Autopilot\build\px4_fmu-v6x_multicopter' CMD.EXE was started with the above path as the current directory. UNC paths are not supported. Defaulting to Windows directory. bash: line 1: /opt/gcc-arm-none-eabi-9-2020-q2-update/bin/arm-none-eabi-g++: No such file or directory
採用された回答
その他の回答 (2 件)
Thai Hoa
2025 年 9 月 11 日
2 件のコメント
Umar
2025 年 9 月 11 日
Hi @Thai Hoa,
Thank you for the detailed follow-up! I'm glad to hear that the solution worked for you and that you were able to resolve the issues. Your summary of the steps you took is really helpful and will definitely be valuable for others facing the same challenge.
Wishing you the best with your PX4 development, and feel free to reach out if you encounter any more questions in the future!
裕
2025 年 11 月 5 日
Bro, I had exactly the same problem, and your solution worked perfectly!
Ankur Bose
2025 年 9 月 23 日
1 投票
The reason you faced the compilation issue is that either the expected GCC version (gcc-arm-none-eabi-9-2020-q2) was not installed or installed at some other location and not found at the expected path. You fixed the issue dy downloading and installing the gcc under /opt. We are enhancing the gcc path detection in upcoming releases to auto-detect the gcc for users
2 件のコメント
Thai Hoa
2025 年 9 月 23 日
Ankur Bose
2025 年 9 月 24 日
I would highly recommend using R2024b. The PX4 firmware supported in R2023b is a very old one and different from the one in R2024b. I would suggest you to run HITL using R2024b. If you are facing issues with R2024b, please reach out to MathWorks Technical support and we will look into your question
カテゴリ
ヘルプ センター および File Exchange で Deployment, Integration, and Supported Hardware についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!