1、QT5.15.2的安装

1.1、安装包下载



1.2、运行安装程序


在安装包所在目录打开 terminal,为安装包添加可执行权限:

chmod +x qt-unified-linux-x64-online.run

运行安装程序:

./qt-unified-linux-x64-online.run



如下:






如果有账户,填写然后点击“下一步”


如果没有账户,点击“注册”申请




勾选“我已阅读并通用使用开源Qt的条款和条件”


公司用户请补充公司名称


个人用户勾选“我是个人用户,我不为任何公司使用Qt”


点击“下一步”







点击“下一步”






选择是否加入用户提升计划


点击“下一步”





指定 Qt 安装目录


选择“自定义安装/Custom installtaion”


点击“下一步”





选择需要的Qt版本和组件(这里以Qt 5.15.2举例)


点击“下一步”






同意License协议


点击“下一步”







点击“安装”






等待安装完成







安装完成


2、环境搭建


这里以i.MX 8M PLUS BSP-Yocto-NXP-i.MX8MP-PD22.1.0/举例

2.1、SDK安装


执行.sh文件

phytec@ubuntu-phytec:~$ sudo ./phytec-ampliphy-vendor-xwayland-glibc-x86_64-phytec-qt5demo-image-cortexa53-crypto-toolchain-BSP-Yocto-NXP-i.MX8MP-PD22.1.0.sh 
[sudo] phytec 的密码: 
ampliPHY Vendor xwayland (Phytec Vendor Distribution) SDK installer version BSP-Yocto-NXP-i.MX8MP-PD22.1.0
==========================================================================================================
Enter target directory for SDK (default: /opt/ampliphy-vendor-xwayland/BSP-Yocto-NXP-i.MX8MP-PD22.1.0): 
You are about to install the SDK to "/opt/ampliphy-vendor-xwayland/BSP-Yocto-NXP-i.MX8MP-PD22.1.0". Proceed [Y/n]? y
Extracting SDK.....................................................................................................................................................................................................................................................................................................................................................................................................................................................................................done
Setting it up...done
SDK has been successfully set up and is ready to be used.
Each time you wish to use the SDK in a new shell session, you need to source the environment setup script e.g.
 $ . /opt/ampliphy-vendor-xwayland/BSP-Yocto-NXP-i.MX8MP-PD22.1.0/environment-setup-cortexa53-crypto-phytec-linux


初始化环境

phytec@ubuntu-phytec:~$ . /opt/ampliphy-vendor-xwayland/BSP-Yocto-NXP-i.MX8MP-PD22.1.0/environment-setup-cortexa53-crypto-phytec-linux


完成后目录如下

phytec@ubuntu-phytec:/opt/ampliphy-vendor-xwayland/BSP-Yocto-NXP-i.MX8MP-PD22.1.0$ ls
environment-setup-cortexa53-crypto-phytec-linux  sysroots
site-config-cortexa53-crypto-phytec-linux        version-cortexa53-crypto-phytec-linux

2.2、QT环境配置









点击“编辑”→“Preferences”,进入Qt Creator配置界面




添加设备,点击“设备”→“添加”→“Remote Linux Device”,按如下填写,完成设置

标识配置的名称:Arm
设备的域名或IP地址:192.168.3.11
The device's SSH pot number:22
The username to log into the device:root
#公钥部署不填,点击“下一步”→“完成”








规定项目目录,点击“构建和运行”→“概要”→“目录”→“浏览”

目录:/opt/prj_workspace/Qt





添加Qt版本,点击“构建套件(Kit)”→“Qt版本”→“添加”

名称:ARM_QT

路径:/opt/ampliphy-vendor-xwayland/BSP-Yocto-NXP-i.MX8MP-PD22.1.0/sysroots/x86_64-phytecsdk-linux/usr/bin/qmake





添加C编译器,点击“构建套件(Kit)”→“编译器”→“添加”→“GCC”→“C”

名称:ARM_GCC

路径:/opt/ampliphy-vendor-xwayland/BSP-Yocto-NXP-i.MX8MP-PD22.1.0/sysroots/x86_64-phytecsdk-linux/usr/bin/aarch64-phytec-linux/aarch64-phytec-linux-gcc





添加C++编译器,点击“构建套件(Kit)”→“编译器”→“添加”→“GCC”→“C++”

名称:ARM_GCC

路径:/opt/ampliphy-vendor-xwayland/BSP-Yocto-NXP-i.MX8MP-PD22.1.0/sysroots/x86_64-phytecsdk-linux/usr/bin/aarch64-phytec-linux/aarch64-phytec-linux-gcc





添加Debuggers,点击“构建套件(Kit)”→“Debuggers”→“添加”

名称:ARM_GDB

路径:/opt/ampliphy-vendor-xwayland/BSP-Yocto-NXP-i.MX8MP-PD22.1.0/sysroots/x86_64-phytecsdk-linux/usr/bin/aarch64-phytec-linux/aarch64-phytec-linux-gdb

添加构建套件(Kit),点击“构建套件(Kit)”→“添加”,填写以下信息后,点击“应用”→“确定”,完成QT环境搭建

名称:ARM

设备类型:Remote Linux Device

Sysroot:/opt/ampliphy-vendor-xwayland/BSP-Yocto-NXP-i.MX8MP-PD22.1.0/sysroots/cortexa53-crypto-phytec-linux

C&C++编译器:ARM_GCC

调试器:ARM_GDB

Qt版本:ARM_QT

Qt mkspec:linux-oe-g++

CMake Configuration:

-DQT_QMAKE_EXECUTABLE:FILEPATH=%{Qt:qmakeExecutable}

-DCMAKE_PREFIX_PATH:PATH=%{Qt:QT_INSTALL_PREFIX}

-DCMAKE_C_COMPILER:FILEPATH=%{Compiler:Executable:C}

-DCMAKE_CXX_COMPILER:FILEPATH=%{Compiler:Executable:Cxx}


















  • No labels