gpt4 book ai didi

eclipse - 调试 - GNU ARM 裸机开发

转载 作者:行者123 更新时间:2023-12-04 18:05:09 26 4
gpt4 key购买 nike

我正在尝试调试 Atmel 提供的示例代码。我已经成功构建了程序。

为了调试,我使用的是eclipse plusgdb plus JlinkGDBServer plus onboard Jtag.

虽然程序可以下载到板子上并且运行良好,但是我无法调试程序。每次我启动调试 session 时,JLinkGDBServer 都会终止并出现如下错误:

enter image description here

以下是每次程序终止时控制台中显示的消息:

JLinkGDBServer

SEGGER J-Link GDB Server V4.96g Command Line Version

JLinkARM.dll V4.96g (DLL compiled Feb 6 2015 17:54:32)

-----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: on
Verify download: on
Init regs on start: on
Silent mode: off
Single run mode: on
Target connection timeout: 5 ms
------J-Link related settings------
J-Link Host interface: USB
J-Link script: none
J-Link settings file: none
------Target related settings------
Target device: Cortex-A5
Target interface: JTAG
Target interface speed: 1000kHz
Target endian: little

Connecting to J-Link...
J-Link is connected.
Firmware: J-Link OB-SAM3U128 V1 compiled Nov 28 2014 10:24:11
Hardware: V1.00
S/N: 480300770
Checking target voltage...
Target voltage: 3.30 V
Listening on TCP/IP port 2331
Connecting to target...
J-Link found 1 JTAG device, Total IRLen = 4
JTAG ID: 0x4BA00477 (Cortex-A5)
Connected to target
Waiting for GDB connection...Connected to 127.0.0.1
Reading all registers
Read 4 bytes @ address 0x00000000 (Data = 0xE59FF070)
Target interface speed set to 1000 kHz
Resetting target
Halting target CPU...
...Target halted (PC = 0x00000000)
PC = 00000000, CPSR = 000001D3 (SVC mode, ARM FIQ dis. IRQ dis.)
R0 = 00000004, R1 = 0031E0C3, R2 = 00016AAD, R3 = 00016965
R4 = 0031FFA0, R5 = C0542A08, R6 = C0512000, R7 = C051DA90
USR: R8 =C051DD80, R9 =410FC051, R10=C0512000, R11 =0031FF94, R12 =003020C0
R13=BEBF5C70, R14=B6F12F1C
FIQ: R8 =9ABE0586, R9 =7E72A55E, R10=73DBFC6B, R11 =4F6717CF, R12 =05EDA809
R13=5AC81462, R14=24683958, SPSR=370D2C67
SVC: R13=0031FF80, R14=00300620, SPSR=000001D3
ABT: R13=C0542B4C, R14=C000DC80, SPSR=A0000193
IRQ: R13=00320000, R14=80000053, SPSR=80000053
UND: R13=C0542B58, R14=C000DB60, SPSR=60000093
Reading all registers
Select auto target interface speed (1000 kHz)
Flash breakpoints enabled
Semi-hosting enabled (VectorAddr = 0x08)
Semihosting I/O set to TELNET and GDB Client
Downloading 15488 bytes @ address 0x00300000 - Verified OK
Writing register (PC = 0x00300080)
GDB closed TCP/IP connection
Connected to 127.0.0.1
Reading all registers
Read 4 bytes @ address 0x00300080 (Data = 0xF1080100)
Resetting target
Writing register (PC = 0x00300000)
Writing register (PC = 0x00300000)
Starting target CPU...
GDB closed TCP/IP connection

arm-none-eabi-gdb

Warning: the current language does not match this frame.
The target endianness is set automatically (currently little endian)

半主机和 SWV

SEGGER J-Link GDB Server V4.96g - Terminal output channel
Connection closed by the GDB server.

以下是我的调试配置: enter image description here enter image description here enter image description here

在运行命令下,框中的命令如下:

target remote localhost:2331
monitor reset
load
mon reg pc = 0x300000
mon reg pc = 0x300000
end

我不知道根本原因是什么。我怀疑是 arm-none-eabi-gdb 导致 JLinkGDBServer 终止,退出代码为 -1

请帮忙。

编辑1

仅供引用,我使用的是 SAMA5D3x-EK 开发板。

最佳答案

这很难说,但看起来处理器在加载您的代码时是否出现异常。我建议验证您的 ELF 文件部分的加载地址,并检查您的项目的链接器设置。

希望对你有帮助

关于eclipse - 调试 - GNU ARM 裸机开发,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28528398/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com