lindahnu 发表于 2023-11-27 12:03:07

eclipse使用JLink调试下载STM32G0失败

使用的eclipse版本是eclipse-embedcpp-2023-06-R-win32-x86_64,Jlink是6.84版本

工程是编译成功的,调试信息如下,PC = 0xFFFFFFFE错误,有小伙伴成功使用jlink调试的经验吗?求指导




SEGGER J-Link GDB Server V6.84 Command Line Version


JLinkARM.dll V6.84 (DLL compiled Sep4 2020 16:12:50)


Command line: -if swd -device STM32G070RB -endian little -speed 1000 -port 2331 -swoport 2332 -telnetport 2333 -vd -ir -localhostonly 1 -singlerun -strict -timeout 0 -nogui
-----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:            on
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:               STM32G070RB
Target interface:            SWD
Target interface speed:      1000kHz
Target endian:               little


Connecting to J-Link...
J-Link is connected.
Firmware: J-Link V9 compiled May7 2021 16:26:12
Hardware: V9.20
S/N: 59800899
Feature(s): RDI, GDB, FlashDL, FlashBP, JFlash
Checking target voltage...
Target voltage: 3.28 V
Listening on TCP/IP port 2331
Connecting to target...
Connected to target
Waiting for GDB connection...Connected to 127.0.0.1
Reading all registers
Read 4 bytes @ address 0x00000000 (Data = 0xFFFFFFFF)
Read 2 bytes @ address 0x00000000 (Data = 0xFFFF)
Received monitor command: speed 1000
Target interface speed set to 1000 kHz
Received monitor command: clrbp
Received monitor command: reset
Resetting target
Received monitor command: halt
Halting target CPU...
...Target halted (PC = 0xFFFFFFFE)
Received monitor command: regs
R0 = FFFFFFFF, R1 = FFFFFFFF, R2 = FFFFFFFF, R3 = FFFFFFFF
R4 = FFFFFFFF, R5 = FFFFFFFF, R6 = FFFFFFFF, R7 = FFFFFFFF
R8 = FFFFFFFF, R9 = FFFFFFFF, R10= FFFFFFFF, R11= FFFFFFFF
R12= FFFFFFFF, R13= FFFFFFFC, MSP= FFFFFFFC, PSP= FFFFFFFC
R14(LR) = FFFFFFFF, R15(PC) = FFFFFFFE
XPSR F1000000, APSR F0000000, EPSR 01000000, IPSR 00000000
CFBP 00000000, CONTROL 00, FAULTMASK 00, BASEPRI 00, PRIMASK 00
Reading all registers
Received monitor command: speed auto
Select auto target interface speed (2000 kHz)
Received monitor command: flash breakpoints 1
Flash breakpoints enabled
Downloading 184 bytes @ address 0x08000000 - Verified OK
Downloading 1992 bytes @ address 0x080000B8 - Verified OK
Downloading 4 bytes @ address 0x08000880 - Verified OK
Downloading 4 bytes @ address 0x08000884 - Verified OK
Downloading 4 bytes @ address 0x08000888 - Verified OK
Comparing flash   [....................] Done.
Erasing flash   [....................] Done.
Programming flash [....................] Done.
Writing register (PC = 0x 8000218)
Read 4 bytes @ address 0x08000218 (Data = 0x4685480D)
Read 2 bytes @ address 0x08000218 (Data = 0x480D)
Received monitor command: clrbp
Received monitor command: reset
Resetting target
Received monitor command: halt
Halting target CPU...
...Target halted (PC = 0x08000218)
Received monitor command: regs
R0 = FFFFFFFF, R1 = FFFFFFFF, R2 = FFFFFFFF, R3 = FFFFFFFF
R4 = FFFFFFFF, R5 = FFFFFFFF, R6 = FFFFFFFF, R7 = FFFFFFFF
R8 = FFFFFFFF, R9 = FFFFFFFF, R10= FFFFFFFF, R11= FFFFFFFF
R12= FFFFFFFF, R13= 20010000, MSP= 20010000, PSP= FFFFFFFC
R14(LR) = FFFFFFFF, R15(PC) = 08000218
XPSR F1000000, APSR F0000000, EPSR 01000000, IPSR 00000000
CFBP 00000000, CONTROL 00, FAULTMASK 00, BASEPRI 00, PRIMASK 00
Reading all registers
Starting target CPU...
...Target halted (DBGRQ, PC = 0xFFFFFFFE)
Reading all registers
WARNING: Failed to read memory @ address 0xFFFFFFFE
WARNING: Failed to read memory @ address 0x2000FFFC
Reading 64 bytes @ address 0x2000FFC0
WARNING: Failed to read memory @ address 0x2000FFC0
WARNING: Failed to read memory @ address 0x2000FFF8
Reading 64 bytes @ address 0x2000FFC0
WARNING: Failed to read memory @ address 0x2000FFC0
WARNING: Failed to read memory @ address 0x2000FFF8








eric2013 发表于 2023-11-27 12:43:50

直接CubeMX生成CubeIDE工程试试,这个CubeIDE就是整合的eclipse。

lindahnu 发表于 2023-11-30 09:20:10

解决了,链接脚本的问题
页: [1]
查看完整版本: eclipse使用JLink调试下载STM32G0失败