设为首页 加入收藏

TOP

VSCode + JTAG调试合宙ESP32C3的经历(二)
2023-07-23 13:31:13 】 浏览:179
Tags:VSCode JTAG ESP32C3 经历
s\esp-idf-v4.4.3\workspace\hello_world> openocd -f board/esp32c3-builtin.cfg Open On-Chip Debugger v0.11.0-esp32-20220706 (2022-07-06-15:48) Licensed under GNU GPL v2 For bug reports, read http://openocd.org/doc/doxygen/bugs.html Info : only one transport option; autoselect 'jtag' Info : esp_usb_jtag: VID set to 0x303a and PID to 0x1001 Info : esp_usb_jtag: capabilities descriptor set to 0x2000 Warn : Transport "jtag" was already selected Info : Listening on port 6666 for tcl connections Info : Listening on port 4444 for telnet connections Info : esp_usb_jtag: serial (60:55:F9:75:9C:90) Info : esp_usb_jtag: Device found. Base speed 40000KHz, div range 1 to 255 Info : clock speed 40000 kHz Info : JTAG tap: esp32c3.cpu tap/device found: 0x00005c25 (mfg: 0x612 (Espressif Systems), part: 0x0005, ver: 0x0) Info : datacount=2 progbufsize=16 Info : Examined RISC-V core; found 1 harts Info : hart 0: XLEN=32, misa=0x40101104 Info : starting gdb server for esp32c3 on 3333 Info : Listening on port 3333 for gdb connections

根据官方教程创建gdbinit文件,端口3333

target remote :3333
set remote hardware-watchpoint-limit 2
mon reset halt
flushregs
thb app_main
c

启动GDB调试,成功,此时已经可以使用GDB调试了

PS F:\Espressif\frameworks\esp-idf-v4.4.3\workspace\hello_world> riscv32-esp-elf-gdb -x gdbinit build/hello_world.elf
F:\Espressif\tools\riscv32-esp-elf\esp-2021r2-patch5-8.4.0\riscv32-esp-elf\bin\riscv32-esp-elf-gdb.exe: warning: Couldn't determine a path for the index cache directory.
GNU gdb (crosstool-NG esp-2021r2-patch5) 9.2.90.20200913-git
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "--host=x86_64-host_w64-mingw32 --target=riscv32-esp-elf".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from build/hello_world.elf...
0x40000000 in ?? ()
JTAG tap: esp32c3.cpu tap/device found: 0x00005c25 (mfg: 0x612 (Espressif Systems), part: 0x0005, ver: 0x0)
Reset cause (3) - (Software core reset)
Hardware assisted breakpoint 1 at 0x42005eee: file F:/Espressif/frameworks/esp-idf-v4.4.3/workspace/hello_world/main/hello_world_main.c, line 17.
[New Thread 1070136696]
[New Thread 1070130304]
[Switching to Thread 1070134812]

Thread 1 "main" hit Temporary breakpoint 1, app_main () at F:/Espressif/frameworks/esp-idf-v4.4.3/workspace/hello_world/main/hello_world_main.c:17
17      {
(gdb)

OpenOCD可以看到GDB连接后的行为

Info : accepting 'gdb' connection on tcp/3333
Memory protection is enabled. Reset target to disable it...
Info : JTAG tap: esp32c3.cpu tap/device found: 0x00005c25 (mfg: 0x612 (Espressif Systems), part: 0x0005, ver: 0x0)
Info : Reset cause (3) - (Software core reset)
Warn : No symbols for FreeRTOS!
Info : [esp32c3] Found 8 triggers
Info
首页 上一页 1 2 3 4 下一页 尾页 2/4/4
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
上一篇痞子衡嵌入式:我被邀请做科锐国.. 下一篇交叉编译esp8089

最新文章

热门文章

Hot 文章

Python

C 语言

C++基础

大数据基础

linux编程基础

C/C++面试题目