
开发平台
芯灵思SinlinxA33开发板
淘宝店铺: https://sinlinx.taobao.com/

嵌入式linux 开发板交流 QQ:641395230
Step 1 在虚拟机(CentOS7)上安装Qt Creator
将qt-creator-opensource-linux-x86_64-3.5.1.run 拷贝到虚拟机中,双击安装,全部点下一步即可。
Step 2 Qt Creater 设置
打开Qt Creator (Applications->Programming->Qt Creator)
1)添加新的设备
点击Tools->Options...->Devices
点Add 添加新设备,配置如下图所示,其中Host name 处填开发板的IP,用户名 root
,密码 sinlinx
(此为开发板linux系统root密码)

2)连接好网线,在串口终端设置开发板ip,开启ssh
# ifconfig eth0 192.168.0.123 netmask 255.255.255.0
# /sinlinx/sshd start
点击test按钮,出现下图,说明开发板与虚拟机成功连接

3)设置编译运行选项
点击Tools->Options...->Build&Run
打开Compilers 选项卡添加编译工具,完成后点Apply 保存。

打开Qt Versions 添加QT 版本,完成后点Apply 保存。

打开Kits 添加配置。如果没有cmake,需要手动安装cmake
yum install cmake

Step 3 编写第一个QT程序
打开Qt Creator,新建一个Qt Widgets Application



1)添加安装路径
打开HelloWorld.pro,在最后添加如下代码:
target.path = /root
INSTALLS += target
2)添加运行参数 -qws
点击Projects->Run

3)点击运行,会在开发板/root目录生成Hello_World的可执行文件,./Hello_World即可运行


网友评论