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




相关推荐
徽京人5 小时前
VS Code 接入Esp 32步骤
vscode·单片机·嵌入式硬件
笨笨饿9 小时前
#109_BK7258 蓝牙 A2DP 音频数据通路深度解析
python·stm32·单片机·mcu·物联网·编辑器·音视频
JTaoX10 小时前
pycharm 集成本地 jupyter notebook
ide·jupyter·pycharm
oushaojun214 小时前
vscode中支持deepseek ai辅助编程
vscode·copilot·deepseek
李高钢1 天前
除了 IDE,C#/WPF 开发者每天离不开的 10 个工具
ide·c#·wpf
带娃的IT创业者1 天前
Emacs 31:一场静默而深刻的范式演进
编辑器·文本编辑器·开源软件·emacs·lisp·软件架构
●VON1 天前
芯笺 Markdown:面向 HarmonyOS PC 的本地优先 Markdown 编辑器
华为·编辑器·harmonyos·鸿蒙
sunoo-2292 天前
C 语言文件 IO 全攻略:从基础函数到实战踩坑(BMP 读取 + 词典查询)
linux·c语言·前端·笔记·vscode·学习
慕容引刀2 天前
或许你真的需要这个Git神器:让团队提交文案终于对齐了
人工智能·git·vscode·自然语言处理·github