Since the project needs to do two development of PX4 based on Simulink, it is done under Windows, so you need to view the PX4 code under Windows, so write this document to record the environment installation and configuration process.
Follow the page to install the toolchain: Windows installation instructions.
After installation, use Eclipse in the toolchain to view the code, because it's just looking at the code under Windows, and firmware development is done under Ubuntu, so just install the toolchain and don't install the driver.
The author's system is WIN10 64-bit, but after installing the toolchain, it is found that installing Eclipse Open will report the Java Run Environment error.
After several tossing and turning, it is found that the JAVA8 32-bit JDK and JRE must be installed to open eclipse normally.
PX4 's official tutorial does not give an eclipse-based development and configuration step, the author found that the official development documentation of APM can be successfully configured with Eclipse, the following steps:
- Change the Eclipse.cproject and Eclipse.project in firmware firmware to. Cproject and. Project respectively.
Note that you need to add a point to the full file name after the change, i.e.:eclipse.cproject->.cproject.; Eclipse.project->.project. The system automatically removes the last point when it is saved.
- Import Project
Find PX4 toolchain->px4 Eclipse in the Start menu, then open Eclipse, select File->import->general->existing Projects into from the menu Workspace
Then select Select Root directory and navigate to the firmware directory, then finish, as shown in:
View Code
- The Px4-firmware project appears in the Eclipse Project, and you can use Eclipse to view the code.
[Pixhawk note]11-windows under PX4 code view