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

Scatter file ordering of BSS and ZI

I am using MDK-ARM V4.70 and have a scatter file that works OK but I have an external RAM execution region which is something like:

    RW_ERAM1 0x60000000 0x10000
    {
        module1.o (+ZI, +RW)
        module2.o (+ZI, +RW)
        module3.o (+ZI, +RW)
        module4.o (+ZI, +RW)
    }

The linker always positions the RW data of everything before the ZI data, no matter what order I list them.

module1.o RW
module2.o RW
module3.o RW
module4.o RW
module1.o ZI
module2.o ZI
module3.o ZI
module4.o ZI

Is there a way to force it to position the ZI data of module1.o to be first so that the order is:

module1.o ZI
module1.o RW
module2.o RW
module3.o RW
module4.o RW
module2.o ZI
module3.o ZI
module4.o ZI

Thanks.

0