linuxdev.qdoc 5.92 KB
Newer Older
1 2
/****************************************************************************
**
3 4
** Copyright (C) 2016 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
5
**
6
** This file is part of the Qt Creator documentation.
7
**
8 9 10 11 12 13 14
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
15
**
16
** GNU Free Documentation License Usage
17 18
** Alternatively, this file may be used under the terms of the GNU Free
** Documentation License version 1.3 as published by the Free Software
19 20 21 22
** Foundation and appearing in the file included in the packaging of
** this file. Please review the following information to ensure
** the GNU Free Documentation License version 1.3 requirements
** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
23 24 25 26 27
**
****************************************************************************/

    /*!

28
    \contentspage {Qt Creator Manual}
29
    \previouspage creator-developing-baremetal.html
30
    \page creator-developing-generic-linux.html
Leena Miettinen's avatar
Leena Miettinen committed
31
    \nextpage creator-developing-ios.html
32

Leena Miettinen's avatar
Leena Miettinen committed
33
    \title Connecting Embedded Linux Devices
34

35 36
    You can connect embedded Linux devices to the development PC to run,
    debug, and analyze applications built for them from \QC.
37

Leena Miettinen's avatar
Leena Miettinen committed
38
    If you have a tool chain for building applications for embedded Linux
39
    devices installed on the development PC, you can add
40
    it to \QC. You can then select a \l{glossary-buildandrun-kit}{kit}
41
    with \uicontrol {Embedded Linux} device type to
42
    build applications for and run them on embedded Linux devices.
43

Leena Miettinen's avatar
Leena Miettinen committed
44
    To be able to run and debug applications on embedded Linux devices, you must
45
    add devices and select them in the \QC \l{glossary-buildandrun-kit}{kit}.
46 47

    You use a wizard to create the connections. You can edit the settings later
48
    in \uicontrol Tools > \uicontrol Options > \uicontrol Devices.
49

50
    \image qtcreator-linux-device-configurations.png "Devices dialog"
51

52
    You can protect the connections between \QC and a device by using
53
    either a password or an SSH key. If you do not have an SSH key, you can
54
    create it in \QC. For more information, see \l {Generating SSH Keys}.
55

56 57
    To configure connections between \QC and an embedded Linux device and to
    specify build and run settings for the device:
58 59 60

    \list 1

61
        \li Make sure that your device can be reached via an IP address.
62

63
        \li Select \uicontrol {Tools > Options > Build & Run > Qt Versions > Add} to
64
            add the Qt version
Leena Miettinen's avatar
Leena Miettinen committed
65
            for the embedded Linux.
66

67
        \li Select \uicontrol {Tools > Options > Build & Run > Compilers > Add} to
68 69
            add the compiler
            for building the applications.
70

71
        \li To deploy applications and run them remotely on devices, specify
72 73 74 75
            parameters for accessing the devices:

            \list 1

76 77 78
                \li Select \uicontrol Tools > \uicontrol Options > \uicontrol Devices
                    > \uicontrol Add > \uicontrol {Generic Linux Device}
                    > \uicontrol {Start Wizard}.
79 80 81

                    \image qtcreator-screenshot-devconf-linux.png "Connection Data wizard"

82
                \li In the \uicontrol {The name to identify this configuration} field,
83 84
                    enter a name for the connection.

85
                \li In the \uicontrol {The device's host name or IP address} field,
86
                    enter the host name or IP address of the device.
87
                    This value will be available in the variable \c %{Device:HostAddress}.
88

89
                \li In the \uicontrol {The username to log into the device} field,
90
                    enter the username to log into the device and run the
91
                    application as.
92
                    This value will be available in the variable \c %{Device:UserName}.
93

94 95
                \li In the \uicontrol {The authentication type} field, select whether
                    to use \uicontrol Password or \uicontrol Key authentication, and enter
96 97
                    the user's password or the file that contains the user's
                    private key.
98
                    The latter will be available in the variable \c %{Device:PrivateKeyFile}.
99

100
                \li  Click \uicontrol {Next} to create the connection.
101 102 103

            \endlist

104 105
            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
106
            the SSH port number, which is available in the variable \c %{Device:SshPort}.
107 108


109 110 111
        \li Select \uicontrol Tools > \uicontrol Options > \uicontrol {Build & Run}
            > \uicontrol Kits > \uicontrol Add to add a kit for building for the device.
            Select the
112
            Qt version, compiler, and device that you added above, and choose
113
            \uicontrol {Generic Linux Device} for the device type.
114

115
        \li To specify build settings:
116 117 118

        \list 1

119
            \li Open a project for an application you want to develop for the
120 121
                device.

122 123
            \li Select \uicontrol Projects > \uicontrol {Build & Run} to enable
                the kit that you specified above.
124 125 126

        \endlist

127 128
        \li Select \uicontrol Run to specify run settings. Usually, you can use
            the default settings.
129

Leena Miettinen's avatar
Leena Miettinen committed
130 131
    When you run the project, \QC deploys the application as specified by the
    deploy steps. By default, \QC copies the application files to the device.
132
    For more information, see \l{Deploying Applications to Embedded Linux Devices}.
133 134 135

    \endlist

136 137
    \include linux-mobile/linuxdev-keys.qdocinc generating ssh keys
    \include linux-mobile/linuxdev-processes.qdocinc managing device processes
138
*/