STM32/STM8技术william hill官网
直播中

悬崖勒马2

8年用户 904经验值
擅长:EMC/EMI设计
私信 关注
[问答]

STM32CUBEIDE在Debug程序无法进入调试状态是为什么?

SEGGER J-Link GDB Server V7.92n Command Line Version
JLinkARM.dll V7.92n (DLL compiled Oct 31 2023 15:10:15)
Command line: -port 2331 -s -device STM32WBA52CG -endian little -speed 4000 -if swd -vd
-----GDB Server start settings-----
GDBInit file:                  none
GDB Server Listening port:     2331
SWO raw output listening port: 2332
Terminal I/O port:             2333
Accept remote connection:      localhost only
Generate logfile:              off
Verify download:               on
Init regs on start:            off
Silent mode:                   off
Single run mode:               on
Target connection timeout:     0 ms
------J-Link related settings------
J-Link Host interface:         USB
J-Link script:                 none
J-Link settings file:          none
------Target related settings------
Target device:                 STM32WBA52CG
Target device parameters:      none
Target interface:              SWD
Target interface speed:        4000kHz
Target endian:                 little
Connecting to J-Link...
J-Link is connected.
Firmware: J-Link V9 compiled May  7 2021 16:26:12
Hardware: V9.50
S/N: 69532295
Feature(s): JFlash, GDB, RDI, FlashBP, FlashDL
Checking target voltage...
Target voltage: 3.32 V
Listening on TCP/IP port 2331
Connecting to target...
Halting core...
Core security extensions: Not implemented
Connected to target
Waiting for GDB connection...Connected to 0000:0000:0000:0000:0000:0000:0000:0001
GDB client (conn. 944) requested target.xml from GDB Server
Reading common registers: Read register 'r0' (4 bytes) from hardware: 0x07000000
Read register 'r1' (4 bytes) from hardware: 0x00000000
Read register 'r2' (4 bytes) from hardware: 0x01000000
Read register 'r3' (4 bytes) from hardware: 0x01000000
Read register 'r4' (4 bytes) from hardware: 0xF8040020
Read register 'r5' (4 bytes) from hardware: 0x44050020
Read register 'r6' (4 bytes) from hardware: 0x0000000C
Read register 'r7' (4 bytes) from hardware: 0x74FF0120
Read register 'r8' (4 bytes) from hardware: 0xFFFFFFFF
Read register 'r9' (4 bytes) from hardware: 0xD8050040
Read register 'r10' (4 bytes) from hardware: 0xFFFFFFFF
Read register 'r11' (4 bytes) from hardware: 0xFFFFFFFF
Read register 'r12' (4 bytes) from hardware: 0x54020106
Read register 'sp' (4 bytes) from hardware: 0x74FF0120
Read register 'lr' (4 bytes) from hardware: 0xD5BE0408
Read register 'pc' (4 bytes) from hardware: 0x50CA0408
Read register 'xpsr' (4 bytes) from hardware: 0x00000001
Read 4 bytes @ address 0x0804CA50 (Data = 0x681B4B05)
Received monitor command: ReadAPEx 0x1000000 0xF8
O.K.:0xE00FE003
Read 4 bytes @ address 0xE000EE08 (Data = 0x00000000)
Received monitor command: ReadMemAP 0x1000000 0xE00FEFD0 0x8 0x0
O.K.:0x00000000,0x00000000,0x00000000,0x00000000,0x00000092,0x00000004,0x0000000A,0x00000000
Reading register 'msp' = 0x2001FF74
Reading register 'psp' = 0x00000000
Read 4 bytes @ address 0x0804BED4 (Data = 0xBD80BF00)
Reading 64 bytes @ address 0x2001FF40
Connected to 0000:0000:0000:0000:0000:0000:0000:0001
Read 4 bytes @ address 0x080589C4 (Data = 0x60FB69FB)
GDB client (conn. 964) requested target.xml from GDB Server
Reading 64 bytes @ address 0x2001FFC0
Read 4 bytes @ address 0x0804BEC0 (Data = 0xBD80BF00)
Reading common registers: Read register 'r0' (4 bytes) from hardware: 0x07000000
Read register 'r1' (4 bytes) from hardware: 0x00000000
Read register 'r2' (4 bytes) from hardware: 0x01000000
Read register 'r3' (4 bytes) from hardware: 0x01000000
Read register 'r4' (4 bytes) from hardware: 0xF8040020
Read register 'r5' (4 bytes) from hardware: 0x44050020
Read register 'r6' (4 bytes) from hardware: 0x0000000C
Read register 'r7' (4 bytes) from hardware: 0x74FF0120
Read register 'r8' (4 bytes) from hardware: 0xFFFFFFFF
Read register 'r9' (4 bytes) from hardware: 0xD8050040
Read register 'r10' (4 bytes) from hardware: 0xFFFFFFFF
Read register 'r11' (4 bytes) from hardware: 0xFFFFFFFF
Read register 'r12' (4 bytes) from hardware: 0x54020106
Read register 'sp' (4 bytes) from hardware: 0x74FF0120
Read register 'lr' (4 bytes) from hardware: 0xD5BE0408
Read register 'pc' (4 bytes) from hardware: 0x50CA0408
Read register 'xpsr' (4 bytes) from hardware: 0x00000001
Read 4 bytes @ address 0x0804BFC6 (Data = 0xB580E7FC)
Read 4 bytes @ address 0x0804CA50 (Data = 0x681B4B05)
Downloading 348 bytes @ address 0x08000000 - Verified OK
Downloading 16148 bytes @ address 0x0800015C - Verified OK
Downloading 16192 bytes @ address 0x08004070 - Verified OK
Downloading 16272 bytes @ address 0x08007FB0 - Verified OK
Downloading 16064 bytes @ address 0x0800BF40 - Verified OK
Downloading 16144 bytes @ address 0x0800FE00 - Verified OK
Downloading 16224 bytes @ address 0x08013D10 - Verified OK
Downloading 16208 bytes @ address 0x08017C70 - Verified OK
Downloading 16112 bytes @ address 0x0801BBC0 - Verified OK
Downloading 16144 bytes @ address 0x0801FAB0 - Verified OK
Downloading 16128 bytes @ address 0x080239C0 - Verified OK
Downloading 16096 bytes @ address 0x080278C0 - Verified OK
Downloading 16160 bytes @ address 0x0802B7A0 - Verified OK
Downloading 16176 bytes @ address 0x0802F6C0 - Verified OK
Downloading 16192 bytes @ address 0x080335F0 - Verified OK
Downloading 16224 bytes @ address 0x08037530 - Verified OK
Downloading 16208 bytes @ address 0x0803B490 - Verified OK
Downloading 16160 bytes @ address 0x0803F3E0 - Verified OK
Downloading 16176 bytes @ address 0x08043300 - Verified OK
Downloading 16176 bytes @ address 0x08047230 - Verified OK
Downloading 16048 bytes @ address 0x0804B160 - Verified OK
Downloading 16000 bytes @ address 0x0804F010 - Verified OK
Downloading 16048 bytes @ address 0x08052E90 - Verified OK
Downloading 9076 bytes @ address 0x08056D40 - Verified OK
Downloading 11780 bytes @ address 0x080590B8 - Verified OK
Downloading 8 bytes @ address 0x0805BEBC - Verified OK
Downloading 4 bytes @ address 0x0805BEC4 - Verified OK
Downloading 4 bytes @ address 0x0805BEC8 - Verified OK
Downloading 1272 bytes @ address 0x0805BECC - Verified OK
Writing register 'pc' = 0x080585F0
Read 4 bytes @ address 0x080585F0 (Data = 0x46854828)
Read 2 bytes @ address 0x080585F0 (Data = 0x4828)
Starting target CPU...
GDB closed TCP/IP connection (Socket 964)
Debugger requested to halt target...
...Target halted (PC = 0x0804C398)
Reading common registers: Read register 'r0' (4 bytes) from hardware: 0x03000000
Read register 'r1' (4 bytes) from hardware: 0x00080246
Read register 'r2' (4 bytes) from hardware: 0x0030020F
Read register 'r3' (4 bytes) from hardware: 0x03000000
Read register 'r4' (4 bytes) from hardware: 0xF8040020
Read register 'r5' (4 bytes) from hardware: 0x44050020
Read register 'r6' (4 bytes) from hardware: 0x0000000C
Read register 'r7' (4 bytes) from hardware: 0x64FF0120
Read register 'r8' (4 bytes) from hardware: 0xFFFFFFFF
Read register 'r9' (4 bytes) from hardware: 0xD8050040
Read register 'r10' (4 bytes) from hardware: 0xFFFFFFFF
Read register 'r11' (4 bytes) from hardware: 0xFFFFFFFF
Read register 'r12' (4 bytes) from hardware: 0x54020106
Read register 'sp' (4 bytes) from hardware: 0x64FF0120
Read register 'lr' (4 bytes) from hardware: 0xF9BF0408
Read register 'pc' (4 bytes) from hardware: 0x98C30408
Read register 'xpsr' (4 bytes) from hardware: 0x00000021
Read 4 bytes @ address 0x0804C398 (Data = 0x0000E7FE)
GDB closed TCP/IP connection (Socket 944)
Restoring target state and closing J-Link connection...
Shutting down...
因为STLINKV2连接不上换成了JLINK,可以用J-Flash连接上去,并进行擦片。但是在使用CubeIDE进行调试的时候,无法进入调试状态。
以上信息是进入调试时候的打印信息,不明白在下面这个信息后
Halting core...
Core security extensions: Not implemented
为什么会跳转TCP/IP这样的连接,还有这个地方突然停止核心,一般是什么原因?
用CubeIDE,我应该是可以把程序下载进入,因为我重新上电之后,可以扫描看到BLE的广播名称,并且手机能够进行配对。


回帖(1)

王飞云

2024-3-7 16:29:04
以下是尝试进行故障排除的几个可能原因和步骤:
1。请确保已在STM32CubeIDE中正确配置调试设置。仔细检查是否已选择正确的调试探针(SEGGER J-Link),并在调试配置中设置正确的目标设备(STM32WBA52CG)。
2.检查开发板和调试探针之间的连接。确保使用SWD接口将调试探针正确连接到目标板。
3.验证目标设备上的固件是否正确闪存和运行。在尝试调试之前,请确保设备已通电并运行预期的程序。
4.检查是否有任何断点或观察点导致调试进程停止。尝试禁用所有断点和观察点,看看问题是否仍然存在。
5.验证J-Link驱动程序是否正确安装在您的系统上。确保安装了最新版本的J-Link软件和驱动程序。
6.尝试重新启动J-Link GDB服务器和STM32CubeIDE。有时,重新启动工具可以帮助解决任何临时问题。
7.如果可能,请尝试使用不同的调试探针或开发板来隔离问题是否与硬件组件有关。
举报

更多回帖

发帖
×
20
完善资料,
赚取积分