HEW and J-Link emulator for RX630


I am working on a project which uses an RX630 144-pin part (R5F5630ACDFB#V0). I recently purchased a J-Link emulator and can invoke the emulator under HEW (4.09.007 version) but at startup the emulation window only gives me 4 choices for the RX630, none of which are the 5630ACDFB version. It only gives 56307, 56308, 5630D and 5630E choices, but does not reference any package pin count.

I have been trying to debug some previously working code, but although the emulator interface on HEW seems to upload the program, the firmware doesn't work correctly. I've tried both the FINE and JTAG interfaces, but i can't even get changes made to the PODR to reflect in the hardware (eg: toggling an output pin - no effect). I've tried selecting each of the packages, but only the 5630D and 5630E have a 144 pin versions. None of these seem to work.

I have also tried porting my code to E2 Studio to see if there is a better JLink interface with more choices, but i keep getting numerous build errors and the information on how to port is difficult if not impossible to find. Besides, i'm more familiar with HEW.

Is there an updated JLINK database for HEW for other RX630 packages that i can download and append, or am i going about it completely the wrong way? I have no idea why none of the firmware port settings or register bit-flipping doesn't work with the JLink.

Any help would be greatly appreciated.

Thanks in advance.

  • I finally converted my HEW project to E2 Studio. I was able to select the RX630 version that i have from the list on the JLink debugger. However, i have tried both JTAG and FINE interfaces, and although the project's .abs file uploads to the processor without errors (apparently) and appears to run, i still do not have any access to the processor on my target board vis-a-vis setting IO port data registers and flipping bits, nor does it appear to run my code.

    I am beginning to suspect it is my JLInk emulator. I have the EDU model, which is supposed to be identical to the BASE model, but i cannot find any reference to running the JLink under either HEW nor E2 Studio.

    Has anyone seen a similar problem to this, and were you able find any resolution to it? I seem to be spinning my wheels here, not going anywhere, fast.

    Thanks in advance for any info or help!
  • In reply to norberto pellicci:

    It seems the GDB server is not configured correctly. I get the following error when i hover over one of the port direction register settings:

    Failed to execute MI command:
    -data-evaluate-expression &(0x00u)
    Error message from debugger back end:
    Attempt to take address of value not located in memory.

    Does anyone know how to fix this error?
  • In reply to norberto pellicci:

    Update: i can definitely connect with the JLink Edu to the target board processor and toggle IO port pin states via the E2 Studio UI, but the firmware either is not actually loaded to the chip OR fails to load to the correct place OR run.

    Anyone have any ideas?

  • In reply to norberto pellicci:

    I have left messages on the Segger website as well, but no solutions forthcoming, except to say that someone posted a reply saying that they had abandoned the use of the Segger JLink because of issues like this with RX family processors, and that he had gone over to the E1 emulator. Evidently, the JLink is intended mainly for ARM family processor cores.

    I would think that Renesas would work with Segger to resolve this kind of issue. Renesas has, i would posit, more than one engineer.

    If anyone has actually been able to get a JLink emulator to work with an RX family processor (excluding the onboard emulators included in starter kits), please respond. I would really like to know what the environment for the development was (ie: what IDE was used, processor, JLink model, and anything else) and what your experience was like.

  • norberto,

    Which version of E2 studio and compiler are you using?

    Mike Clements
    RenesasRulz Modderator
  • In reply to Mike Clements:

    Hi Mike,

    I'm using E2 Studio V7.6.0. I have to check which compiler i'm using. I think it was the GCC but not sure. I'll get back to you.

  • In reply to norberto pellicci:

    Hi Mike,

    Sorry to take so long to get back to you. I tried to find which compiler i was using in my project, and initially i saw that the current toolchain was CC-RX and the current builder was also CC-RX Builder. Then when i dug a little deeper, looking at "Used Tools", i noticed that the list included "Compiler" for compiler, "Linker" for Linker and "Assembler" for assembler. No mention of CC-RX or anything else.

    Under my original settings (as stated above), my code would compile without error but i was never able to upload and run my firmware to the RX630, although i was able to write and read the IO port registers.

    So then i started to play with the compiler, linker, assembler options (under "Select Tools"), including changing the compiler, linker and assembler to GCC version. After i did that, the builds would generate errors.

    Now, i am trying to understand what i need to do to compile my code without errors and then try to run debug again and see if the new toolchain sets will actually allow the emulator to upload to the processor.

    I've been going over the E2 Studio Quick Start manuals ("7.6.0 Release Note", "V7.2 Or Higher Getting Started Guide" and "V7.4 IDE Getting Started Guide") to see if i can understand which settings i need to change in order for the build to complete successfully so i can try to upload the code properly. However, there is a lot that the manuals don't cover and i haven't been able to find the 7.6.0 E2 Studio full user manual, and the IDE "smart" manuals do not have an RX630 version. So currently i am stuck again.

    Can you recommend a basic toolchain and other settings for the RX630 under E2 Studio, or point me to a manual or site where i can find this information? It's like looking for a needle in a haystack.

    Hints, suggestions or downright actual information would be very much appreciated. I'm spinning my wheels again, but this time it's trying to figure out how to properly configure that IDE and toolset for the RX630 under E2 Studio. ( I imported a HEW project that was building OK but not uploading to the processor on the board via the JLink)

    Thanks very much again!


    P.S.: By the way, this is the first time i'm using E2 Studio, and i am only interested in using C language code and not FIT technology or APIs..

  • In reply to norberto pellicci:

    Hello, norberto pellicci.

    Just try to create a new CC-RX executable project, then build and launch debugger.
    If it didn't work at all, you might need to re-install e² studio.
    Otherwise, build/debug environment should be fine.

  • In reply to Okra:

    Hello Okra,

    Thanks very much for your reply. I've completely uninstalled E2 Studio with the hope that when i install it again, setting will be reset to default and i can then import my HEW project again.

    Thanks again.
  • The emulator cannot distinguish between different processor versions. So it should work fine if you select the one with the largest memory.

    The emulator does not really care about the package. The package is only important for the register window. The register window shows all registers of the largest package.

    HEW projects can be imported to e2 studio only once. When importing a HEW project e2 studio does not make a copy of the project. e2 studio adds its own project files to the directory with the HEW project. If you try to import a HEW project a second time e2 studio will find the project files from the earlier import and does not allow another import.

    Before importing a HEW project do one last build in HEW to make sure all project settings are updated. If the project is copied to a new directory for the import make sure the project is rebuilt at the new location.

    This is a working project for e2 studio 7.6. The project is set up for R5F56307 but it will also work with R5F5630A.

    I used it with J-Link Ultra+ and J-Link EDU

    This is the command line for J-Link start:
    C:\Tool\Renesas\e2studio_7\DebugComp\\RX\e2-server-gdb -g SEGGERJLINKRX -t R5F5630A -uSelect= USB -uClockSrcHoco= 0 -uInputClock= 12.0000 -uAllowClockSourceInternal= 1 -uUseFine= 0 -uJTagClockFreq= 16.5 -uRegisterSetting= 0 -uModePin= 0 -uDebugMode= 0 -uExecuteProgram= 0 -uIdCode= FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF -uresetOnReload= 1 -n 0 -uWorkRamAddress= 1000 -uProgReWriteIRom= 0 -uProgReWriteDFlash= 0 -uhookWorkRamAddr= 0x17dd0 -uhookWorkRamSize= 0x230 -l -uCore= SINGLE_CORE|enabled|1|main -uSyncMode= async -uFirstGDB= main


  • In reply to FrankL:

    Thank you Frank. So far, yours is the most detailed explanation, and it is much appreciated.

    Unfortunately, i returned my JLink Edu and swapped it for an E2 Lite. I just received it. I have not been able to get the E2 Lite working with HEW yet, just barely got it out of the box, not sure that it will be able to. I haven't been able to get it to recognize the emulator. Actually, i'd prefer to work with HEW instead of E2 Studio, but i will work with it if there's no other choice.

    I will look at the tutorial you sent. Hopefully, it'll explain a few other things i need to understand before proceeding.

    Thanks again, Frank.

  • In reply to norberto pellicci:


    Have you experienced success in debugging your project?

    Mike Clements
    RenesasRulz Moderator
  • In reply to Mike Clements:

    Hi Mike, hi Frank,

    Mike: No. I went to e2 studio instead as i was not able to use the E2 Lite emulator with HEW. E2 Studio has been an entirely different kind of quagmire. I find that i'm spending most of my time in dealing with E2 studio foibles and my lack of understanding the complexities of it rather than on my project. I avoided going to e2 studio as long as possible because i knew it would cause a lot of grief.

    I'm still trying to debug my code in e2 studio. I'm using the CCRX toolchain and builder. After many unsuccessful attempts at getting either my I2C code or SPI code to function (my I2C code was functioning perfectly under HEW), i decided to try using PDG2 and have it generate code for my peripheral functions, to see if i would have better success. However, that also turned out to be a fiasco as i could never integrate the PDG2 code with e2 studio (i set out the reasons why in another post).

    This is the response post i am replying to this morning, as i haven't checked for other responses to other queries.

    Frank: originally, when iwas using HEW, i had access to a JLink emulator. As i had posted, my code would build OK, and i could see the registers in the processor, even though i had selected the R5F56307 , so it appeared OK, but i was never able to debug with that emulator as the code was never able to upload to the processor. Hence, i bought an e2 Lite emulator and i very reluctantly went to e2 studio.

    I found that the iodefine.h include file had a fairly major impact on the coding and the package type ( i prefer to use C, not FIT). I substituted the original RX630 iodefine from the starter kit samples for the one generated by PDG2 and other register flags suddenly became active (they were missing before).

    Anyway, i'm still struggling. 'm hoping someone can show me what i'm doing wrong in my other queries in Rulz...

    Thank you for your responses.