Eclipse 调试-GNU ARM裸机开发
我正在调试Atmel给出的示例代码。我已经成功地建立了这个程序 为了调试,我正在使用Eclipse 调试-GNU ARM裸机开发,eclipse,debugging,arm,gdb,segger-jlink,Eclipse,Debugging,Arm,Gdb,Segger Jlink,我正在调试Atmel给出的示例代码。我已经成功地建立了这个程序 为了调试,我正在使用eclipseplusgdbplusJlinkGDBServerplus板载Jtag 虽然程序可以下载到主板上并且运行良好,但我无法调试程序。每次启动调试会话时,JLinkGDBServer将终止,并出现错误,如下所示: target remote localhost:2331 monitor reset load mon reg pc = 0x300000 mon reg pc = 0x300000 end
eclipse
plusgdb
plusJlinkGDBServer
plus板载Jtag
虽然程序可以下载到主板上并且运行良好,但我无法调试程序。每次启动调试会话时,JLinkGDBServer将终止,并出现错误,如下所示:
target remote localhost:2331
monitor reset
load
mon reg pc = 0x300000
mon reg pc = 0x300000
end
以下是控制台中显示的每个程序终止的消息:
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.
以下是我的调试配置:
在“运行命令”下,框中的命令如下所示:
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文件各节的加载地址,并查看项目的链接器设置
希望对您有所帮助……您解决了这个问题吗,我有一个类似的问题……不幸的是,我还没有解决这个问题。目前,我正在使用IAR编译器在windows环境下进行开发。工作示例设置: