Develop Algorithms and Deploy on PX4 Autopilot
Develop algorithms and prepare model for deploying on PX4 Autopilots. These topics provide additional information about model configuration parameters, setting COM ports, and deploying PX4 Autopilots from Simulink®.
Blocks
Functions
getMATFilesFromPixhawk | Retrieve MAT files from SD card inserted on Pixhawk hardware board |
px4MATFilestitcher | Combine multiple MAT-files retrieved from SD card into a single MAT-file |
createPX4uORBMessage | Create custom uORB topic for logging in a Simulink model (Since R2023b) |
createCustomPX4Parameter | Create custom PX4 parameter for writing to the PX4 system parameter (Since R2025a) |
Topics
Setup Simulink Model
- Model Configuration Parameters for PX4 Flight Controller
Parameter and configuration options for creating and running applications on PX4® flight controller - Set COM Port for Upload and Communication in Simulink
Set COM port for Upload and Communication in Simulink models. - Deployment on Cube Orange Autopilot from Simulink
Deploy Simulink generated code to Cube Orange Autopilot. - Deployment on Cube Blue H7 Autopilot from Simulink
Deploy Simulink generated code to Cube Blue H7 Autopilot. - Deployment on Unsupported PX4 Autopilots from Simulink
Deploy Simulink generated code to unsupported PX4 Autopilot.
PX4 Autopilot Peripheral Information
- Index Numbers for Analog Channels on Pixhawk Series Controller Boards
Identify the index numbers for signals from analog channels. - Serial Port Names and Corresponding Labels on PX4 Flight Controller Boards
Identify the UART/USART port number for the labels seen on PX4 flight controller boards. - I2C Bus Port Numbers for Labels on PX4 Autopilots
Identify the bus port number for the labels seen on PX4 flight controller boards
MAVLink Communication with PX4 Autopilots
- Connecting to NSH Terminal for Debugging
Connect to the NSH terminal of Pixhawk® Series controller for debugging.
Additional Information
- Migrating from Pixhawk Pilot Support Package to UAV Toolbox Support Package for PX4 Autopilots
Migrate from existing Pixhawk Pilot Support Package to the new UAV Toolbox Support Package for PX4 Autopilots. - Getting Started with uORB Blocks for PX4 Autopilots Support Package
Read and write uORB messages using PX4 uORB Read and PX4 uORB Write blocks. - Connecting to NSH Terminal for Debugging
Debug PX4 autopilot using NSH terminal.
Troubleshooting
Troubleshooting Deploy to Hardware Issues
Solve the problems when you try to deploy the Simulink model to Pixhawk Series flight controllers.
Troubleshooting PX4 Firmware Build Failure Due to Flash Memory Overflow on the Hardware
Solve the flash memory overflow on the hardware issues while using the default px4 board build target file.
Troubleshooting Running Out of File Descriptor Issues
Solve the running out of file descriptor issues.
Troubleshooting USB Issues with Cube Orange on Windows
Solve the USB issues with Cube Orange.









