Follow the instructions in UAV Toolbox support package for PX4 Autopilots to find the latest documentation on the PX4 integration with MATLAB & Simulink
Toolchain setup of Embedded Coder support package for PX4 Autopilots
Using Embedded Coder support package for PX4 Autopilots, you can generate ANSI/ISO C++ from Simulink® models specifically tailored for the Pixhawk FMU (flight management unit) using the PX4 Toolchain. You can customize algorithms that leverage onboard sensor data and other calculations at runtime.
PX4 toolchain setup includes the installation of different third-party utilities like GCC 7.2.1, CMake 3.x, Ninja 1.6, Git, RTPS and certain Python packages, which are required for building the PX4 Firmware.
The shell scripts are modified versions of the PX4 Devguide, to suit the Embedded Coder support package for PX4 Autopilots.