QT远程调试配置

GDB  下载地址:http://ftp.gnu.org/gnu/gdb/ 

特别注意,并不是最新的GDB版本就适合你的arm-gcc,如果编译不通过,就需要尝试其他的版本,比如我的arm-gcc 为gcc version 4.2.1 ,我尝试了几个版本,其中gdb-7.8可以完美编译通过。


http://ftp.gnu.org/gnu/gdb/


查看qt说明:Supported GDB Versions

Starting with version 3.1, Qt Creator requires the Python scripting extension. GDB builds without python scripting are not supported anymore and will not work.
The minimum supported version is GDB 7.5 using Python version 2.7, or 3.3, or newer.
For remote debugging using GDB and GDB server, the minimum supported version of GDB server on the target device is 7.0.

  • 本地最低版本要7.5并且带Python的,如果不支持python不能正常调试,而远程调试使用的gdb server版本最少要7.0

  • 由于调试时gdb运行在PC上,gdb server运行在开发板上,调试的程序是作为 gdb server的子程序运行的,gdb对gdb server发调试命令控制被调试程序的运行,所以这里说的gdb的移植包括gdb 在PC平台的编译 和 gdb server移植到ARM板上。

在这里 http://ftp.gnu.org/gnu/gdb/  下载gdb-7.12.1.tar.xz 解压 编译  

./configure --target=arm-linux-gnueabihf --with-python --prefix=/opt/GSRD/Gdb-7.12.1 

sudo make &  make install


编译gdb-server

/GDB/gdb-7.8/gdb/gdbserver$ ./configure --host=arm-none-linux-gnueabi   


make后,出现gdbserver和gdbplay ,将其拷贝到开发板中的 /usr/bin/目录下


Qt配置 远程设备

Select Tools > Options > Devices > Add > Generic Linux Device > Start Wizard.


添加刚刚安装好的gdb

Select Tools > Options > Build & Run > Debuggers > Add

在path中添加 /opt/GSRD/Gdb-7.12.1/bin/arm-linux-gnueabihf-gdb


配置kits

Device中选择添加好的运行设备

Debuggers中选择安装好的调试GDB


一键推送位置

在工程文件中添加如下两条保存:
target.path = /root //程序传送(deploy)到开发板的目录位置。
INSTALLS += target


参考:http://blog.csdn.net/flfihpv259/article/details/51700596

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值