OpenEdv-开源电子网

 找回密码
 立即注册
正点原子全套STM32/Linux/FPGA开发资料,上千讲STM32视频教程免费下载...
查看: 78|回复: 0
打印 上一主题 下一主题

esp32S3 jtag调试环境搭建遇到问题分享

[复制链接]

3

主题

9

帖子

0

精华

初级会员

Rank: 2

积分
69
金钱
69
注册时间
2022-10-4
在线时间
13 小时
跳转到指定楼层
楼主
发表于 2025-6-5 14:58:29 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
1、在.vscode文件夹添加如下json文件


2、c_cpp_properties.json文件内容修改为:
{
    "configurations": [
        {
            "name": "ESP-IDF",
            "includePath": [
                "${config:idf.espIdfPath}/components/**",
                "${config:idf.espIdfPathWin}/components/**",
                "${config:idf.espAdfPath}/components/**",
                "${config:idf.espAdfPathWin}/components/**",
                "${workspaceFolder}/**"
            ],
            "browse": {
                "path": [
                    "${config:idf.espIdfPath}/components",
                    "${config:idf.espIdfPathWin}/components",
                    "${config:idf.espAdfPath}/components/**",
                    "${config:idf.espAdfPathWin}/components/**",
                    "${workspaceFolder}"
                ],
                "limitSymbolsToIncludedHeaders": false
            },
            "configurationProvider": "ms-vscode.cmake-tools"  /* 解决 browse.path 中未找到包含文件 */
        }
    ],
    "version": 4
}





3、launch.json文件内容修改为:
{
"configurations": [

{
"name": "GDB",
"type": "cppdbg",
"request": "launch",
"MIMode": "gdb",
"miDebuggerPath": "${command:espIdf.getToolchainGdb}",
"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": "target remote :3333" },
{ "text": "set remotetimeout 20" },
],
"postRemoteConnectCommands": [
{ "text": "mon reset halt" },
{ "text": "maintenance flush register-cache"},
],
"externalConsole": false,
"logging": {
"engineLogging": true
}
}
]
}




4、settings.json文件内容修改如下:
{
"C_Cpp.intelliSenseEngine": "Tag Parser",
"C_Cpp.default.configurationProvider": "ms-vscode.cmake-tools",
"idf.adapterTargetName": "esp32s3",
"idf.openOcdConfigs": [
    "board/esp32s3-builtin.cfg"
],

//该参数在遇到第5点问题时候添加:
//"idf.customExtraPaths": "H:\\ESP32\\Espressif_531\\tools\\openocd-esp32\\v0.12.0-esp32-20240318\\openocd-esp32\\bin"   

"idf.portWin": "COM33",
"idf.flashType": "JTAG",

"idf.customExtraVars": {
    "IDF_TARGET": "esp32s3"
},
"idf.espIdfPathWin": "H:/ESP32/Espressif_531/frameworks/esp-idf-v5.3.1/",
"idf.toolsPathWin": "H:\\ESP32\\Espressif_531",
"idf.pythonInstallPath": "H:\\ESP32\\Espressif_531\\tools\\idf-python\\3.11.2\\python.exe"
}








5、如果遇到以下问题:
[OpenOCD]
❌ Info : Listening on port 4444 for telnet connections
Error: libusb_open() failed with LIBUSB_ERROR_NOT_FOUND
[OpenOCD]
❌ Error: esp_usb_jtag: could not find or open device!

解决方案参考该链接:https://blog.csdn.net/mayuxin131 ... -blog-136498570.235^v43^pc_blog_bottom_relevance_base3&spm=1001.2101.3001.4242.2&utm_relevant_index=3

如果遇到以下问题:
esp32-S3无法调试,报错”未能找到设置“idf.customExtraPaths:“的解决办法


解决方案参考该链接:https://blog.csdn.net/qq_69502992/article/details/145362817


正点原子逻辑分析仪DL16劲爆上市
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则



关闭

原子哥极力推荐上一条 /2 下一条

正点原子公众号

QQ|手机版|OpenEdv-开源电子网 ( 粤ICP备12000418号-1 )

GMT+8, 2025-6-14 00:31

Powered by OpenEdv-开源电子网

© 2001-2030 OpenEdv-开源电子网

快速回复 返回顶部 返回列表