The Renesas RX and RL78 Targets Get Updated Toolchains Today (Release 2019q2)

The most popular Renesas targets, RX and RL78, are receiving updated toolchains today, for the first time this year. Both releases include an update to Newlib 3.1.0, and several additional improvements or bug-fixes.

The release notes for each of these platforms may be found below, covering what changes each of these new toolchain versions bring:

  • GCC for Renesas (Windows | Linux)
    1. [Binutils][Bug Fix] Objdump decoded instructions as g14 specific instructions.
    2. [GCC][Bug Fix] Fixed the unexpected result generated when comparing to a global pointer.
    3. [Newlib][Improvementx] Updated to newlib version 3.1.0.
    4. [Newlib][Improvement] Nano libraries are now available. To use newlib-nano, users should provide additional gcc compile and link time option. –specs=nano.specs should be passed along with -specs=sim.specs if msim would be needed, else if msim is not needed -specs=lnosys.specs should be passed along with nano.specs. For example: $ rl78-elf-gcc test.c –specs=nano.specs -specs=sim.specs $(OTHER_OPTIONS)
    5. [Newlib][Improvement] Optimized string functions.
    6. [Newlib][Bug Fix] Added KEEP syntax for the frodata section into the default linker-script.
  • Known issues
    • ES is used without being initialized.

      In order to initialize ES, the address should be stored in a far pointer before usage. So instead of:

      ((volatile reg __far*)0x000FFF).bit._1 = 0;

      the code will be:

      volatile reg __far *address0 = 0x000FFF;
      (*address0).bit._1 = 0;

    • The __far keyword is not supported for C++ projects.
  • GCC for Renesas (Windows | Linux)
    1. [Binutils][Bug-Fix] Fixed the objdump code generation for MOV, POP, PUSH
    2. [Binutils][Bug-Fix] Fixed the dissambly generation of NOP instructions
    3. [Binutils][Bug-Fix] Improved the opcode decoding for RXv3 instructions
    4. [GCC][Bug-Fix] Fixed the detection of SSTR string opcode.
    5. [GCC][Improvement] The rmpa builtin function can now accept byte/word/long access size and parameters.
    6. [GCC][Improvement] Implemented save and rstr as attributes.
    7. [GCC][Improvement] The -mtfu option is now supported. TFU builtin functions are now available.
    8. [GCC][Improvement] A warning is now generated when mvtipl is used with -mcpu=rx610
    9. [GCC][Bug-Fix] Fixed the bit set builtin fuctions atomic access.
    10. [GCC][Bug-Fix] Fixed the isinf_sign and isnan builtin functions bug generated due to the newlib update.
    11. [GCC][Improvement] Optimized the xchg builtin function.
    12. [GDB][Bug-Fix] Fixed the simulation of some RXv3 instructions.
    13. [Newlib][Improvement] Updated to newlib version 3.1.0
    14. [Newlib][Improvement] Nano libraries are now available
    15. [Newlib][Improvement] Optimized string library functions.
    16. [Newlib][Improvement] Optimized the sqrt function.
  • Known issues
    • In certain cases the program will time out while executing with following options:
      (Note: Both flags need to be accompanied by “-fno-diagnostics-show-caret -w -O1 -DSTACK_SIZE=4096 -msim -lm” for the problem to be observed.)
      a) -funroll-loops
      b) -fpeel-loops
    • An incomplete type error can be observed ocasionally when using the -fpack-struct option in C++. The combination of the flags that reproduce this problem is “-fpack-struct -fno-diagnostics-show-caret -nostdinc++ -fmessagelength=0 -std=c++11 -pedantic-errors -Wno-long-long -S -msim

The Linux installer for both toolchains also offers command-line flags to automate installation as much as possible, as well as the ability to also act as an uninstaller for the toolchains. Therefore, the installer can both install and uninstall the toolchain from one or more paths from your Linux distribution. The release notes for both toolchains also include the list of the currently known issues presented above, to which we fully commit to adequately handle in the coming updates.

We are deeply grateful for any feedback you may have regarding this release, so please let us know if you have any questions or comments.

7 Responses to The Renesas RX and RL78 Targets Get Updated Toolchains Today (Release 2019q2)

  1. andrepereira says:

    How do i integrate toolchain on e2studio ?

    • GNU Tools Support says:

      You need to please install the toolchain first, then open up a recent version of e2Studio and the toolchain should be automatically detected. Just in case the automatic detection fails, you may also go to e2Studio and click the Help menu, then choose “Add Renesas Toolchains”.

  2. andrepereira says:

    I forgot to explain that I am using UBUNTU-MATE linux. I downloaded the gcc and run the file, but when I go to the e2studio integration part, the toolchain file does not been reconized by defalt.
    Is there a way to do that less paintfull ?

  3. alice.trifu says:


    Unfortunately, at this point, only the GNURX and ARM toolchains are supported by E2studio, on the Linux version, as you can see on Window → Preferences → Renesas → Renesas Toolchain Management.

    In the near future, we will strongly advocate that support for GNURL78 toolchains to be added in E2studio for Linux.

    Please let us know if we can help you with anything else.

    Kind regards,
    The GNU Tools Team

  4. says:


    e2studio is not recognised __far keyword. using Renesas for windows.

    getting build error.


    #define RADIO_FAR __far

    void (RADIO_FAR *TxDone )( void );

    can u please help me.
    error: expected identifier or ‘(‘ before ‘__far’

    • Darius Galis says:


      Unlike CCRL/IAR, the GCC RL78 doesn’t use the __far attribute for instructions that will be saved in the code section. In fact, in GCC this is not possible because the standard defines named address spaces only for data sections (please see the following: ).

      In order to handle code bigger than 64 KB, GCC uses a PLT (Procedure Linkage Table) to achieve this feat. A good explanation about this can be found here: .

      Although the article is about dynamic libraries, the same principle can be applied. Please observe the key part of the article:
      “The indirection used here is called a procedure linkage table or PLT. Code does not call an external function directly, but only via a PLT stub. Let’s examine this…”

      Please let us know if we can be of further assistance,

      Best Regards,
      The GNU Tools Team

Leave a Reply