<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.arm.com/utility/feedstylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Locating the RW and ZI load region</title><link>https://community.arm.com/developer/tools-software/tools/f/keil-forum/26546/locating-the-rw-and-zi-load-region</link><description> 
I&amp;#39;m wanting to create a code image with the layout: 

 

 1 - Startup/Bootstrap
 2 - Executable code
 3 - (probable gap)
 4 - Fixed location dispatch table
 5 - (probably gap)
 6 - Fixed location tables
 7 - (probable gap)
 8 - Fixed location text
</description><dc:language>en-US</dc:language><generator>Telligent Community 10</generator><item><title>RE: Locating the RW and ZI load region</title><link>https://community.arm.com/thread/136151?ContentTypeID=1</link><pubDate>Tue, 18 May 2010 22:35:30 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:e544c297-3ed1-49b9-9b8b-dbbae0c65470</guid><dc:creator>Non Keil Related</dc:creator><description>&lt;p&gt;&lt;p&gt;
Sorry, but I don&amp;#39;t think your understanding what I am saying.&lt;/p&gt;

&lt;p&gt;
I know how to locate the RW and ZI sections - It is quite
straightforward.&lt;/p&gt;

&lt;p&gt;
But ... The initialised data within the RW section is copied to
there by the scatter loader (just prior to entry of &amp;#39;main&amp;#39;) and it is
the section that I want to locate.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Locating the RW and ZI load region</title><link>https://community.arm.com/thread/126186?ContentTypeID=1</link><pubDate>Tue, 18 May 2010 14:28:06 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:7c4ef221-79b2-49e1-a915-d58a435cc9db</guid><dc:creator>Roger Ivie</dc:creator><description>&lt;p&gt;&lt;p&gt;
My example only executes in place because I can&amp;#39;t test it
otherwise. The key section is this:&lt;/p&gt;

&lt;pre&gt;

LR_2 0x04002000 0x00006000 {
  ER_RAM +0
  {
   .ANY (+RW +ZI)
  }
}

&lt;/pre&gt;

&lt;p&gt;
which creates a second load region at a specific address to hold
RW and ZI data.&lt;/p&gt;

&lt;p&gt;
It should be possible to configure this section to put the data
anywhere you want during execution using something like:&lt;/p&gt;

&lt;pre&gt;

LR_2 0x04002000 0x00006000 {
  ER_RAM ***address-goes-here***
  {
   .ANY (+RW +ZI)
  }
}

&lt;/pre&gt;

&lt;p&gt;
but I can&amp;#39;t test it.&lt;/p&gt;

&lt;p&gt;
The chunk of the linker manual you&amp;#39;ll want to look at is &amp;quot;Images
with a complex memory map&amp;quot;, which can be found under &amp;quot;About
scatter-loading&amp;quot; in the &amp;quot;Using Scatter-loading Description Files&amp;quot;
section.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Locating the RW and ZI load region</title><link>https://community.arm.com/thread/115759?ContentTypeID=1</link><pubDate>Tue, 18 May 2010 12:31:43 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:3008b3ba-c49a-4814-9d9b-fa4f3ee188fd</guid><dc:creator>Non Keil Related</dc:creator><description>&lt;p&gt;&lt;p&gt;
Unfortunately, that doesn&amp;#39;t do what I want.&lt;/p&gt;

&lt;p&gt;
The initial data (i.e., what would normally be compressed and
copied by the scatter loader) that would go into the RAM is copied
from an area in the ROM section. This section is the one I want to
locate.&lt;/p&gt;

&lt;p&gt;
I can find no name for it, no entry in the map file, nothing. The
documentation says it is automatically created, but there seems no
way to explicitly locate it.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Locating the RW and ZI load region</title><link>https://community.arm.com/thread/102180?ContentTypeID=1</link><pubDate>Tue, 18 May 2010 11:22:20 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:c72b2524-7996-4782-ab25-32a0dd780382</guid><dc:creator>Roger Ivie</dc:creator><description>&lt;p&gt;&lt;p&gt;
You should be able to do it using a .sct file with multiple load
regions. In the linker options, make certain &amp;quot;use memory layout
dialog&amp;quot; is unchecked and supply a section file something
like:&lt;/p&gt;

&lt;pre&gt;

LR_1 0x04008000 0x00010000  {
  ER_ROM +0
  {
   *.o (RESET, +First)
   *(InRoot$$Sections)
   .ANY (+RO)
  }
}
LR_2 0x04002000 0x00006000 {
  ER_RAM +0
  {
   .ANY (+RW +ZI)
  }
}

&lt;/pre&gt;

&lt;p&gt;
&lt;br /&gt;
This places a load region at 0x04008000 containing the read-only
sections and another at 0x04002000 containing the RW and ZI
sections.&lt;/p&gt;

&lt;p&gt;
In this example, they&amp;#39;re configured to execute in place; those are
convenient RAM locations for my current project. I&amp;#39;ve not tried
building one that moves the execution regions somewhere else, but
what do you want for a quick hack?&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Locating the RW and ZI load region</title><link>https://community.arm.com/thread/90426?ContentTypeID=1</link><pubDate>Tue, 18 May 2010 04:42:30 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:86d3de35-fcfb-4684-95fa-32bf93b7874d</guid><dc:creator>Non Keil Related</dc:creator><description>&lt;p&gt;&lt;p&gt;
Because I want it contained somewhere &lt;b&gt;within&lt;/b&gt; the image.&lt;/p&gt;

&lt;p&gt;
The start of the image is the bootstrap.&lt;/p&gt;

&lt;p&gt;
The end of the image is the fixed location text.&lt;/p&gt;

&lt;p&gt;
I need the image to be of a fixed/pre-determined size.&lt;/p&gt;

&lt;p&gt;
Historically, our releases have had copyright text and other
&lt;i&gt;useful&lt;/i&gt; information at the end of the image. This has proven to
be very useful for us (for example, when scanning a collection of
images on a PC) and I would like to maintain that pattern.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Locating the RW and ZI load region</title><link>https://community.arm.com/thread/58194?ContentTypeID=1</link><pubDate>Tue, 18 May 2010 04:23:10 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:5da980e1-d7c8-496c-8f53-bcb954bce008</guid><dc:creator>Tamir Michael</dc:creator><description>&lt;p&gt;&lt;p&gt;
Why do you want to move them?&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>