初级会员

- 积分
- 69
- 金钱
- 69
- 注册时间
- 2022-10-4
- 在线时间
- 13 小时
|
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
|
|