本页内容

构建并烧录动态下载项目

本教程将指导您在 Windows 10 主机上为 Qt 示例应用程序构建 INTEGRITY 项目。您可以选择任何使用受支持 Qt 模块的 Qt 示例应用程序。

准备 Qt 应用程序构建环境

在构建 INTEGRITY 项目之前,您需要准备构建环境。请在 Windows CMD 终端中运行setEnvironment.bat 脚本。有关该脚本的更多信息,请参阅《为 Windows 10 创建批处理脚本》。

setEnvironment.bat

构建 Qt 示例应用程序

要使用 CMake 构建 Qt 6 应用程序,请在 Windows CMD 终端中运行以下命令:

"Qt installation path>\bin\qt-cmake.bat" CMakeLists.txt -GNinja
-DCMAKE_PREFIX_PATH="C:\Users\user\targetbuild"
-DQt6_DIR="C:\Users\user\targetbuild\lib\cmake\Qt6"
-DQt6Core_DIR="C:\Users\user\targetbuild\lib\cmake\Qt6Core"
-DQt6Gui_DIR="C:\Users\user\targetbuild\lib\cmake\Qt6Gui"

 cmake --build .

其中,qt-cmake 是一个封装脚本,它会调用 CMake 并为您的项目配置适当的包含路径。

在 MULTI 中创建动态下载项目

  • 启动 MULTI Launcher,选择“File ” > “Create workspace ”。
  • 在创建窗口模式中选择New Project ,然后点击OK 。
  • 在“Project Wizard ”对话框中,选择要创建新项目的路径,例如C:\Users\user\Documents\My Projects\Project1\default.gpj,然后单击“Next ”。
  • 在“Operating System ”对话框中选择“INTEGRITY”,然后单击“Next ”。

    “创建项目”对话框。

  • 选择“Finish ”。

    Qualcom 板卡创建窗口对话框。

  • 选择“Create New ” > “Dynamic Download ” > “Next ”。
  • 选择“Settings For Dynamic Download ”>“Finish ”。

    项目树形视图。

构建动态下载项目

  • 在项目树中编辑并保存myproject.int文件:
    AddressSpace
      Name qtapp
      Filename C:\path\to\your\qt\app\binary
      MemoryPoolSize 0x2700000
      Language C++
      HeapSize 0x90000
      Task Initial
        StackSize 0x90000
        StartIt false
      EndTask
      Extendedmemorypoolsize 0x300000
    EndAddressSpace
  • 创建一个名为“multi_commands”的新文件,并向其中添加以下命令:
    switch -component "debugger.task.qtapp.Initial"
    route "debugger.task.qtapp.Initial" { __ntwcommand prepare_target }
    wait -load
    switch -component "debugger.task.qtapp.Initial"
    route "debugger.task.qtapp.Initial" { __ntwcommand resume }
    wait -time 240000 -stop
    switch -component "debugger.task.qtapp.Initial"
    unload myproject
    wait -time 8000 -stop
    savedebugpane cmd "autotestresult.txt"
    quitall
  • 在 Windows CMD 终端中运行构建和加载命令:
    multi.exe "C:\Users\user\Documents\My Projects\Project1\default.gpj" -build myproject &
    multi.exe "C:\Users\user\Documents\My Projects\Project1\dbg\bin\myproject" -connect="rtserv2 192.168.1.1" -p C:\Users\user\multi_commands &

    MULTI IDE 二进制加载窗口。

    注意: “rtserv2 192.168.1.1”是开发板的 IP 地址。请参阅“设置布线”部分以配置开发板网络。

    注意: 通过动态下载进行部署需要 几分钟时间。

© 2026 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.