Hi experts,
How to extern a variable from scatter file in between the sections.
For illustration,
region 0x0 0x1000
{
sec1 +0
*(+ZI)
<addr1>
*(+RO)
<addr2;>
}
In the above scatter file I want to extern a variable addr1 & addr2 points to the current address pointer after zero initialized & read only sections respectively. As per my understanding only start,end and length of "sec1" will be generated as symbols. Kindly specify syntax to get the intermediate address.
Hello,
To refer to the RO, RW and ZI components of the Execution Region the syntax is of the form Image$$<ER Name>$$<Component>$$<Base|Limit|Length>. For your example above you would want:
Image$$sec1$$RO$$Base
Image$$sec1$$RO$$Limit
Image$$sec1$$RO$$Length
Image$$sec1$$ZI$$Base
Image$$sec1$$ZI$$Limit
Image$$sec1$$ZI$$Length
A good reference in the documentation is the page ARM Compiler armlink User Guide : 6.4 Image$$ execution region symbols
I hope that answers your question.
thanks peter