Using Simulink with Custom or Unlisted ArduPilot Autopilot Hardware Targets
You can use Simulink® with ArduPilot® autopilot boards that are not included as predefined hardware targets. While these custom or unlisted boards may require additional configuration steps, it is possible to deploy and run Simulink-generated code on them by adapting the workflow. The following steps outlines key considerations and steps for integrating Simulink models with custom or unlisted ArduPilot hardware targets.
As an example, this topic uses the CUAV-X7, but the steps can be adapted for other unsupported ArduPilot boards.
Select Custom ArduPilot Autopilot Hardware Setup
To begin, you need to select the appropriate ArduPilot autopilot board and its configuration. This step ensures that the firmware and code generation settings are customized specifically for your hardware.
If the support package is already installed, start the hardware setup by opening the Add-On Manager.

In the Add-On Manager, start the hardware setup process by clicking Setup button,
.After starting, the Hardware Setup window provides instructions for configuring the support package to work with your hardware.
In the Select an ArduPilot Board screen,
Select
ArduPilot Generic Boardfrom the Autopilot name drop-down list.Select
CUAV-X7from the Board drop-down list.

Click Next to continue.
Verify the correct make command to build the firmware for CUAV-X7 and then click Build Firmware.

In the Test Connection hardware setup screen, specify the Upload port in
<Enter Upload Port>text box manually and click Upload Firmware button, to upload the ArduPilot firmware.To identify the Upload port and Communication port check the Device Manager, The bootloader port appears first in the Device Manager. The port shows for a few seconds and then the main communications port appears. The bootloader COM port is needed for firmware upload and the communication port is needed for MAVLink communication or Monitor and Tune simulation. For information on identifying and selecting the correct port, see Understanding COM Ports on ArduPilot Boards.

Specify the communication port and click Get Accelerometer Data to confirm that the hardware is ready for use with Simulink.

Set COM Port for Upload and Communication in Simulink
When working with ArduPilot firmware and Simulink models, it is important to correctly configure the COM ports for both firmware upload and MAVLink communication. This is especially relevant for hardware such as the CUAV-X7, where the bootloader and main firmware operate on different COM ports.
For information on identifying and selecting the correct port, see Understanding COM Ports on ArduPilot Boards.
Select ArduPilot Generic Board as the Simulink Target Hardware
Once the hardware setup is complete and ArduPilot Firmware is built for your target, you can use your CUAV-X7 in Simulink by
selecting ArduPilot Generic Board as the Hardware
board in the Simulink model configuration settings.

The selected hardware board in hardware setup automatically appears in board configuration.

Configure Bootloader COM Port for Firmware Upload and Deployment
After selecting your autopilot board and configuration, specify the correct COM port for the bootloader. This port is used for firmware upload.
In the Configuration Parameters dialog of your Simulink model, navigate to the Hardware Implementation > Target hardware resources > Build options.

Specify the COM port for Serial port for firmware upload option.
This must be the serial port that appears when your autopilot board is in bootloader mode.
Deploy the Simulink model.
From the Hardware tab, in the Mode section, select Run on board and then click Build, Deploy & Start.
Configure COM Port for Parameter Tuning and Signal Monitoring
After selecting your ArduPilot board and corresponding configuration as shown in the previous steps, you need to set up the communication COM port for Monitor & Tune (External Mode). This step ensures that your host computer can communicate with the flight controller for real-time parameter tuning and data monitoring.
In the External mode tab, specify the main communications port in Host Serial Port. This must be different from the bootloader port you specified earlier in Build options.

Run the model in External Mode to begin parameter tuning and signal monitoring.