Comment 1 for bug 1608882

Revision history for this message
Thomas Preud'homme (thomas-preudhomme) wrote :

Hi JiriJ,

I cannot reproduce the behavior you observed. I compiled with -S -O2 -mcpu=cortex-r5 the following code:

typedef volatile struct tExtMemDev
{
  unsigned short regA;
  unsigned short regB;
  unsigned short regC;
} __attribute__((packed)) T_EXT_MEM_DEV;

  T_EXT_MEM_DEV rxBuff __attribute__ ((section (".external_device")));

void
foo (void)
{
  rxBuff.regA = 0xDEAD;
}

NB: I had to add typedef and quotes around the section name.

Once compiled, I got:

        movw r3, #:lower16:.LANCHOR0
        movw r2, #57005
        movt r3, #:upper16:.LANCHOR0
        movt r2, 65535
        strh r2, [r3] @ movhi
        bx lr

Can you provide the command line option you used for me to reproduce?

Best regards.