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




相关推荐
223糖13 小时前
Idea,pycharm2026激活保姆级教程
java·ide·intellij-idea
独隅14 小时前
CLion 接入 Codex 的完整配置使用全面指南
c++·ide·ai·c++23
sphw1 天前
nixnb: Jupyter Notebook 优雅分享
ide·人工智能·jupyter
NoteStream1 天前
【c语言基础】C语言常见概念
c语言·开发语言·编辑器
布鲁飞丝2 天前
从零实现富文本编辑器#-浏览器选区与编辑器选区模型同步
java·前端·编辑器
计算机内卷的N天2 天前
CMake与Visual Studio的使用
c++·ide·visual studio
咱入行浅2 天前
一款实用的 Visual Studio 发布部署插件,助力提高部署效率!
ide·visual studio
谢斯2 天前
[vscode] 使用unity打开vscode的取消.csproj的显示
ide·vscode·unity
2501_916007472 天前
SwiftUI 声明式语法与 Xcode 预览功能详解
ide·vscode·ios·swiftui·个人开发·xcode·敏捷流程
呐抹倾2 天前
【译】Visual Studio 停用:针对旧版本 Visual Studio 的支持提醒
ide·visual studio