// Copyright (C) 2025 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only

/*!
    \page creator-how-to-create-vxworks-kits.html
    \previouspage creator-how-tos.html

    \ingroup creator-how-to-vxworks

    \title Create kits for VxWorks devices

    To develop Qt applications for VxWorks, build \l {Qt for VxWorks} and create
    a VxWorks \l {Kits}{kit}. Currently, you can develop applications with Qt 6.8
    and build them for VxWorks 24.03 devices. You cannot connect the devices to
    \QC yet, so you must deploy the built packages to the devices and run them
    there manually.

    \note Enable the VxWorks plugin to use it.

    To create a kit:

    \list 1
        \li Go to \preferences > \uicontrol Devices > \uicontrol VxWorks.
            \image {qtcreator-preferences-devices-vxworks.webp} {VxWorks tab in Devices preferences}
        \li In \uicontrol {VxWorks installation folder}, select the directory
            where the WindRiver installer installed VxWorks.
        \li Select \uicontrol {Add Kit}.
        \li In \uicontrol {Kit name}, enter a name for the kit.
            \image {qtcreator-create-new-kit-vxworks.webp} {Create New Kit dialog}
        \li In \uicontrol {Qt version}, select the folder that contains qmake for
            the Qt VxWorks build.
        \li In \uicontrol {VBS path}, enter the path to the VxWorks source build
            (VSB) directory.
        \li In \uicontrol {Host name}, enter the host name or IP address of the
            device.
        \li Select \uicontrol OK to create a VxWorks kit.
        \li Go to \uicontrol Projects > \uicontrol {Build & Run} to activate the
            kit for your project.
    \endlist

    \note To deploy the built package, you can add a build step to the deploy
    configuration of the project that copies the built binary of your project to
    a NFS directory shared with the device.

    \sa {Enable and disable plugins}, {Activate kits for a project},
    {Debug C++ applications on VxWorks devices},
    {Remote Linux Deploy Configuration}, {Qt for VxWorks}
*/

/*!
    \page creator-how-to-debug-vxworks.html
    \previouspage creator-how-tos.html

    \ingroup creator-how-to-vxworks
    \ingroup creator-how-to-debug

    \title Debug C++ applications on VxWorks devices

    \note Place all the library dependencies on the SD card. Debugging doesn't
    work from other locations, such as a mounted NFS directory.

    \QC only copies the application binaries and other deployable files to
    the root of the SD card. It doesn't preserve nor create the directory
    structure on the SD card.

    To debug Qt applications, add the following line to your VxWorks source build
    (VSB) configuration:

    \badcode
    vxprj vsb config -s -add "_WRS_CONFIG_TCF_GDB_RSP=y"
    \endcode

    To automatically start the GDB server on the device, add the following lines
    to your VxWorks image project (VIP) configuration:

    \badcode
    "INCLUDE_DEBUG_AGENT"
    "INCLUDE_DEBUG_AGENT_START"
    "INCLUDE_STANDALONE_SYM_TBL"
    \endcode

    For more information, see \l {Qt for VxWorks}.

    To set up debugging:

    \list 1
        \li Activate a VxWorks kit for the project.
        \li Go to \uicontrol Projects > \uicontrol {Run Settings}.
        \li Set \uicontrol Priority and \uicontrol {Stack size}.
            \image {qtcreator-run-settings-vxworks.webp} {Run Settings for VxWorks}
        \li In \uicontrol Environment, set the \c LD_LIBRARY_PATH variable to
            the location of the libraries on the SD card. If the path to the
            SD card is not \c {/sd0a}, set \c VX_SDCARD_PATH to the correct
            location.
    \endlist

    To start debugging, select \key {F5} or go to \uicontrol Debug >
    \uicontrol {Start Debugging} > \uicontrol {Start Debugging of Startup Project}.

    \sa {Activate kits for a project}, {Create kits for VxWorks devices},
    {Debugging}, {Qt for VxWorks}
*/
