本文主要是介绍ESP32 S2在vscode中单步调试 IDF ESP-IDF Prog-jtag调试器,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
ESP32S2在vscode 中单步调试IDF
1、调试器prog-jtag(官方淘宝购买)
2、esp32-s2-solo-1开发板一块
3、将两个串口合一,参考链接
https://docs.espressif.com/projects/esp-idf/zh_CN/latest/esp32s2/api-guides/jtag-debugging/configure-ft2232h-jtag.html
4、开发板与调试器连线引脚
引脚链接
https://docs.espressif.com/projects/esp-idf/zh_CN/latest/esp32s2/api-guides/jtag-debugging/configure-ft2232h-jtag.html
5、打开vscode中esp-idf,在idf中设置选择下载为esp32s2,且下载方式为jtag
6、编译
7、下载,下载不成功,检查连线,不行的话多点击几次
8、下载成功
9、点击运行->启动调试->c++(windows),会生成launch.json
9、复制以下代码到launch.json文件中
这段代码的链接
https://github.com/espressif/vscode-esp-idf-extension/blob/master/docs/DEBUGGING.md
https://github.com/espressif/vscode-esp-idf-extension/blob/master/docs/tutorial/debugging.md
{
“version”: “0.2.0”,
“configurations”: [
{
“name”: “GDB”,
“type”: “cppdbg”,
“request”: “launch”,
“MIMode”: “gdb”,
“miDebuggerPath”: “ c o m m a n d : e s p I d f . g e t X t e n s a G d b " , " p r o g r a m " : " {command:espIdf.getXtensaGdb}", "program": " command:espIdf.getXtensaGdb","program":"{workspaceFolder}/build/KaTeX parse error: Expected '}', got 'EOF' at end of input: … "program": "{workspaceFolder}\build\KaTeX parse error: Expected 'EOF', got '}' at position 44: …me}.elf" }̲, "cwd": …{workspaceFolder}”,
“environment”: [{ “name”: “PATH”, “value”: “${config:idf.customExtraPaths}” }],
“setupCommands”: [
{ “text”: “target remote :3333” },
{ “text”: “set remote hardware-watchpoint-limit 2”},
{ “text”: “mon reset halt” },
{ “text”: “thb app_main” },
{ “text”: “flushregs” }
],
“externalConsole”: false,
“logging”: {
“engineLogging”: true
}
}
]
}
11、点击左侧调试即可
12、其余不清楚的请添加qq:1272798373询问
13、2021年11月20日
这篇关于ESP32 S2在vscode中单步调试 IDF ESP-IDF Prog-jtag调试器的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!