程序下载和简单调试
上篇文章是写基础操作,把程序工程编译出来,这篇再进行接下来的下载和调试了。简单多了,依赖launch.json文件执行脚本指令,坑比较少。
准备文件
launch.json
{
// 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": "Debug (OpenOCD)", //开发调试使用工具
"cwd": "${workspaceRoot}",
"executable": "./build/${workspaceRootFolderName}.elf",
"request": "launch",
"type": "cortex-debug",
"servertype": "openocd",
"device": "STM32F4",
"runToMain": true,
"configFiles": [