硬汉嵌入式论坛

 找回密码
 立即注册
查看: 354|回复: 2
收起左侧

[技术讨论] eclipse使用JLink调试下载STM32G0失败

[复制链接]

55

主题

131

回帖

296

积分

高级会员

积分
296
发表于 2023-11-27 12:03:07 | 显示全部楼层 |阅读模式
使用的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 Sep  4 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 May  7 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








err1.png
1.png
2.png
3.png
4.png
5.png
6.png
7.png
回复

使用道具 举报

1万

主题

6万

回帖

10万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
106749
QQ
发表于 2023-11-27 12:43:50 | 显示全部楼层
直接CubeMX生成CubeIDE工程试试,这个CubeIDE就是整合的eclipse。
回复

使用道具 举报

55

主题

131

回帖

296

积分

高级会员

积分
296
 楼主| 发表于 2023-11-30 09:20:10 | 显示全部楼层
解决了,链接脚本的问题
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|小黑屋|Archiver|手机版|硬汉嵌入式论坛

GMT+8, 2024-5-4 04:50 , Processed in 0.370460 second(s), 29 queries .

Powered by Discuz! X3.4 Licensed

Copyright © 2001-2023, Tencent Cloud.

快速回复 返回顶部 返回列表