Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

关于jtag调试无法正常启动的问题 #52

Open
xiaohuihere opened this issue Dec 19, 2022 · 0 comments
Open

关于jtag调试无法正常启动的问题 #52

xiaohuihere opened this issue Dec 19, 2022 · 0 comments

Comments

@xiaohuihere
Copy link

xiaohuihere commented Dec 19, 2022

你好,我在对本项目进行二次开发时,想通过jtag调试器进行调试,但是却发现DebugConsole中出现了以下的错误。
使用的开发板:esp-wrover-kit
系统:win10
平台:VSCode + PlatformIO插件

undefinedC:\Users\22380\.platformio\packages\toolchain-xtensa-esp32\bin\xtensa-esp32-elf-gdb.exe: warning: Couldn't determine a path for the index cache directory.
Reading symbols from c:\Users\22380\Documents\GitHub\wireless-esp8266-dap\.pio\build\esp-wrover-kit\firmware.elf...
PlatformIO Unified Debugger -> https://bit.ly/pio-debug
PlatformIO: debug_tool = ftdi
PlatformIO: Initializing remote target...
Open On-Chip Debugger v0.11.0-esp32-20211220-1338-g554a6c26 (2022-04-08-09:23)
Licensed under GNU GPL v2
For bug reports, read
	http://openocd.org/doc/doxygen/bugs.html
adapter speed: 20000 kHz

WARNING: boards/esp32-wrover.cfg is deprecated, and may be removed in a future release.
         If your board is ESP32-WROVER-KIT, use board/esp32-wrover-kit-1.8v.cfg instead.
adapter speed: 500 kHz

Info : tcl server disabled
Info : telnet server disabled
Info : clock speed 500 kHz
Info : JTAG tap: esp32.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : JTAG tap: esp32.cpu1 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : esp32.cpu0: Debug controller was reset.
Info : esp32.cpu0: Core was reset.
Warn : target esp32.cpu1 examination failed
Info : esp32.cpu0: Debug controller was reset.
Info : esp32.cpu0: Core was reset.
Info : starting gdb server for esp32.cpu0 on pipe
Info : accepting 'gdb' connection from pipe
Info : esp32.cpu0: Target halted, PC=0x4000921A, debug_reason=00000000
Info : Set GDB target to 'esp32.cpu0'
Warn : No symbols for FreeRTOS!
Info : esp32.cpu0: Target halted, PC=0x4009260E, debug_reason=00000001
Error: Failed to get flash maps (4294967295)!
Warn : Failed to get flash mappings (-4)!
Info : esp32.cpu0: Target halted, PC=0x4009260E, debug_reason=00000001
Info : esp32.cpu0: Target halted, PC=0x4009260E, debug_reason=00000001
Info : Auto-detected flash bank 'esp32.cpu0.flash' size 4096 KB
Info : Using flash bank 'esp32.cpu0.flash' size 4096 KB
Info : esp32.cpu0: Target halted, PC=0x4009260E, debug_reason=00000001
Error: Failed to get flash maps (4294967295)!
Warn : Failed to get flash mappings (-4)!
Info : esp32.cpu0: Target halted, PC=0x4009260E, debug_reason=00000001
Info : Using flash bank 'esp32.cpu0.irom' size 0 KB
Info : esp32.cpu0: Target halted, PC=0x4009260E, debug_reason=00000001
Error: Failed to get flash maps (4294967295)!
Warn : Failed to get flash mappings (-4)!
Info : esp32.cpu0: Target halted, PC=0x4009260E, debug_reason=00000001
Info : Using flash bank 'esp32.cpu0.drom' size 0 KB
Info : New GDB Connection: 1, Target esp32.cpu0, state: halted
Warn : negative reply, retrying
0x4000921a in ?? ()
Error: FreeRTOS: uxTopUsedPriority is not defined, consult the OpenOCD manual for a work-around!
Info : JTAG tap: esp32.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : JTAG tap: esp32.cpu1 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
JTAG tap: esp32.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
JTAG tap: esp32.cpu1 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : esp32.cpu0: Debug controller was reset.
Info : esp32.cpu0: Core was reset.
esp32.cpu0: Debug controller was reset.
esp32.cpu0: Core was reset.
Info : esp32.cpu0: Target halted, PC=0x500000CF, debug_reason=00000000
esp32.cpu0: Target halted, PC=0x500000CF, debug_reason=00000000
Info : esp32.cpu0: Core was reset.
esp32.cpu0: Core was reset.
Info : esp32.cpu0: Target halted, PC=0x40000400, debug_reason=00000000
Info : esp32.cpu1: Debug controller was reset.
Info : esp32.cpu1: Core was reset.
esp32.cpu0: Target halted, PC=0x40000400, debug_reason=00000000
esp32.cpu1: Debug controller was reset.
esp32.cpu1: Core was reset.
Info : esp32.cpu1: Target halted, PC=0x40000400, debug_reason=00000000
esp32.cpu1: Target halted, PC=0x40000400, debug_reason=00000000
Hardware assisted breakpoint 1 at 0x400d198f: file main/main.c, line 20.
PlatformIO: Initialization completed
PlatformIO: Resume the execution to `debug_init_break = thb app_main`
PlatformIO: More configuration options -> https://bit.ly/pio-debug
Info : esp32.cpu0: Debug controller was reset.
Info : esp32.cpu0: Core was reset.
esp32.cpu0: Debug controller was reset.
...
Info : esp32.cpu0: Debug controller was reset.
Info : esp32.cpu0: Core was reset.
esp32.cpu0: Debug controller was reset.
esp32.cpu0: Core was reset.
Info : esp32.cpu0: Debug controller was reset.
Info : esp32.cpu0: Core was reset.
esp32.cpu0: Debug controller was reset.
esp32.cpu0: Core was reset.
pio_reset_run_target
Cannot execute this command while the target is running.
Use the "interrupt" command to stop the target
and then try again.
Cannot execute this command while the target is running.
Use the "interrupt" command to stop the target
and then try again.
Cannot execute this command while the target is running.
Use the "interrupt" command to stop the target
and then try again.

于是,为了验证我的esp32是否硬件上存在问题,我便试着创建一个新的空项目。于是它成功完成了调试。
image
image
其DebugConsole如下:

undefinedC:\Users\22380\.platformio\packages\toolchain-xtensa-esp32\bin\xtensa-esp32-elf-gdb.exe: warning: Couldn't determine a path for the index cache directory.
Reading symbols from c:\Users\22380\Documents\PlatformIO\Projects\DEMO\.pio\build\esp-wrover-kit\firmware.elf...
PlatformIO Unified Debugger -> https://bit.ly/pio-debug
PlatformIO: debug_tool = ftdi
PlatformIO: Initializing remote target...
Open On-Chip Debugger v0.11.0-esp32-20211220-1338-g554a6c26 (2022-04-08-09:23)
Licensed under GNU GPL v2
For bug reports, read
	http://openocd.org/doc/doxygen/bugs.html
adapter speed: 20000 kHz

WARNING: boards/esp32-wrover.cfg is deprecated, and may be removed in a future release.
         If your board is ESP32-WROVER-KIT, use board/esp32-wrover-kit-1.8v.cfg instead.
adapter speed: 500 kHz

Info : tcl server disabled
Info : telnet server disabled
Info : clock speed 500 kHz
Info : JTAG tap: esp32.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : JTAG tap: esp32.cpu1 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : esp32.cpu0: Debug controller was reset.
Info : esp32.cpu0: Core was reset.
Info : esp32.cpu1: Debug controller was reset.
Info : esp32.cpu1: Core was reset.
Info : starting gdb server for esp32.cpu0 on pipe
Info : accepting 'gdb' connection from pipe
Info : esp32.cpu0: Target halted, PC=0x400E403E, debug_reason=00000000
Info : Set GDB target to 'esp32.cpu0'
Info : esp32.cpu1: Target halted, PC=0x400E403E, debug_reason=00000000
Warn : No symbols for FreeRTOS!
Info : esp32.cpu0: Target halted, PC=0x4009260E, debug_reason=00000001
Info : Flash mapping 0: 0x10020 -> 0x3f400020, 30 KB
Info : Flash mapping 1: 0x20020 -> 0x400d0020, 82 KB
Info : esp32.cpu0: Target halted, PC=0x4009260E, debug_reason=00000001
Info : Auto-detected flash bank 'esp32.cpu0.flash' size 4096 KB
Info : Using flash bank 'esp32.cpu0.flash' size 4096 KB
Info : esp32.cpu0: Target halted, PC=0x4009260E, debug_reason=00000001
Info : Flash mapping 0: 0x10020 -> 0x3f400020, 30 KB
Info : Flash mapping 1: 0x20020 -> 0x400d0020, 82 KB
Info : Using flash bank 'esp32.cpu0.irom' size 84 KB
Info : esp32.cpu0: Target halted, PC=0x4009260E, debug_reason=00000001
Info : Flash mapping 0: 0x10020 -> 0x3f400020, 30 KB
Info : Flash mapping 1: 0x20020 -> 0x400d0020, 82 KB
Info : Using flash bank 'esp32.cpu0.drom' size 32 KB
Info : New GDB Connection: 1, Target esp32.cpu0, state: halted
Warn : negative reply, retrying
0x400e403e in esp_pm_impl_waiti () at C:\Users\22380\.platformio\packages\framework-espidf\components\hal\esp32\include/hal/cpu_ll.h:183
183	    asm volatile ("waiti 0\n");
Info : JTAG tap: esp32.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : JTAG tap: esp32.cpu1 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
JTAG tap: esp32.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
JTAG tap: esp32.cpu1 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : esp32.cpu0: Debug controller was reset.
Info : esp32.cpu0: Core was reset.
esp32.cpu0: Debug controller was reset.
esp32.cpu0: Core was reset.
Info : esp32.cpu0: Target halted, PC=0x500000CF, debug_reason=00000000
esp32.cpu0: Target halted, PC=0x500000CF, debug_reason=00000000
Info : esp32.cpu0: Core was reset.
esp32.cpu0: Core was reset.
Info : esp32.cpu0: Target halted, PC=0x40000400, debug_reason=00000000
Info : esp32.cpu1: Debug controller was reset.
Info : esp32.cpu1: Core was reset.
esp32.cpu0: Target halted, PC=0x40000400, debug_reason=00000000
esp32.cpu1: Debug controller was reset.
esp32.cpu1: Core was reset.
Info : esp32.cpu1: Target halted, PC=0x40000400, debug_reason=00000000
esp32.cpu1: Target halted, PC=0x40000400, debug_reason=00000000
Info : esp32.cpu0: Target halted, PC=0x4009260E, debug_reason=00000001
esp32.cpu0: Target halted, PC=0x4009260E, debug_reason=00000001
Info : Flash mapping 0: 0x10020 -> 0x3f400020, 30 KB
Info : Flash mapping 1: 0x20020 -> 0x400d0020, 82 KB
Flash mapping 0: 0x10020 -> 0x3f400020, 30 KB
Flash mapping 1: 0x20020 -> 0x400d0020, 82 KB
Info : esp32.cpu0: Target halted, PC=0x4009260E, debug_reason=00000001
esp32.cpu0: Target halted, PC=0x4009260E, debug_reason=00000001
Info : Auto-detected flash bank 'esp32.cpu1.flash' size 4096 KB
Info : Using flash bank 'esp32.cpu1.flash' size 4096 KB
** Programming Started **
Auto-detected flash bank 'esp32.cpu1.flash' size 4096 KB
Using flash bank 'esp32.cpu1.flash' size 4096 KB
** Programming Started **
Info : esp32.cpu0: Target halted, PC=0x4009260E, debug_reason=00000001
esp32.cpu0: Target halted, PC=0x4009260E, debug_reason=00000001
Info : esp32.cpu0: Target halted, PC=0x4009260E, debug_reason=00000001
esp32.cpu0: Target halted, PC=0x4009260E, debug_reason=00000001
Info : PROF: Data transferred in 1010.16 ms @ 27.7183 KB/s
PROF: Data transferred in 1010.16 ms @ 27.7183 KB/s
Info : esp32.cpu0: Target halted, PC=0x4009260E, debug_reason=00000001
esp32.cpu0: Target halted, PC=0x4009260E, debug_reason=00000001
** Programming Finished **
** Verify Started **
** Programming Finished **
** Verify Started **
Info : esp32.cpu0: Target halted, PC=0x4009260E, debug_reason=00000001
esp32.cpu0: Target halted, PC=0x4009260E, debug_reason=00000001
** Verified OK **
** Verified OK **
Info : JTAG tap: esp32.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : JTAG tap: esp32.cpu1 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
JTAG tap: esp32.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
JTAG tap: esp32.cpu1 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : esp32.cpu0: Debug controller was reset.
Info : esp32.cpu0: Core was reset.
esp32.cpu0: Debug controller was reset.
esp32.cpu0: Core was reset.
Info : esp32.cpu0: Target halted, PC=0x500000CF, debug_reason=00000000
esp32.cpu0: Target halted, PC=0x500000CF, debug_reason=00000000
Info : esp32.cpu0: Core was reset.
esp32.cpu0: Core was reset.
Info : esp32.cpu0: Target halted, PC=0x40000400, debug_reason=00000000
Info : esp32.cpu1: Debug controller was reset.
Info : esp32.cpu1: Core was reset.
esp32.cpu0: Target halted, PC=0x40000400, debug_reason=00000000
esp32.cpu1: Debug controller was reset.
esp32.cpu1: Core was reset.
Info : esp32.cpu1: Target halted, PC=0x40000400, debug_reason=00000000
esp32.cpu1: Target halted, PC=0x40000400, debug_reason=00000000
** Programming Started **
** Programming Started **
Info : esp32.cpu0: Target halted, PC=0x4009260E, debug_reason=00000001
esp32.cpu0: Target halted, PC=0x4009260E, debug_reason=00000001
Info : esp32.cpu0: Target halted, PC=0x4009260E, debug_reason=00000001
esp32.cpu0: Target halted, PC=0x4009260E, debug_reason=00000001
Info : PROF: Data transferred in 158.033 ms @ 25.3112 KB/s
PROF: Data transferred in 158.033 ms @ 25.3112 KB/s
Info : esp32.cpu0: Target halted, PC=0x4009260E, debug_reason=00000001
esp32.cpu0: Target halted, PC=0x4009260E, debug_reason=00000001
** Programming Finished **
** Verify Started **
** Programming Finished **
** Verify Started **
Info : esp32.cpu0: Target halted, PC=0x4009260E, debug_reason=00000001
esp32.cpu0: Target halted, PC=0x4009260E, debug_reason=00000001
** Verified OK **
** Verified OK **
Info : JTAG tap: esp32.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : JTAG tap: esp32.cpu1 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
JTAG tap: esp32.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
JTAG tap: esp32.cpu1 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : esp32.cpu0: Debug controller was reset.
Info : esp32.cpu0: Core was reset.
esp32.cpu0: Debug controller was reset.
esp32.cpu0: Core was reset.
Info : esp32.cpu0: Target halted, PC=0x500000CF, debug_reason=00000000
esp32.cpu0: Target halted, PC=0x500000CF, debug_reason=00000000
Info : esp32.cpu0: Core was reset.
esp32.cpu0: Core was reset.
Info : esp32.cpu0: Target halted, PC=0x40000400, debug_reason=00000000
Info : esp32.cpu1: Debug controller was reset.
Info : esp32.cpu1: Core was reset.
esp32.cpu0: Target halted, PC=0x40000400, debug_reason=00000000
esp32.cpu1: Debug controller was reset.
esp32.cpu1: Core was reset.
Info : esp32.cpu1: Target halted, PC=0x40000400, debug_reason=00000000
esp32.cpu1: Target halted, PC=0x40000400, debug_reason=00000000
** Programming Started **
** Programming Started **
Info : esp32.cpu0: Target halted, PC=0x4009260E, debug_reason=00000001
esp32.cpu0: Target halted, PC=0x4009260E, debug_reason=00000001
Info : esp32.cpu0: Target halted, PC=0x4009260E, debug_reason=00000001
esp32.cpu0: Target halted, PC=0x4009260E, debug_reason=00000001
Info : PROF: Data transferred in 6049.46 ms @ 27.7711 KB/s
PROF: Data transferred in 6049.46 ms @ 27.7711 KB/s
Info : esp32.cpu0: Target halted, PC=0x4009260E, debug_reason=00000001
esp32.cpu0: Target halted, PC=0x4009260E, debug_reason=00000001
** Programming Finished **
** Verify Started **
** Programming Finished **
** Verify Started **
Info : esp32.cpu0: Target halted, PC=0x4009260E, debug_reason=00000001
esp32.cpu0: Target halted, PC=0x4009260E, debug_reason=00000001
** Verified OK **
** Verified OK **
Info : JTAG tap: esp32.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : JTAG tap: esp32.cpu1 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
JTAG tap: esp32.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
JTAG tap: esp32.cpu1 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : esp32.cpu0: Debug controller was reset.
Info : esp32.cpu0: Core was reset.
esp32.cpu0: Debug controller was reset.
esp32.cpu0: Core was reset.
Info : esp32.cpu0: Target halted, PC=0x500000CF, debug_reason=00000000
esp32.cpu0: Target halted, PC=0x500000CF, debug_reason=00000000
Info : esp32.cpu0: Core was reset.
esp32.cpu0: Core was reset.
Info : esp32.cpu0: Target halted, PC=0x40000400, debug_reason=00000000
Info : esp32.cpu1: Debug controller was reset.
Info : esp32.cpu1: Core was reset.
esp32.cpu0: Target halted, PC=0x40000400, debug_reason=00000000
esp32.cpu1: Debug controller was reset.
esp32.cpu1: Core was reset.
Info : esp32.cpu1: Target halted, PC=0x40000400, debug_reason=00000000
esp32.cpu1: Target halted, PC=0x40000400, debug_reason=00000000
Hardware assisted breakpoint 1 at 0x400e3de0: file src/main.c, line 1.
PlatformIO: Initialization completed
PlatformIO: Resume the execution to `debug_init_break = thb app_main`
PlatformIO: More configuration options -> https://bit.ly/pio-debug
Info : esp32.cpu0: Target halted, PC=0x400E3DE0, debug_reason=00000001
esp32.cpu0: Target halted, PC=0x400E3DE0, debug_reason=00000001
Info : Set GDB target to 'esp32.cpu0'
Set GDB target to 'esp32.cpu0'
Info : esp32.cpu1: Target halted, PC=0x400E403E, debug_reason=00000000
esp32.cpu1: Target halted, PC=0x400E403E, debug_reason=00000000
[New Thread 1073440948]
[New Thread 1073439060]
[New Thread 1073413508]
[New Thread 1073432724]
[New Thread 1073412896]
[Switching to Thread 1073437172]

Thread 1 "main" hit Temporary breakpoint 1, app_main () at src/main.c:1
1	void app_main() {
Note: automatically using hardware breakpoints for read-only addresses.

Thread 1 "main" hit Breakpoint 5, app_main () at src/main.c:4
4	    a++;

我猜测可能是因为本项目中存在一些引脚占用,使得jtag的引脚被占用了。于是,我更改了本项目中的main函数,本想让jtag口不进行init。
image
重新烧录进行debug后,发现debug栏卡死,无法进行step over或step into或step out。
image
查看DebugConsole发现存在这样的错误报告。

undefinedC:\Users\22380\.platformio\packages\toolchain-xtensa-esp32\bin\xtensa-esp32-elf-gdb.exe: warning: Couldn't determine a path for the index cache directory.
Reading symbols from c:\Users\22380\Documents\GitHub\wireless-esp8266-dap\.pio\build\esp-wrover-kit\firmware.elf...
PlatformIO Unified Debugger -> https://bit.ly/pio-debug
PlatformIO: debug_tool = ftdi
PlatformIO: Initializing remote target...
Open On-Chip Debugger v0.11.0-esp32-20211220-1338-g554a6c26 (2022-04-08-09:23)
Licensed under GNU GPL v2
For bug reports, read
	http://openocd.org/doc/doxygen/bugs.html
adapter speed: 20000 kHz

WARNING: boards/esp32-wrover.cfg is deprecated, and may be removed in a future release.
         If your board is ESP32-WROVER-KIT, use board/esp32-wrover-kit-1.8v.cfg instead.
adapter speed: 500 kHz

Info : tcl server disabled
Info : telnet server disabled
Info : clock speed 500 kHz
Info : JTAG tap: esp32.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : JTAG tap: esp32.cpu1 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : esp32.cpu0: Debug controller was reset.
Info : esp32.cpu0: Core was reset.
Warn : target esp32.cpu1 examination failed
Info : starting gdb server for esp32.cpu0 on pipe
Info : accepting 'gdb' connection from pipe
Info : esp32.cpu0: Target halted, PC=0x4000921A, debug_reason=00000000
Info : Set GDB target to 'esp32.cpu0'
Warn : No symbols for FreeRTOS!
Info : esp32.cpu0: Target halted, PC=0x4009260E, debug_reason=00000001
Error: Failed to get flash maps (4294967295)!
Warn : Failed to get flash mappings (-4)!
Info : esp32.cpu0: Target halted, PC=0x4009260E, debug_reason=00000001
Info : esp32.cpu0: Target halted, PC=0x4009260E, debug_reason=00000001
Info : Auto-detected flash bank 'esp32.cpu0.flash' size 4096 KB
Info : Using flash bank 'esp32.cpu0.flash' size 4096 KB
Info : esp32.cpu0: Target halted, PC=0x4009260E, debug_reason=00000001
Error: Failed to get flash maps (4294967295)!
Warn : Failed to get flash mappings (-4)!
Info : esp32.cpu0: Target halted, PC=0x4009260E, debug_reason=00000001
Info : Using flash bank 'esp32.cpu0.irom' size 0 KB
Info : esp32.cpu0: Target halted, PC=0x4009260E, debug_reason=00000001
Error: Failed to get flash maps (4294967295)!
Warn : Failed to get flash mappings (-4)!
Info : esp32.cpu0: Target halted, PC=0x4009260E, debug_reason=00000001
Info : Using flash bank 'esp32.cpu0.drom' size 0 KB
Info : New GDB Connection: 1, Target esp32.cpu0, state: halted
Warn : negative reply, retrying
0x4000921a in ?? ()
Error: FreeRTOS: uxTopUsedPriority is not defined, consult the OpenOCD manual for a work-around!
Info : JTAG tap: esp32.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : JTAG tap: esp32.cpu1 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
JTAG tap: esp32.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
JTAG tap: esp32.cpu1 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : esp32.cpu0: Debug controller was reset.
Info : esp32.cpu0: Core was reset.
esp32.cpu0: Debug controller was reset.
esp32.cpu0: Core was reset.
Info : esp32.cpu0: Target halted, PC=0x500000CF, debug_reason=00000000
esp32.cpu0: Target halted, PC=0x500000CF, debug_reason=00000000
Info : esp32.cpu0: Core was reset.
esp32.cpu0: Core was reset.
Info : esp32.cpu0: Target halted, PC=0x40000400, debug_reason=00000000
Info : esp32.cpu1: Debug controller was reset.
Info : esp32.cpu1: Core was reset.
esp32.cpu0: Target halted, PC=0x40000400, debug_reason=00000000
esp32.cpu1: Debug controller was reset.
esp32.cpu1: Core was reset.
Info : esp32.cpu1: Target halted, PC=0x40000400, debug_reason=00000000
esp32.cpu1: Target halted, PC=0x40000400, debug_reason=00000000
Hardware assisted breakpoint 1 at 0x400e39ac: file main/main.c, line 18.
PlatformIO: Initialization completed
PlatformIO: Resume the execution to `debug_init_break = thb app_main`
PlatformIO: More configuration options -> https://bit.ly/pio-debug
Warn : address 0x400e39af not writable
Error: esp32.cpu0: Failed to write breakpoint instruction (-4)!
Error: esp32.cpu0: Failed to add SW breakpoint!
Error: can't add breakpoint: unknown reason
Warning:
Cannot insert breakpoint 2.
Cannot access memory at address 0x400e39af

Command aborted.

在网上查阅了很久,但并没有发现类似的错误。

在此,还想提问一下,是否存在一种可能,使得在未经main执行前,jtag所对应的引脚已经被启用,虽然并没有进行init,但是会扰乱原本的引脚信号,从而使得jtag无法进行调试?

最后,如果能够得到您的帮助,我会感激不尽。如果您需要查阅更多的报告或文件配置等详细信息,我很乐意提供给您。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant