aboutsummaryrefslogtreecommitdiffstats
path: root/src/doc/qtautomotivesuite/src/qtautomotivesuite-tutorial-deploying.qdoc
blob: 8fe6fca4a7c48af43f3c2d06f28615b985c73c2e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
/****************************************************************************
**
** Copyright (C) 2018 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Automotive Suite.
**
** $QT_BEGIN_LICENSE:FDL-QTAS$
** Commercial License Usage
** Licensees holding valid commercial Qt Automotive Suite 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.
**
** GNU Free Documentation License Usage
** Alternatively, this file may be used under the terms of the GNU Free
** Documentation License version 1.3 as published by the Free Software
** 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.
** $QT_END_LICENSE$
**
****************************************************************************/
/*!
    \page qtautomotive-tutorial-deploying.html
    \title Tutorial: Deploying Your First Project with Qt Automotive Suite
    \previouspage qtas-install.html
    \nextpage qtautomotive-byos.html

    You can deploy all kinds of Qt projects to your target device:
    projects that you have created yourself and \l{Qt Examples}.
    In this tutorial, we use Qt Creator's project wizard and create a
    new \l{Qt Quick} project. We build the project, deploy it to a
    target device, and run the project.

    This tutorial guides how you deploy a project to one of the reference target
    devices with pre-built images
    (see \l{Supported Target Devices and Development Hosts}). However,
    you should follow similar steps when you deploy to a target device where you
    have built an image yourself.

    The tutorial assumes that you have installed the \QAS to your host platform
    and flashed it to your target device. That is, the \e{\QAS Neptune 3 UI}
    appears on the device screen when you power on the device.

    \note In Linux, ensure that you have access to plugged in devices.
    For more information, see \l{Setting Up USB Access to Embedded Devices}.

    \section1 Preparation of Qt Kit

    Qt Creator groups build and run specific settings as kits. Each kit consists
    of a set of values that define one environment, such as a target device,
    compilers, Qt version, and debugger command to use.

    Before deploying, make sure that your kit contains the target device.
    Connect your target device to the host platform, open Qt Creator, and execute
    the following steps:
    \list 1
        \li Select \b{Tools > Options > Build & Run > Kits}.
        \li Select one of the predefined kits starting with \e{Automotive...}
        that matches the type of your device (1).
        \li Select the appropriate device in the \b{Device} field (2).
        \li Select \b{OK}.
    \endlist

    \image qtas-device-in-kit.png

    \section2 Troubleshooting: Device Is Not Found

    When your target device is connected to the host platform, Qt Creator
    should automatically detect it and the device should appear in the kit's
    \uicontrol{Device} field. If it does not appear, you can try if replugging
    the device or rebooting the host platform helps.

    \section1 Creating New Qt Quick Project

    Create a new Qt Quick project with the steps in \l{Creating Qt Quick Applications}.
    When creating the project, you can use the default values defined in the
    wizard pages. In the \uicontrol{Kit Selection} page, select the \QAS kit
    that matches the type of your target device. The following picture illustrates
    how to select the kit where the device was added in \l{Preparation of Qt Kit}:

    \image qtas-select-kit.png

    After you complete the steps in the project wizard, the generated Qt Quick
    project is automatically opened in the \uicontrol{Edit} mode (1).

    \image qtas-edit-mode-pro-file

    You can see the project's structure by selecting \uicontrol{Projects}
    in the sidebar (2). If you select the \e{.pro} file (3) under your project,
    you see its content in the editor view. The last lines in the .pro file (4)
    define the path where your project is deployed. Qt's project wizard
    generates the path automatically for Qt Quick projects. For other projects,
    you need to define the path manually in the project file. For more
    information, see \l{Deploying Qt Projects with Boot to Qt}.

    \section1 Building, Running, and Deploying Project

    Now it is time to build and run your project, and deploy it to the target
    device. When you run the project, Qt Creator automatically both builds it and
    deploys it to the device. Thus, you just need to select the \uicontrol{Run}
    button (1) in Qt Creator.

    \image qtas-run-button

    Your project should now be running on the target device.
*/