0
点赞
收藏
分享

微信扫一扫

嵌入式上机020

飞空之羽 2022-03-31 阅读 69
linux

1.安装编译器

sudo 

2。1804.04版本下

回车继续

 

 3.vim 编辑 hello.c

a.安装vim 命令输入 sudo apt-get install vim-gtk

b.编辑hello.c

 

c.编译指令

 d.查看运行结果

./hello

4.使用gbd调试函数调用 

a.编写一个含有函数调用的test.c

b.编译生成可执行文件

 c.启动GDB

d.在main函数设置断点

list

break 5 设置断点

 print

  e gcc过程改为 makefile 管理

sudo makefile hao

f.使用tftp远程调试

将hello.c和makefile复制到tftp文件下




参考

https://suliudrose.gitee.io/

文章作者: suliu

 文章链接: http://example.com/2022/03/29/chu-xue-qian-ru-shi-zhi-linux-xia-de-c-bian-cheng-diao-shi/

原文链接:https://blog.csdn.net/ii231/article/details/109320778

原文链接:https://blog.csdn.net/weixin_47088212/article/details/123853959

举报

相关推荐

0 条评论