This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

maybe, a BUG of ARM Linker version 4.0 Build 697

Note: This was originally posted on 12th August 2010 at http://forums.arm.com

Here is the piece of code in a C source file.

#pragma arm section rwdata ="cellular_ram"
u8 gv_CFI[256]={0};/* MAN ID DID1,DID2,DID3*/
u16 gv_DIDR;
u16 gv_RCR;
u16 gv_BCRInit;
u16 gv_BCR;
#pragma arm section rwdata

then, in scatter file, somethin like this:
    ER_PRE_INIT_DATA  0xA01FF000  (0x00001000)
   {
      init.ptl(cellular_ram,+FIRST)
      drv_gpio.*(+RW,+ZI)
   }

I want to put gv_CFI and the ohter 4 u16 var together in a fix place.

But, after link finished. I check the MAP file.
I found this:

[color="#FF0000"]   gv_CFI                                   0xa802fe58   Data         128  init.ptl(.bss)  [/color]

    gv_DIDR                                  0xa01ff000   Data           2  init.ptl(cellular_ram)
    gv_RCR                                   0xa01ff002   Data           2  init.ptl(cellular_ram)
    gv_BCRInit                               0xa01ff004   Data           2  init.ptl(cellular_ram)
    gv_BCR                                   0xa01ff006   Data           2  init.ptl(cellular_ram)

the gv_CFI  is placed wrong.....

How can I deal with this ? Why the linker split it from the other four? They are all .bss. why??

Who can help me?

I'm downloading the latest build of RVCT. I hope it will resolve my problem. ...

After upgrade to RVCT v4.0 Build 821, the same problem.

Then, I tried like this:

u8 gv_CFI[256]={0xFF};

It's done.

Thanks for the help of scott.
0