时间:2021-07-01 10:21:17 帮助过:15人阅读
原来的项目使用lpcx某款IC自家的IDE,而公司老一辈子工程师自由他自己一套开发环境;而对于我这种新人来说,只能重新建立一套符合
自己的开发环境。
之前一直在vscode上看代码,编辑代码; 但很少调试,才发现把这强大的功能给浪费掉了。
{
// 使用 IntelliSense 了解相关属性。
// 悬停以查看现有属性的描述。
// 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "(gdb) Debug with Jlink",
"type": "cppdbg",
"request": "launch",
"targetArchitecture": "arm",//虽然官方说弃用了,但实际上必须指明
"program": "${workspaceFolder}/STM32F429IGT/a.exe",
"args": [],
"stopAtEntry": false,
"cwd": "${workspaceFolder}/STM32F429IGT",
"environment": [],
"externalConsole": true,
"preLaunchTask": "Build",
"MIMode": "gdb",
"miDebuggerPath": "arm-none-eabi-gdb.exe",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
],
"miDebuggerServerAddress": "localhost:2331",
"customLaunchSetupCommands": [
{
"text": "target remote :2331",
"description": "connect to server",
"ignoreFailures": false
},
{
"text": "file E:/Git/STM32/STM32F429/STM32F429IGT/build/STM32F429IGT.elf",
"description": "load file to gdb",
"ignoreFailures": false
},
{
"text": "load",
"description": "download file to MCU",
"ignoreFailures": false
},
{
"text": "monitor reset",
"description": "reset MCU",
"ignoreFailures": false
},
{
"text": "b main",
"description": "set breakpoints at main",
"ignoreFailures": false
},
]
}
]
}
echo off
cd %ProgramFiles(x86)%/SEGGER/JLink_V512f
tasklist /fi "Imagename eq JLinkGDBServer.exe"|find "JLinkGDBServer.exe"&&taskkill /f /im "JLinkGDBServer.exe"
tasklist /fi "Imagename eq JLinkGDBServer.exe"|find "JLinkGDBServer.exe"&&taskkill /f /im "JLinkGDBServer.exe"
start JLinkGDBServer.exe -select USB -device %1 -if JTAG -speed 1000 -noir
mingw32-make
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "Build",
"type": "shell",
"options": {
"cwd": "${workspaceRoot}/STM32F429IGT"
},
"command": "mingw32-make",
"group": {
"kind": "build",
"isDefault": true
},
"problemMatcher": []
},
{
"label": "Clean",
"type": "shell",
"options": {
"cwd": "${workspaceRoot}/STM32F429IGT"
},
"command": "mingw32-make -f makefile clean",
"group": {
"kind": "build",
"isDefault": true
},
"problemMatcher": []
},
{
"label": "RebuildAll",
"type": "shell",
"options": {
"cwd": "${workspaceRoot}/STM32F429IGT"
},
"command": "E:/Git/STM32/STM32F429/.vscode/RebuildAll.cmd",
"group": {
"kind": "build",
"isDefault": true
},
"problemMatcher": []
},
{
"label": "Jlink GDB Server",
"type": "process",
"options": {
"cwd": "${workspaceRoot}/STM32F429IGT"
},
"command": "E:/Git/STM32/STM32F429/.vscode/MakeAndStartJlink.cmd",
"args": ["STM32F429IG"],
"group": {
"kind": "build",
"isDefault": true
},
"problemMatcher": []
}
]
}
vscode JLinkGDBServer 调试单片机
标签:com and sof folder path mat tin 开发 jta