Ardupilot Flight Control Source reading environment building based on Eclipse IDE
Awesome
Date: 2017-10-21
software tools to be prepared
1, Ardupilot fly Control Source Download
Download link https://github.com/ArduPilot/ardupilot, download instructions such as:
2. PX4 toolchain tool Download and installation
Download link http://firmware.ardupilot.org/Tools/PX4-tools/pixhawk_toolchain_installer_latest.exe.
Install the software can be installed in the system disk directory, you can also choose to install in other disk directory. The PX4 tool chain includes Python,python directives that run under Windows to configure environment variables. Specific steps:
Find the path in the system variable and add the path after the value of the variable: C:\pixhawk_toolchain\Python27 (depending on the installation location of the tool chain, note that the data path name does not miss the preceding semicolon "; ")。 The path to adding a Python tool is chosen because two of the code in the flight control needs its support, such as the generation of Mavlink custom message code.
Run the terminal of the Windows system, enter Python, return, and enter the Python terminal program at this point.
3, Java download and installation configuration
Download link http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html, Choose to download the JDK for the 32-bit operating system. The paper is based on Jdk-8u151-windows-i586.exe.
Installed and can be installed by default.
After the installation is complete, enter the Windows system terminal, enter Java-version, and run the carriage return. If installed successfully, the terminal outputs the Java version information.
Configure the environment variable to create a new system variable in the system variable Java_home (the Eclipse IDE looks for the Java development environment based on that path instead of the name). And the new%java_home%\bin;%java_home%\jre\bin is added to the path variable ; Note the semicolon must be entered correctly.
- Terminal input javac-version, if configured correctly, the terminal will output display the Java compiler version number.
Establish Ardupilot Project code editing Environment
In the Start menu, enter PX4 Eclipse, select and run
Open eclipse successfully, select file->new->make project with Existing code, fill in the project name, the code exists path, and select the Compilation tool.
- Select Insert spaces for tabs, Text Editors, Editors, window, Preferences, Windows , menu bar
Select Windows, Preferences, C + +, Code Style, Formatter , in the menu bar
After configuring the environment as described above, you can use the Eclipse IDE to read the Ardupilot flight Control source code happily. please see http://ardupilot.org/dev/docs/editing-the-code-with-eclipse.html for details .
Eclipse common shortcut keys to http://www.cnblogs.com/mq0036/p/4995390.html
Ardupilot Flight Control Source reading environment building based on Eclipse IDE