I just tried the latest version (gcc- of the toolchain for a RX63N controller, and found an error.

For the Ethernet DMA I need two buffers on a 16 byte aligned boundary, I have these declared like this:

static volatile ethfifo xRxDescriptors[ emacNUM_RX_DESCRIPTORS ] __attribute__((aligned(16)));
static volatile ethfifo xTxDescriptors[ emacNUM_TX_BUFFERS ] __attribute__((aligned(16)));

This worked perfectly on version gcc-, but with the newer compiler I got the addresses 0x000005e3 and 0x000005b7 for these 2 buffers.

I had the optimization level set to -Os, I have not tried other levels.

Is this a compiler error, or do I need to declare these buffers differently?


Erika Molnar commented
    • Hello Peter,

      Thank you for reporting this issue to us!

      We are fully aware of the problem, we disabled the align attribute on -Os starting with the 2017q3 release of the toolchain. A possible workaround would be changing the optimization level for that file.

      In e2studio 5.4 you can do this by right-clicking on the file → Properties → Compiler → Object → Optimization level

      In e2studio 6.0 you can do this by right-clicking on the file → Properties → C/C++ Build → Settings → Compiler → Source → User defined compiler options.

      We are working on resolving this issue in one of our future releases. Please check regularly on our support platform at https://gcc-renesas.com to find out when this issue will be resolved. If you signed up to receive targeted emails about Renesas products when creating your account, you will also receive a newsletter whenever new releases are available.

      Should you have any more questions, please feel free to let us know.

      Thank you,
      The GNU Tools Team

    • Ok, thanks for clearing it out.
      I didn’t mean to flag your comment btw, but don’t know how to unflag.

    • Hello,

      Thank you for your patience!

      A fix for this issue is available starting with GCC for Renesas Toolchain.

      Best regards,
      The GNU Tools Team