当前位置:网站首页>RK1126编译gdb 板子上gdb调试程序
RK1126编译gdb 板子上gdb调试程序
2022-08-04 12:43:00 【QMCY_jason】
嵌入式板子上都没有gdb程序 需要自己下载编译
首先去下载一个gdb 高版本的需要c++11支持,rk1126虽然说支持c++11 但是支持的并不是很好
刚开始下了个9.2的版本 编译的时候就是说找不到C++11的支持 ,后来又下了个7.11的版本如下图

下载压缩包解压之后 必须得新建一个build目录 然后再build目录里面编写一个脚本
build.sh 内容如下:

执行这个脚本之后会生成一个makefile
中间会报很多命令没有 如下 这个没有关系 嵌入式的很多东西都没有

然后make 下
会报好几个错误

1. ps_get_thread_area 重定义
打开对应文件 注释掉就可以 
之后是 有个结构体未定义

引入对应的头文件gregset.h即可

接下来还有个错误

同理还是注释掉

之后编译没报错了
make install 提示出错

安装textinfo
sudo apt install texinfo
之后 就make install成功了

将gdb拷到板子上加上权限 运行即可
然后程序挂掉就可以调用bt查看堆栈了

边栏推荐
猜你喜欢

Why is Luo Zhenyu's A-share dream so difficult to fulfill?

划重点!2022面试必刷461道大厂架构面试真题汇总+面经+简历模板

来 TDengine 开发者大会,洞悉数据技术发展的未来趋势

持续交付(四)Jenkins多线程任务执行

Small program on how to play in the construction of e-government service platform value

Programmer Qixi Gift - How to quickly build an exclusive chat room for your girlfriend in 30 minutes

基于双层共识控制的直流微电网优化调度(Matlab代码实现)

手搓一个“七夕限定”,用3D Engine 5分钟实现烟花绽放效果

03 多线程与高并发 - ReentrantLock 源码解析

跨链桥已成行业最大安全隐患 为什么和怎么办
随机推荐
du命令_set命令选项
SSRF-服务器端请求伪造-相关知识
如何治理资源浪费?百度云原生成本优化最佳实践
sqlserver删除重复数据
Diffusion Models:生成扩散模型
两年独立开发经验程序员告诉我们赚钱的经验(听听真正赚到钱的高手做法)
Focus!2022 interview must brush 461 interview questions summary + interview + resume template
Yolov5 测试和训练自己的数据集
Do you understand the various configurations in the project?
A comprehensive understanding of MOS tubes, an article is enough
"Lonely Walking on the Moon" is a powerful medicine, it can't cure the internal friction of happy twist
拥有一台服务器,程序猿装X的开始
String is a reference type
密码设置有关方法:不能相同字母,不能为连续字符
Chinese valentine's day of young people crazy to make money, earn 140000 a week
动规(16)-并查集基础题——格子游戏
使用COLMAP初步三维重建
WPF---Grid布局讲解
Control CD-ROM with VbScript
ShanDong Multi-University Training #4 A、B、C、G