Connecting Embedded Linux Devices
You can connect embedded Linux devices to the development PC to build, run, debug, and analyze applications on them from Qt Creator.
If you have a tool chain for building applications for embedded Linux devices installed on the development PC, you can add it to Qt Creator. You can then select a kit with Embedded Linux device type to build and run applications on embedded Linux devices.
To be able to run and debug applications on embedded Linux devices, you must add devices and select them in the Qt Creator kit.
You use a wizard to create the connections. You can edit the settings later in Tools > Options > Devices.
You can protect the connections between Qt Creator and a device by using either a password or an SSH key. If you do not have an SSH key, you can create it in Qt Creator. For more information, see Generating SSH Keys.
To configure connections between Qt Creator and an embedded Linux device and to specify build and run settings for the device:
- Make sure that your device can be reached via an IP address.
- Select Tools > Options > Build & Run > Qt Versions > Add to add the Qt version for the embedded Linux.
- Select Tools > Options > Build & Run > Compilers > Add to add the compiler for building the applications.
- To deploy applications and run them remotely on devices, specify parameters for accessing the devices:
- Select Tools > Options > Devices > Add > Generic Linux Device > Start Wizard.
- In the The name to identify this configuration field, enter a name for the connection.
- In the The device's host name or IP address field, enter the host name or IP address of the device. This value will be available in the variable
%{Device:HostAddress}
. - In the The username to log into the device field, enter the username to log into the device and run the application as. This value will be available in the variable
%{Device:UserName}
. - In the The authentication type field, select whether to use Password or Key authentication, and enter the user's password or the file that contains the user's private key. The latter will be available in the variable
%{Device:PrivateKeyFile}
. - Click Next to create the connection.
All of these parameters can be edited later, as well as additional ones that the wizard does not show because there are sensible default values. One of these is the SSH port number, which is available in the variable
%{Device:SshPort}
. - Select Tools > Options > Build & Run > Kits > Add to add a kit for building for the device. Select the Qt version, compiler, and device that you added above, and choose Generic Linux Device for the device type.
- To specify build settings:
- Open a project for an application you want to develop for the device.
- Select Projects > Build & Run to enable the kit that you specified above.
- Select Run to specify run settings. Usually, you can use the default settings.
When you run the project, Qt Creator deploys the application as specified by the deploy steps. By default, Qt Creator copies the application files to the device. For more information, see Deploying Applications to Embedded Linux Devices.
Generating SSH Keys
If you do not have an SSH public and private key pair, you can generate it in Qt Creator. The connection wizard can create the key pair for you, or you can create it separately.
You can specify key length and the key algorithm, RSA or DSA. If you only use the keys to protect connections to the emulator or device, you can use the default values.
- Select Tools > Options > Devices > Create New.
- In the Private key file field, select the location to save the private key.
The Public key file field displays the location to save the corresponding public key.
- Select Generate And Save Key Pair to generate and save the keys at the specified locations.
Managing Device Processes
You can view processes running on devices and kill them. Select Tools > Options > Devices > Remote Processes.
You can filter the processes by name in the List of Processes dialog.
To update the process list, select Update List.
To kill a process, select it in the list, and then select Kill Process.
© 2016 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.