Embedded GDB Server won't download image to flash

I have an embedded GDB server target I am trying to debug using CLion and a segger J-Link. Everything seems to work, except when I click the debug icon, clion does not download the image to the chip, it just starts debugging what's already there with the symbols from the new executable. The chip is a SAMG55. I've verifed the problem is with CLion (or how I have Clion set up), as the program runs and debugs successfully in Atmel Studio.

 

Here's a picture of my embedded GDB Server Settings:

 

And here's the output of the debug console:

"C:\Program Files (x86)\SEGGER\JLink\JLinkGDBServerCL.exe" -select USB -device ATSAMG55J19 -endian little -if SWD -speed 4000 -ir -rtos "C:\Program Files (x86)\SEGGER\JLink\GDBServer\RTOSPlugin_FreeRTOS.dll"
SEGGER J-Link GDB Server V6.64 Command Line Version

JLinkARM.dll V6.64 (DLL compiled Mar 13 2020 15:55:42)

Command line: -select USB -device ATSAMG55J19 -endian little -if SWD -speed 4000
-ir -rtos C:\Program Files (x86)\SEGGER\JLink\GDBServer\RTOSPlugin_FreeRTOS.dll

-----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: off
Init regs on start: on
Silent mode: off
Single run mode: off
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: ATSAMG55J19
Target interface: SWD
Target interface speed: 4000kHz
Target endian: little

Connecting to J-Link...
J-Link is connected.
Firmware: J-Link V10 compiled Jan 7 2020 16:51:47
Hardware: V10.10
S/N: 600108490
Feature(s): RDI, FlashBP, FlashDL, JFlash, GDB
Checking target voltage...
Target voltage: 3.34 V
Listening on TCP/IP port 2331
Connecting to target...
Connected to target
Waiting for GDB connection...Error during pretty printers setup: Undefined info command: "pretty-printer". Try "help info".

Some features and performance optimizations will not be available.

Connected to 127.0.0.1
Reading all registers
Read 4 bytes @ address 0x00000000 (Data = 0x200075F8)
Read 2 bytes @ address 0x00000000 (Data = 0x75F8)
Loading RTOS plugin: C:\Program Files (x86)\SEGGER\JLink\GDBServer\RTOSPlugin_Fr
eeRTOS.dll...
RTOS plugin (API v1.0) loaded successfully
RTOS plugin: Loaded
Received symbol: pxCurrentTCB (0x20000CB0)
Received symbol: pxReadyTasksLists (0x20000CBC)
Received symbol: xDelayedTaskList1 (0x20000D64)
Received symbol: xDelayedTaskList2 (0x20000D78)
Received symbol: pxDelayedTaskList (0x20000CB4)
Received symbol: pxOverflowDelayedTaskList (0x20000CB8)
Received symbol: xPendingReadyList (0x20000D94)
Received symbol: xTasksWaitingTermination (0x20000DC0)
Received symbol: xSuspendedTaskList (0x20000DAC)
Received symbol: uxCurrentNumberOfTasks (0x20000D4C)
Received symbol: uxTopUsedPriority (0x00000000)
Received symbol: uxTopReadyPriority (0x20000D60)
Received symbol: vPortEnableVFP (0x00428790)
Received symbol: FreeRTOSDebugConfig (0x00000000)
All mandatory symbols successfully loaded.
Downloading 8 bytes @ address 0x00410000
Downloading 16000 bytes @ address 0x00412000
Downloading 16032 bytes @ address 0x00415E80
Downloading 16032 bytes @ address 0x00419D20
Downloading 16032 bytes @ address 0x0041DBC0
Downloading 16016 bytes @ address 0x00421A60
Downloading 16048 bytes @ address 0x004258F0
Downloading 16016 bytes @ address 0x004297A0
Downloading 16128 bytes @ address 0x0042D630
Downloading 16048 bytes @ address 0x00431530
Downloading 15968 bytes @ address 0x004353E0
Downloading 16080 bytes @ address 0x00439240
Downloading 16256 bytes @ address 0x0043D110
Downloading 15780 bytes @ address 0x00441090
Downloading 8 bytes @ address 0x00444E34
Downloading 3188 bytes @ address 0x00444E3C
ERROR: Timeout while checking target RAM, RAMCode did not respond in time. (PC =
0x00000000, CPSR = 0x00000000, LR = 0x41000003)!
Failed to prepare for programming.
Failed to execute RAMCode for RAM check!
Writing register (PC = 0x 41379c)
Debugger connected to tcp:localhost:2331
Starting target CPU...
...Target halted (DBGRQ, PC = 0xFFF013F2)
Reading all registers
Read register 0 (4 bytes) from DLL: 00000000
Read register 1 (4 bytes) from DLL: 00000000
Read register 2 (4 bytes) from DLL: 00000000
Read register 3 (4 bytes) from DLL: F875F020
Read register 4 (4 bytes) from DLL: 00000010
Read register 5 (4 bytes) from DLL: 00000000
Read register 6 (4 bytes) from DLL: 1C070020
Read register 7 (4 bytes) from DLL:Signal: SIGTRAP (Trace/breakpoint trap)
00000000
Read register 8 (4 bytes) from DLL: 00000000
Read register 9 (4 bytes) from DLL: 00000000
Read register 10 (4 bytes) from DLL: 00000000
Read register 11 (4 bytes) from DLL: 01000000
Read register 12 (4 bytes) from DLL: 00000000
Read register 13 (4 bytes) from DLL: C4EF0120
Read register 14 (4 bytes) from DLL: 07384100
Read register 15 (4 bytes) from DLL: F213F0FF
Read register 16 (4 bytes) from DLL: 03000041
WARNING: Failed to read memory @ address 0xFFF013F2
Reading 64 bytes @ address 0xFFF013C0
WARNING: Failed to read memory @ address 0xFFF013C0
WARNING: Failed to read memory @ address 0xFFF013F2
Reading 64 bytes @ address 0xFFF00FC0
WARNING: Failed to read memory @ address 0xFFF00FC0
WARNING: Failed to read memory @ address 0xFFF00FF2
Read 4 bytes @ address 0x00413806 (Data = 0x70192101)

 

If there's any additional information I can provide, please let me know.

1

I have a similar problem with a J-Trace debugger and a STM32H750.
Did you find a solution to your problem?

0

请先登录再写评论。