PIxhawk Pilot Support (PSP) configuration (Linux 16.04 with Matlab 2017b)
1. Download Pixhawk Support Package and install it [1]
(1) Open Matlab(2) Change Matlab file directory to the path of "PX4PSP_v3......"
(3) Click and install
2. Set linux build environment
(1) Install gcc-arm-none-eabi v5.4.wget https://github.com/SolinGuo/arm-none-eabi-bash-on-win10-/raw/master/gcc-arm-none-eabi-5_4-2017q2-20170512-linux.tar.bz2
tar -jxf gcc-arm-none-eabi-5_4-2017q2-20170512-linux.tar.bz2
exportline="export PATH=$HOME/gcc-arm-none-eabi-5_4-2017q2/bin:\$PATH"
if grep -Fxq "$exportline" ~/.bashrc; then echo " GCC path already set."; else echo $exportline >> ~/.bashrc; fi
. ~/.bashrc
(2) Install dependencies
source ubuntu_sim_common_deps.bash
3. Create a empty folder for storing the firmware
ex:4. Build firmware
(1) Run the PixhawkPSP setup UI from MATLABPixhawkPSP('/home/namikilab/PX4_simulink')
(2) Click "Download Firmware"
(3) Select Cmake configuration you prefer [2]
ex: Intel® Aero Ready to Fly Drone: aerofc-v1_default
4. Build
*Method2 for those who still failed...(like [3]):
1. Setting ARM environment [4]
2. Download PX4 toolchain (source ubuntu_combined.sh) [5]
3. Run the PixhawkPSP setup UI from MATLAB
4. Download firmware
5. cd firmware
6. sudo make aerofc-v1_default
Reference:
[1] Pixhawk Support Package
[2] build commands for common boards
[3] https://jp.mathworks.com/matlabcentral/answers/422879-error-building-pixhawk-in-external-mode
[4] Setting the ARM enviroment on Linux - Installing arm-none-eabi-gcc
[5] https://github.com/mathworks/PX4-Setup
留言
張貼留言