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




相关推荐
电子硬件笔记2 小时前
Python语言编程导论第三章 编写程序
开发语言·python·编辑器
睡觉早点7 小时前
IntelliJ IDEA下载安装过程(含Java环境搭建)
java·ide·jdk·maven·intellij-idea
草酸艾司西酞普兰7 小时前
idea中使用Qoder插件
java·ide·intellij-idea
芽芽_07 小时前
idea无法打开:Cannot collect JVM options
java·ide·intellij-idea
Flying_Fish_roe7 小时前
IntelliJ IDEA 2025 版本与其他历史版本的全面专业对比分析
java·ide·intellij-idea
朝阳3911 小时前
vscode 实用插件【Md Editor】即时渲染编辑 .md 文件(带工具条)
vscode
Rendy_11 小时前
github copilot vscode插件 没有模型
vscode·github·copilot
2301_7930698212 小时前
VS-CODE 里的github copilot 不支持自己配置模型api
vscode
晚风予卿云月13 小时前
Linux编辑器—vim的使用
linux·编辑器·vim
DeadPool loves Star14 小时前
VSCode关闭Shell内联建议
ide·vscode·编辑器