PixhawkPSP toolchain in matlab R2017b on linux
3 次查看(过去 30 天)
显示 更早的评论
Hi everyone, I am trying to install the Pilot support package so as to run a project for the Pixhawk flight controller using Simulink.
I first downloaded the mltbx file and installed it then ran the following code to save the necessary setup files.
%code
PixhawkPSP('/home/user/Documents/'px4folder')
After saving the necessary files from the first step, I have installed arm-none-eabi-gcc-5.4, and I've run the bash script to setup other dependencies - python etc. I then followed step 2, by calling
% code
PixhawkPSP('/home/user/Docs/firmware_folder')
I then downloaded the firmware successfully. For Cmake config, I selected px4fmu_v3 because I plan to target pixhawk 1. Now when I click on 'Build firmware', I get an error dialog as follows:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/197952/image.png)
If I ignore and go ahead to build, I get the following error on the matlab prompt.
% code
Found compatible version R2017b
Using Target Package path of /home/tecdee/Documents/px4_firmware_v3
Warning: Applying library path changes to support CMAKE
-- CMAKE_MODULE_PATH: /home/tecdee/Documents/px4_firmware_v3/Firmware/cmake
-- Nuttx build for px4fmu-v3 on m4 hardware, using nsh with ROMFS on px4fmu_common
-- Build Type: MinSizeRel
-- PX4 VERSION: PixhawkPSP_v3.0.3
-- CONFIG: nuttx-px4fmu-v3-default
CMake Error at cmake/toolchains/Toolchain-arm-none-eabi.cmake:29 (message):
could not find arm-none-eabi-gcc compiler
Call Stack (most recent call first):
/usr/share/cmake-3.5/Modules/CMakeDetermineSystem.cmake:98 (include)
CMakeLists.txt:275 (project)
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_ASM_COMPILER not set, after EnableLanguage
-- Configuring incomplete, errors occurred!
/bin/sh: 1: cd: can't cd to /home/tecdee/Documents/px4_firmware_v3/Firmware/build_px4fmu-v3_default
Makefile:164: recipe for target 'px4fmu-v3_default' failed
make: *** [px4fmu-v3_default] Error 2
I have tried several things: I've uninstalled gcc-arm-none-eabi and re-installed, I've changed ownership of the gcc-arm... folder from 'user' to 'root', I've installed 32bit libraries (libgcc1:i386, gcc-5-base:i386, libstdc++5:i386, libstdc++6:i386), all to no avail.
Any suggestions or pointers in the right direction will be greatly appreciated.
UPDATE: I have just realised that Matlab R2017a and R2017b (which the current PSP supports fully), only supports gcc version 4.9, but the installation guide suggests to use gcc 5.4. Or am I mixing things up? someone please help. Thanks.
0 个评论
回答(4 个)
T.A.C.J.M. Albers
2018-10-30
Hi Daniel
Have you tried GCC 7-2017-q4 as is advised by PX4?? Additional information can be found at:
https://dev.px4.io/en/setup/dev_env_linux_ubuntu.html#nuttx-based-hardware
Alexis offermann
2019-3-25
Hello,
I have the same problem,
for me Matlab can't build the model because gcc-arm version is wrong, however it is not missing in the console.
I suppose that it hasn't been linked properly to matlab, so how to do it ?
++
Alexis
0 个评论
Abhishek GS
2019-4-2
The official support package 'Embedded Coder Support Package for PX4 Autopilots' is now available from R2018b onwards.
Uninstall the Pixhawk PSP, if you have it installed and refer the documentation on getting started with the official support package.
The above mentioned issues should be solved.
~Abhishek
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!