JLink + RX62n debugging requires JLink USB disconnect/reconnect between debug sessions

E2 studio 7.1

RX62n (R5F562N8)

Jlink Pro

When attempting to debug the first connection to the target works without issue.  If I terminate the debug session and then start another debug session I get errors:

"Error while saving CPU State"

"CPU is not halted"

"Could not initiate E1/E20 device..."

The following is printed in the Console:

JLINKARM_Halt failed
RxTargetDevice::E20_set_debug_information() - FAIL : 0x7F000000
E20_set_debug_information() Failed : 1
RxTargetDevice::startConnection() Rx_Init_E1_E20() Failed

And the session fails.

If I attempt to debug again I get different errors:

"Failed to download RAMCode. Failed to prepare for programming. Failed to download RAMCode!"

"Error while detecting device endianess"

"CPU_ReadRed() called for CPU without delayed register read. (RegIndex=19)"

"Reading register 19 failed: Unspecified error for programming..." x 5

And the session appears to be live but there is no source code, cannot pause or set breakpoints.

If I unplug the JLink's USB cable and replug it back in I am able to debug again.


E2 studio v6.2 debugs without any issue.

I have tracked this issue down to the JLink.dll (C:\Renesas\e2_studio\DebugComp\RX\RX\Segger).  E2 studio v6.2 is using JLink.dll v6.12a.  E2 studio v7.1 is using JLink.dll v6.32i.  I have tried using the JLink.dll from the latest Segger download (v6.4) and get the same issues described above (with JLink.dll v6.32i).

  • Hi Cowens,

    Sorry for the inconvenience. This could be one of the known issues in e2studio v7.1.0. But you could still debug right when you just disconnect and connect again the debugger? It's hassle but as of now, might be the only option to use v7.1.0 or you could go back to v6.2 to avoid this inconvenience. Hopefully this could be fixed in the next update.

    RenesasRulz Forum Moderator


  • In reply to JB:

    I briefly went through the "known issues" document and didn't see the exact issue. The issue I found could be related to another issue that is already listed in the "known issues" document.

    I have replaced the JLink.dll that comes with e2 studio v7.1 with the JLink.dll from e2 studio v6.2 and I no longer have the reconnect the debugger every time start/stop a debug session. I do however notice I get a lot more errors such as "CPU Not halted" than I have in the past.
  • I am contacting Segger regarding this issue and will provide updates with any new information I obtain.
  • In reply to cowens:


    Have you heard anything back from Segger?

    Mike Clements
    RenesasRulz Moderator
  • In reply to Mike Clements:

    I received a new J-link from Segger and the problem still exists with the RX62n.