eclipse-plugins
eclipse-plugins copied to clipboard
J-Link: Unable to download program
Hello,
I'm using Eclipse CDT Neon .3 Release 4.6.3 with the plugin GNU MCU C/C++ J-Link Debugging 4.1.5 with a Renesas RZ/T1 target (R7S910018_R4F). Unfortunately I'm not able to download the program to the FLASH, here is the output log:
SEGGER J-Link GDB Server V6.16e Command Line Version
JLinkARM.dll V6.16e (DLL compiled Jun 27 2017 18:47:05)
-----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: R7S910018_R4F Target interface: JTAG Target interface speed: auto Target endian: little
Connecting to J-Link... J-Link is connected. Firmware: J-Link V10 compiled Jun 16 2017 16:15:19 Hardware: V10.10 S/N: 600105610 Feature(s): RDI, FlashBP, FlashDL, JFlash, GDB Checking target voltage... Target voltage: 3.34 V Listening on TCP/IP port 2331 Connecting to target... J-Link found 1 JTAG device, Total IRLen = 4 JTAG ID: 0x4BA00477 (Cortex-R4) Connected to target Waiting for GDB connection...Connected to 127.0.0.1 Reading all registers Read 4 bytes @ address 0x00000000 (Data = 0xE59FF018) Read 4 bytes @ address 0x00000000 (Data = 0xE59FF018) Target interface speed set to 1000 kHz Expected an decimal digit (0-9) Halting target CPU... ...Target halted (PC = 0x00000000) PC = 00000000, CPSR = 000000D3 (SVC mode, ARM FIQ dis. IRQ dis.) R0 = 00000000, R1 = 00000000, R2 = 00000000, R3 = 00000000 R4 = 00000000, R5 = 00000000, R6 = 00000000, R7 = 00000000 USR: R8 =00000000, R9 =00000000, R10=00000000, R11 =00000000, R12 =00000000 R13=00000000, R14=00000000 FIQ: R8 =3A61C016, R9 =3605B594, R10=DA47CB9B, R11 =38149000, R12 =9E904995 R13=00807E00, R14=973E4BE8, SPSR=38003416 SVC: R13=00000000, R14=00000000, SPSR=360C8A13 ABT: R13=00808000, R14=00000008, SPSR=00000093 IRQ: R13=00807D00, R14=0404DF96, SPSR=80000133 UND: R13=00807F00, R14=00000006, SPSR=000001BB Reading all registers Read 4 bytes @ address 0x00000000 (Data = 0xE59FF018) Read 4 bytes @ address 0x00000000 (Data = 0xE59FF018) Select auto target interface speed (1000 kHz) Flash breakpoints enabled Selecting work RAM area (0x00000000-0x00000000) Read 4 bytes @ address 0x00000000 (Data = 0xE59FF018) Read 4 bytes @ address 0x00000000 (Data = 0xE59FF018) Downloading 76 bytes @ address 0x30000000 - Verified OK Downloading 8704 bytes @ address 0x3000004C - Verified OK Downloading 64 bytes @ address 0x3000224C - Verified OK Downloading 24 bytes @ address 0x3000228C - Verified OK Downloading 16332 bytes @ address 0x300022A4 - Verified OK Downloading 16336 bytes @ address 0x30006270 - Verified OK Downloading 16256 bytes @ address 0x3000A240 - Verified OK Downloading 3556 bytes @ address 0x3000E1C0 - Verified OK Downloading 16300 bytes @ address 0x3000EFA4 - Verified OK Downloading 5768 bytes @ address 0x30012F50 - Verified OK Downloading 16056 bytes @ address 0x300145D8 - Verified OK Downloading 16160 bytes @ address 0x30018490 - Verified OK Downloading 16048 bytes @ address 0x3001C3B0 - Verified OK Downloading 16096 bytes @ address 0x30020260 - Verified OK Downloading 16016 bytes @ address 0x30024140 - Verified OK Downloading 16000 bytes @ address 0x30027FD0 - Verified OK Downloading 15872 bytes @ address 0x3002BE50 - Verified OK Downloading 15872 bytes @ address 0x3002FC50 - Verified OK Downloading 15920 bytes @ address 0x30033A50 - Verified OK Downloading 16032 bytes @ address 0x30037880 - Verified OK Downloading 15920 bytes @ address 0x3003B720 - Verified OK Downloading 16048 bytes @ address 0x3003F550 - Verified OK Downloading 15888 bytes @ address 0x30043400 - Verified OK Downloading 15968 bytes @ address 0x30047210 - Verified OK Downloading 16064 bytes @ address 0x3004B070 - Verified OK Downloading 15968 bytes @ address 0x3004EF30 - Verified OK Downloading 16016 bytes @ address 0x30052D90 - Verified OK Downloading 15904 bytes @ address 0x30056C20 - Verified OK Downloading 16128 bytes @ address 0x3005AA40 - Verified OK Downloading 16160 bytes @ address 0x3005E940 - Verified OK Downloading 16112 bytes @ address 0x30062860 - Verified OK Downloading 16272 bytes @ address 0x30066750 - Verified OK Downloading 16288 bytes @ address 0x3006A6E0 - Verified OK Downloading 16272 bytes @ address 0x3006E680 - Verified OK Downloading 14664 bytes @ address 0x30072610 - Verified OK Downloading 8 bytes @ address 0x30075F58 - Verified OK Downloading 16064 bytes @ address 0x30075F60 - Verified OK Downloading 6484 bytes @ address 0x30079E20 - Verified OK Downloading 200 bytes @ address 0x3007B774 - Verified OK ERROR: Verification of RAMCode failed @ address 0x24000000. Write: 0xE0A1BE00 E09CE083 Read: 0x4657424C 44415441 Failed to prepare for programming. Failed to download RAMCode! Error while determining flash info (Bank @ 0x30000000) Writing register (PC = 0x00802000) Read 4 bytes @ address 0x00802000 (Data = 0xF1020011) Read 4 bytes @ address 0x00802000 (Data = 0xF1020011) Read 2 bytes @ address 0x04056004 (Data = 0x2008) Read 2 bytes @ address 0x04056004 (Data = 0x2008) PC = 00000000, CPSR = 000000D3 (SVC mode, ARM FIQ dis. IRQ dis.) R0 = 00000000, R1 = 00000000, R2 = 00000000, R3 = 00000000 R4 = 00000000, R5 = 00000000, R6 = 00000000, R7 = 00000000 USR: R8 =00000000, R9 =00000000, R10=00000000, R11 =00000000, R12 =00000000 R13=00000000, R14=00000000 FIQ: R8 =3A61C016, R9 =3605B594, R10=DA47CB9B, R11 =38149000, R12 =9E904995 R13=00807E00, R14=973E4BE8, SPSR=38003416 SVC: R13=00000000, R14=00000000, SPSR=360C8A13 ABT: R13=00808000, R14=00000008, SPSR=00000093 IRQ: R13=00807D00, R14=0404DF96, SPSR=80000133 UND: R13=00807F00, R14=00000006, SPSR=000001BB Reading all registers Read 4 bytes @ address 0x00000000 (Data = 0xE59FF018) Read 4 bytes @ address 0x00000000 (Data = 0xE59FF018) Setting breakpoint @ address 0x04056004, Size = 2, BPHandle = 0x0001 Starting target CPU...
The problem is: "ERROR: Verification of RAMCode failed @ address 0x24000000." The J-Link uses RAM at the address 0x24000000 as work RAM. The CPU I'm using has no RAM at this address, so the access to this address fails. How can I setup the work RAM range in the plugin?
According to the this article .gdbinit file is not loaded by the plugin. Instead the command should be added to the commands filed of the GDB client setup in the debugger tab. I've tried adding monitor WorkRAM = 0x00000000-0x00000000 to this command field, but it leads to another error:
Error in final launch sequence Failed to execute MI command: monitor WorkRAM = 0x00000000-0x00000000 Error message from debugger back end: "monitor" command not supported by this target. Failed to execute MI command: monitor WorkRAM = 0x00000000-0x00000000 Error message from debugger back end: "monitor" command not supported by this target. "monitor" command not supported by this target.
I've tried loading a settings file using the -settingsfile command line option of the JLinkGDBServerCL without success. It seems like the settings file is ignored.
I've added the command monitor WorkRAM = 0x00000000-0x00000000 to the Initialization commands field in the startup tab. This worked for a few downloads and then stopped working. The address 0x24000000 is still accessed and leads to the above error.
How can I specifiy the work RAM are for the J-Link debugger in the plugin?