Post · 1 min read· pp. 24–25

Installing MAVLink Toolchain

This topic explains how to install the MAVLink toolchain. The toolchain includes the XML message definitions as well as the GUI/command line tools that use the definitions to Generate MAVLink Source Files.

TIP

You do not need to install or generate the source files if you are using the C programming language and standard definitions or a dialect published in the MAVLink repository. Just get the prebuilt libraries and then jump to Using C Libraries.

Prerequisites

The requirements for using the MAVLink generator are:

  • Python 3
  • Python 3 Pip
  • TkInter (required to use the GUI tool), included as of Python 3.7.

If you are creating new XML definitions you should also install lxml and libxml2 for XML validation and formatting.

Installation

To install the MAVLink toolchain:

  1. Install Python 3.10+:

    • Windows: Download from Python for Windows

    • Ubuntu Linux Make sure Python and Pip are both installed:

      text

sudo apt install python3 python3-pip

code
2. Clone the official [mavlink repo](https://github.com/mavlink/mavlink) or your fork with your custom dialect:

   ```text
git clone https://github.com/mavlink/mavlink.git --recursive
cd mavlink
  1. Install the required packages:

    text

python3 -m pip install -r pymavlink/requirements.txt

code

Now you are ready to [Generate MAVLink Libraries](/u/82618280f25a2660).