Contenuto principale

Manually Set COM Port for Uploading and Communication

In most of the Pixhawk® boards, the COM port required to upload the firmware (bootloader COM port) and the COM port required to establish the connection with computer over MAVLink (Communications COM Port) are the same. You can use the same port to upload the firmware and communicate with the Pixhawk board after the firmware is uploaded. In such cases, you can use the Automatically determine serial port for firmware upload option in Simulink® Model settings to detect the COM port.

Set Bootloader COM Port for Firmware Upload and Deployment

  1. For the Simulink model, launch the Model Settings.

    A sample image of the default settings for hardware implementation is shown here.

  2. Clear the Automatically determine serial port for firmware upload option and enter the bootloader serial port in Serial Port for firmware upload.

    This should be the bootloader port.

  3. Deploy the Simulink model. On the Hardware tab, in the Mode section, select Run on board and then click Build, Deploy & Start.

  4. After the build completes, you will be prompted to reconnect your hardware in order to flash the generated executable. A pop-up window will be displayed with instructions.

Set Communication COM Port for Monitor & Tune (External Mode)

  1. Perform the settings for Build options as shown in the topic Set Bootloader COM Port for Firmware Upload and Deployment.

  2. In External mode tab, clear the Use the same host serial port for External Mode as used for firmware upload option and specify the main communications port in Host Serial Port. This must be different from the bootloader port you mentioned earlier in Build options.

  3. Run External Mode for the model.

Set Communication COM Port for Connected IO

  1. Perform the settings for Build options as shown in the topic Set Bootloader COM Port for Firmware Upload and Deployment.

  2. In Connected I/O tab, clear the Use the same host serial port for Connected I/O as used for firmware upload option and mention the main communications port in Host Serial Port (this must be different than the bootloader port you mentioned earlier in Build options).

See Also