ESP32S3在VScode中使用USB口调试

ESP32S3在VScode中使用USB口调试

安装USB驱动

在powershell中输入下面指令:

c 复制代码
Invoke-WebRequest 'https://dl.espressif.com/dl/idf-env/idf-env.exe' -OutFile .\idf-env.exe; .\idf-env.exe driver install --espressif

参考官方网址

安装成功之后连接开发板的USB口(非串口)如下图所示:

修改工程的配置文件

参考文档:
JTAG调试
使用VS code调试

launch.json

修改为如下内容:

json 复制代码
{
  "version": "0.2.0",
  "configurations": [
  {
      "name": "GDB",
      "type": "cppdbg",
      "request": "launch",
      "MIMode": "gdb",
      "miDebuggerPath": "${command:espIdf.getXtensaGdb}",
      "program": "${workspaceFolder}/build/${command:espIdf.getProjectName}.elf",
      "windows": {
      "program": "${workspaceFolder}\\build\\${command:espIdf.getProjectName}.elf"
      },
      "cwd": "${workspaceFolder}",
      "environment": [{ "name": "PATH", "value": "${config:idf.customExtraPaths}" }],
      "setupCommands": [
      { "text": "set remotetimeout 100" },
      { "text": "target extended-remote :3333" },
      { "text": "set remote hardware-watchpoint-limit 2"},
      { "text": "mon reset halt" },
      { "text": "thb app_main" },
      { "text": "flushregs" }
      ],
      "externalConsole": false,
      "logging": {
      "engineLogging": true
      }
  }
  ]
}

settings.json

修改如下:

json 复制代码
	//"idf.openOcdConfigs": [
    //    "interface/ftdi/esp32_devkitj_v1.cfg",
    //    "target/esp32.cfg"
    //],
    "idf.openOcdConfigs": [
        "board/esp32s3-builtin.cfg"
    ],

启动GDB Server




相关推荐
foxsen_xia24 分钟前
Go安装、配置和vsCode配置Go
开发语言·vscode·golang
黎相思2 小时前
环境搭建
ide
晨同学03272 小时前
【亲测可行】windows安装visual studio & opencv4.10.0
ide·windows·visual studio
PWRJOY3 小时前
Android Studio中安卓模拟器打不开,报错The emulator process for AVD has terminated
android·ide·android studio
金融小师妹3 小时前
基于LSTM趋势预测的白银价格突破58美元阈值,年度累计涨幅超100%的强化学习驱动分析
大数据·人工智能·编辑器·1024程序员节
UVM_ERROR7 小时前
硅农VSCode 插件推荐
vscode·centos·ssh
BD_Marathon8 小时前
【IDEA】IDEA的详细设置
java·ide·intellij-idea
x***44018 小时前
vscode配置django环境并创建django项目(全图文操作)
vscode·django·sqlite
帮帮志9 小时前
Jupyter使用的快捷键大全
ide·python·jupyter
qq_463944869 小时前
Jupyter中输入标题的方法
ide·python·jupyter