当前位置: 首页 > news >正文

工作笔记20240927——vscode + jlink调试

launch.json的配置,可以用的

    {"name": "Debug","type": "cppdbg","request": "launch","miDebuggerPath": "./arm-gnu-toolchain-12.2.rel1-x86_64-arm-none-eabi/bin/arm-none-eabi-gdb","miDebuggerArgs": "-ex 'tar ext:2331' -ex 'load ${workspaceFolder}/Debug/r52_camsys.elf'","program": "${workspaceFolder}/Debug/r52_camsys.elf","cwd": "${workspaceFolder}","externalConsole": true,"MIMode": "gdb","preLaunchTask": "Start GDB Server"},

tasks.json的配置,可以用
{
“version”: “2.0.0”,
“tasks”: [
{
“label”: “Start GDB Server”,
“type”: “shell”,
“command”: “/opt/SEGGER/JLink/JLinkGDBServerCLExe”,
“args”: [
“-if”,
“jtag”,
“-device”,
“Cortex-R52”,
“-endian”,
“little”,
“-speed”,
“4000”,
“-port”,
“2331”,
“-swoport”,
“2332”,
“-telnetport”,
“2333”,
“-vd”,
“-ir”,
“-localhostonly”,
“1”,
“-singlerun”,
“-strict”,
“-timeout”,
“0”,
“-nogui”
],
“isBackground”: true,
“presentation”: {
“reveal”: “always”,
“panel”: “shared”
},
“problemMatcher”: []
}
]
}

launch.json不能用配置
{
“name”: “JLink - r52_camsys”,
“type”: “cortex-debug”,
“request”: “launch”,
“servertype”: “jlink”,
“device”: “Cortex-R52”, // 替换为你的确切设备型号
“interface”: “jtag”, // 或者 “swd”,取决于你的硬件连接
“executable”: “${workspaceFolder}/Debug/r52_camsys.elf”, // 替换为你的 elf 文件路径
“serverpath”: “/opt/SEGGER/JLink/JLinkGDBServerCLExe”,
“serverArgs”: [
“-vd”,
“-ir”,
“-singlerun”,
“-strict”,
“-nogui”
],
“port”: 2331, // 与脚本中 -port 参数一致
“swoport”: 2332, // 与脚本中 -swoport 参数一致
“telnetport”: 2333, // 与脚本中 -telnetport 参数一致
“runToMain”: true,
“setupCommands”: [
{
“text”: “target extended-remote :2331”
},
{
“text”: “monitor swoport 2332”
},
{
“text”: “monitor telnetport 2333”
},
{
“text”: “load”
},
{
“text”: “monitor reset”
},
{
“text”: “c”
}
]
}

脚本

/opt/SEGGER/JLink/JLinkGDBServerCLExe -if jtag -device Cortex-R52 -endian little -speed auto -port 2331 -swoport 2332 -telnetport 2333 -vd -ir -localhostonly 1 -singlerun -strict -timeout 0 -nogui
http://www.lryc.cn/news/447547.html

相关文章:

  • Python | Leetcode Python题解之第433题最小基因变化
  • opengauss使用遇到的问题,随时更新
  • 从环境部署到开发实战:消息队列 RocketMQ
  • 【机器学习(九)】分类和回归任务-多层感知机(Multilayer Perceptron,MLP)算法-Sentosa_DSML社区版
  • 渗透测试-文件上传绕过思路
  • 等保测评中的密码学应用分析
  • LCR 007. 三数之和
  • 【入门01】arcgis api 4.x 创建地图、添加图层、添加指北针、比例尺、图例、卷帘、图层控制、家控件(附完整源码)
  • STL迭代器标签
  • 容器学习之SparseArray源码解析
  • 信创改造技术介绍
  • 【可见的点——欧拉函数】
  • Maven重点学习笔记(包入门 2万字)
  • 1.分页查询(后端)—— Vue3 + SpringCloud 5 + MyBatisPlus + MySQL 项目系列(基于 Zulu 11)
  • 机器学习与深度学习的区别:深入理解与应用场景
  • C++学习笔记(45)
  • 【2】图像视频的加载和显示
  • 1. BOOT.BIN 2. 固化 3. 启动 4. SDK 5. 文件
  • vue按钮接收键盘回车事件
  • 腾讯云点播及声音上传
  • 如何查看服务器是否有raid阵列卡以及raid类型
  • 工博会动态 | 来8.1馆 看桥田如何玩转全场
  • 新版torch_geometric不存在uniform、maybe_num_nodes函数问题(Prune4ED论文报错解决)
  • 实现简易 vuedraggable 的拖拽排序功能
  • 第L2周:机器学习|线性回归模型 LinearRegression:2. 多元线性回归模型
  • JavaScript的条件语句
  • vue3 vite模式配置测试,开发、生产环境以及代理配置
  • 【rabbitmq-server】安装使用介绍
  • Kafka系列之:安装部署CMAK,CMAK管理大型Kafka集群参数调优
  • c语言200例 64