在powershell中输入下面指令:
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调试
修改为如下内容:
{
"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
}
}
]
}
修改如下:
//"idf.openOcdConfigs": [
// "interface/ftdi/esp32_devkitj_v1.cfg",
// "target/esp32.cfg"
//],
"idf.openOcdConfigs": [
"board/esp32s3-builtin.cfg"
],