Windows WSL 工具链
This development environment is not supported. See Toolchain Installation for information about the environments and tools we do support!
设置开发环境的最简单的方法是使用 windows_bash_nuttx.sh 安装脚本 (脚本文件的详细说明见 下文)。
编译针对 NuttX/Pixhawk 平台的固件。
使用 JMAVSim 进行PX4仿真 (需要搭配一个基于Windows的 X-Windows 应用来显示仿真UI界面)。
设置开发环境
固件编译流程(以编译 px4_fmu-v4 的固件为例):
To setup the development environment:
在Windows 10上启用、安装 Bash on Windows。
打开 bash shell 命令行界面。
下载 windows_bash_nuttx.sh 脚本文件:
wget https://raw.githubusercontent.com/PX4/Devguide/master/build_scripts/windows_bash_nuttx.sh
使用如下命令运行安装脚本 (根据需要确认任何提示): sh source windows_bash_nuttx.sh
编译固件
JMAVSim 运行流程:
在 bash shell 命令行界面输入如下指令:
make px4_fmu-v4_default
Add this line to the Ubuntu .bashrc file if you don't want to enter it every session.
在 bash shell 界面中启动 px4 和 jmavsim:
JMAVSim 的UI界面会显示在 XMing 程序中,如下所示:
Gazebo can similarly be run within Ubuntu Bash for Windows, but too slow to be useful. To try this, follow the ROS kinetic install guide and run Gazebo in the Bash shell as shown:
开发环境安装脚本详情
The windows_bash_nuttx.sh build script modifies the Ubuntu build instructions to remove Ubuntu-specific and UI-dependent components, including the Qt Creator IDE and the simulators.
In addition, it uses a 64 bit arm-none-eabi compiler since BashOnWindows doesn't run 32 bit ELF programs (and the default compiler from https://launchpad.net/gcc-arm-embedded
is 32 bit).
To add this compiler to your environment manually:
下载编译器:
Bash On Windows 控制台中使用命令行进行解压:
该命令会将 arm gcc cross-compiler 解压至: ``` gcc-arm-none-eabi-5_4-2017q2/bin ```
将下面这行命令添加到环境中(将该行添加到 bash 配置文件中完成永久性更改)
export PATH=$HOME/gcc-arm-none-eabi-5_4-2017q2/bin:\$PATH
Last updated