imx6ull远程调试笔记

本文介绍了如何使用VSCode进行C/C++远程调试。首先安装必要的插件,然后配置launch.json文件,包括设置调试器路径、目标地址和端口。开发板通过SSH开启gdbserver后,即可实现远程调试。
摘要由CSDN通过智能技术生成

首先,使用vscode

下载C/C++、remote SSH等插件

然后编写代码如图所示,

然后创建launch.jason如图所示:

{

// Use IntelliSense to learn about possible attributes.

// Hover to view descriptions of existing attributes.

// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387

"version": "0.2.0",

"configurations": [

{

"name": "(gdb) 启动",

"type": "cppdbg",

"request": "launch",

"program": "/${fileDirname}/${fileBasenameNoExtension}",

"args": [],

"stopAtEntry": false,

"cwd": "${fileDirname}",

"miDebuggerPath": "/home/myzr/my-work/toolchain/fsl-imx-xwaylan-x86_64-myimx6a7-4.9.88/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-gdb",

"miDebuggerServerAddress": "192.168.173.81:7777",

"environment": [],

"externalConsole": false,

"MIMode": "gdb",

"setupCommands": [

{

"description": "为 gdb 启用整齐打印",

"text": "-enable-pretty-printing",

"ignoreFailures": true

},

{

"description": "将反汇编风格设置为 Intel",

"text": "-gdb-set disassembly-flavor intel",

"ignoreFailures": true

}

]

}

]

}

应该就可以远程调试linux了。

开发板打开ssh链接后,输入gdbserver 192.168.137.9:7777 ./test应该可以连上了

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值