<?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>Address Space overflow</title><link>https://community.arm.com/developer/tools-software/tools/f/keil-forum/30359/address-space-overflow</link><description> 
I am using 8051F120 having 127KB Program memory, theoretically. I
have written 4 *.C files residing in each bank. The length of the
code in Bank1 and Bank2 is less than 32KB (observing the list file).
But, instead of this, the linker gives an address</description><dc:language>en-US</dc:language><generator>Telligent Community 10</generator><item><title>RE: Address Space overflow</title><link>https://community.arm.com/thread/158191?ContentTypeID=1</link><pubDate>Wed, 02 May 2012 06:46:45 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:fea7fe80-294d-473d-9b68-f5e6e33bc01c</guid><dc:creator>Frustrated Consultant</dc:creator><description>&lt;p&gt;&lt;p&gt;
&lt;i&gt;go by the SILabs appnote, it is crystal clear&lt;/i&gt;&lt;/p&gt;

&lt;p&gt;
I&amp;#39;ll take your word for it :)&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Address Space overflow</title><link>https://community.arm.com/thread/158168?ContentTypeID=1</link><pubDate>Wed, 02 May 2012 06:25:26 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:f56ce41f-6863-4c08-b9c7-98c4432d98f4</guid><dc:creator>&amp;#178;erik malund</dc:creator><description>&lt;p&gt;&lt;p&gt;
&lt;i&gt;But, in my opinion, there should be a document produced by the
chip vendor stating this.&lt;/i&gt;&lt;br /&gt;
well, SILabs does&lt;/p&gt;

&lt;p&gt;
&lt;i&gt;The Keil documentation relating to banking is reasonably good
and:&lt;/i&gt;&lt;br /&gt;
but is somewhat invalid for the SILabs (and other?) chips with
&amp;quot;internal banking&amp;quot;&lt;/p&gt;

&lt;p&gt;
go by the SILabs appnote, it is crystal clear&lt;/p&gt;

&lt;p&gt;
Erik&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Address Space overflow</title><link>https://community.arm.com/thread/158132?ContentTypeID=1</link><pubDate>Tue, 01 May 2012 22:33:22 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:b94ee8f0-f0e3-4902-9fc5-84945a1a0e7f</guid><dc:creator>Frustrated Consultant</dc:creator><description>&lt;p&gt;&lt;p&gt;
&lt;i&gt;But, in my opinion, there should be a document produced by the
chip vendor stating this.&lt;/i&gt;&lt;/p&gt;

&lt;p&gt;
Though it might be helpful if the chip vendor produced application
notes or other documentation relating to such things, I don&amp;#39;t think
it is really something that they &lt;i&gt;should&lt;/i&gt; be expected to do.
Which compiler vendors would they document for? Where would they
stop?&lt;/p&gt;

&lt;p&gt;
The Keil documentation relating to banking is reasonably good
and:&lt;/p&gt;

&lt;p&gt;
&lt;a href="http://www.keil.com/support/man/docs/bl51/bl51_codebanking.htm"&gt;http://www.keil.com/support/man/docs/bl51/bl51_codebanking.htm&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;
It just requires the reader to have an appreciation of what it is
trying to achieve and what is possible.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Address Space overflow</title><link>https://community.arm.com/thread/155210?ContentTypeID=1</link><pubDate>Tue, 01 May 2012 21:09:50 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:059bd5fe-6a79-4aec-a0eb-ffa9230f0abb</guid><dc:creator>Ash J</dc:creator><description>&lt;p&gt;&lt;p&gt;
Dear Hans-Bernhard Broeker,&lt;br /&gt;
Thank you for clearing the air. But, in my opinion, there should be a
document produced by the chip vendor stating this. A newbie may not
understand this, the very first time he is using the IC, or may not
have a clear picture unless he faces a problem like me.&lt;/p&gt;

&lt;p&gt;
Dhaval&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Address Space overflow</title><link>https://community.arm.com/thread/127479?ContentTypeID=1</link><pubDate>Mon, 30 Apr 2012 14:24:06 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:a64af401-04fb-4b38-a16c-12f93a6e2e41</guid><dc:creator>HansBernhard Broeker</dc:creator><description>&lt;p&gt;&lt;p&gt;
&lt;i&gt;This is a back dated project, on which a lot of development has
been done. And changing the platform now would consume a lot of time
as well as cost.&lt;/i&gt;&lt;/p&gt;

&lt;p&gt;
The problem with that argument is that changing from an ordinary
&amp;#39;51 to a 128 KiB banked configuration is to quite some extent just
the thing you say you want to avoid: a change of platform.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Address Space overflow</title><link>https://community.arm.com/thread/154791?ContentTypeID=1</link><pubDate>Mon, 30 Apr 2012 14:21:10 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:7ce539b3-3ead-4864-aa57-6175a21e6ee4</guid><dc:creator>HansBernhard Broeker</dc:creator><description>&lt;p&gt;&lt;p&gt;
&lt;i&gt;But i still Fail to understand&lt;/i&gt;&lt;/p&gt;

&lt;p&gt;
&lt;i&gt;The starting address of each bank = End address of common bank
+ 1&lt;/i&gt;&lt;/p&gt;

&lt;p&gt;
&lt;i&gt;This should not happen, ideally.&lt;/i&gt;&lt;/p&gt;

&lt;p&gt;
On the contrary: that &lt;b&gt;must&lt;/b&gt; happen. Your believing otherwise
indicates you don&amp;#39;t really understand how banking works.&lt;/p&gt;

&lt;p&gt;
The common bank is called a &amp;quot;common bank&amp;quot; because it contains the
material that has to be commonly accessible to code in &lt;b&gt;all&lt;/b&gt;
banks. The only way that can work is if the entire address range of
the common bank is reserved and kept available, regardless which
other banks are mapped. In a scheme like SiLabs&amp;#39;, with a 32KiB+32KiB
hardwired bank mapping, the only way the common bank can become
bigger than 32 KiB is if all bytes beyond the 32 KiB boundary are
copied to all 3 &amp;quot;upper&amp;quot; banks, so they&amp;#39;ll be accessible regardless
which of the upper banks is currently active.&lt;/p&gt;

&lt;p&gt;
I think your real problem was that in your original configuration
you placed too much stuff into the common bank yourself, causing this
spill-over mechanism to be triggered.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Address Space overflow</title><link>https://community.arm.com/thread/148635?ContentTypeID=1</link><pubDate>Mon, 30 Apr 2012 03:52:18 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:a9ae4b46-b770-4fe5-b3a2-d2b88963d62e</guid><dc:creator>Ash J</dc:creator><description>&lt;p&gt;&lt;p&gt;
Dear,&lt;br /&gt;
I already highlighted&lt;br /&gt;
&lt;i&gt;... Cortex-M3 is used for all the new project development. ...
Never the less, I would also, as my personal opinion, always work
with latest controllers and technology.&lt;/i&gt; .&lt;/p&gt;

&lt;p&gt;
I am glad that Keil has provided the feature &amp;quot;Optimization: Level
10: Rearrange Code (Linker Optimization) &amp;quot;. I mean they should, to be
the best IDE software developers. Respect.&lt;/p&gt;

&lt;p&gt;
But i still Fail to understand&lt;/p&gt;

&lt;pre&gt;
&lt;i&gt;The starting address of each bank = End address of common bank + 1&lt;/i&gt;
&lt;/pre&gt;

&lt;p&gt;
This should not happen, ideally.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Address Space overflow</title><link>https://community.arm.com/thread/148585?ContentTypeID=1</link><pubDate>Mon, 30 Apr 2012 03:24:56 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:93464a25-7b6b-47ec-aa5d-af622cb23e38</guid><dc:creator>Frustrated Consultant</dc:creator><description>&lt;p&gt;&lt;p&gt;
Glad to see you&amp;#39;ve got it going.&lt;/p&gt;

&lt;p&gt;
Regardless of what anyone else might say about banking, I think
what Keil did to provide the mechanism is really pretty smart.
Certainly for the application I used it on, the results were
perfectly acceptable; in terms of development time, reliablility and
end product costs. And, after the initial learning curve in getting
it going, the fact that we were using banking was virtually forgotten
about.&lt;/p&gt;

&lt;p&gt;
That said, for any &lt;i&gt;new&lt;/i&gt; projects, I would recommend you keep
an open mind and consider something different.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Address Space overflow</title><link>https://community.arm.com/thread/148479?ContentTypeID=1</link><pubDate>Mon, 30 Apr 2012 03:09:20 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:39b6f6ae-40b9-4f98-9650-9aa9d52af08c</guid><dc:creator>Ash J</dc:creator><description>&lt;p&gt;&lt;p&gt;
Dear All,&lt;br /&gt;
If in case you find my observations wrong, or have any other
solution, kindly inform me.&lt;/p&gt;

&lt;p&gt;
Thank you for all the necessary help, guidance and valuable time
you provided. Learnt a lot.&lt;br /&gt;
Hope the observations and conclusions helps other newbies to solve
the problems related to &amp;#39;Code Banking&amp;#39; and &amp;#39;Address Space
Overflow&amp;#39;.&lt;/p&gt;

&lt;p&gt;
Regards,&lt;br /&gt;
Dhaval Solanki&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Address Space overflow</title><link>https://community.arm.com/thread/148248?ContentTypeID=1</link><pubDate>Mon, 30 Apr 2012 02:57:24 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:46b91beb-ea94-4875-8f27-f194acdf81b6</guid><dc:creator>Ash J</dc:creator><description>&lt;p&gt;&lt;p&gt;
OOps! Made a mistake in addition in my previous post.&lt;/p&gt;

&lt;p&gt;
987A + 7 = 9881&lt;/p&gt;

&lt;p&gt;
Sorry.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Address Space overflow</title><link>https://community.arm.com/thread/147788?ContentTypeID=1</link><pubDate>Mon, 30 Apr 2012 02:54:39 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:5f5e8727-5e51-45a7-b1c7-a4d9a18d4969</guid><dc:creator>Ash J</dc:creator><description>&lt;p&gt;&lt;p&gt;
My observations, conclusions and Solution to Address Space
Overflow&lt;/p&gt;

&lt;pre&gt;
* * * * * * *   C O D E   M E M O R Y   * * * * * * *
CODE    0000H     0003H     ABSOLUTE
CODE    0003H     0007H     UNIT
        000AH     0001H                  *** GAP ***
  .       .         .        .
  .       .         .        .
  .       .         .        .
  .       .         .        .
CODE    97F5H     001FH     UNIT
CODE    9814H     001EH     UNIT
CODE    9832H     0012H     UNIT
CODE    9844H     0010H     UNIT
CODE    9854H     000BH     UNIT
CODE    985FH     000AH     UNIT
CODE    9869H     000AH     UNIT
CODE    9873H     0007H     UNIT
CODE    987AH     0007H     UNIT     &lt;i&gt; end address = starting address of function + length &lt;/i&gt;&lt;b&gt;Refer NOTE&lt;/b&gt;
                                     &lt;i&gt; end address = 987A + 7 = 9981 &lt;/i&gt;
* * * * * * *   C O D E   B A N K   1   * * * * * * *
        0000H     9881H                  *** GAP ***    &lt;b&gt;Refer NOTE&lt;/b&gt;
BANK1   9881H     1D5BH     UNIT
BANK1   B5DCH     1756H     UNIT
BANK1   CD32H     0D51H     UNIT
BANK1   DA83H     0623H     UNIT
BANK1   E0A6H     05DDH     UNIT
BANK1   E683H     0541H     UNIT
BANK1   EBC4H     044EH     UNIT
BANK1   F012H     03D7H     UNIT
BANK1   F3E9H     03BCH     UNIT
BANK1   F7A5H     033AH     UNIT
BANK1   FADFH     0322H     UNIT
BANK1   FE01H     01B4H     UNIT
BANK1   FFB5H     004BH     UNIT

* * * * * * *   C O D E   B A N K   2   * * * * * * *
        0000H     9881H                  *** GAP ***     &lt;b&gt;Refer NOTE&lt;/b&gt;
BANK2   9881H     03CCH     UNIT
BANK2   9C4DH     02A7H     UNIT
BANK2   9EF4H     02A7H     UNIT
BANK2   A19BH     0205H     UNIT
BANK2   A3A0H     0175H     UNIT
BANK2   A515H     00F6H     UNIT
BANK2   A60BH     00B2H     UNIT
BANK2   A6BDH     0079H     UNIT
BANK2   A736H     0053H     UNIT

* * * * * * *   C O D E   B A N K   3   * * * * * * *
        0000H     9881H                  *** GAP ***      &lt;b&gt;Refer NOTE&lt;/b&gt;
BANK3   9881H     06ECH     UNIT
BANK3   9F6DH     0220H     UNIT

&lt;/pre&gt;

&lt;p&gt;
The following is my conclusion.&lt;/p&gt;

&lt;p&gt;
&lt;b&gt;NOTE&lt;/b&gt;: The starting address of each bank = End address of
common bank + 1&lt;/p&gt;

&lt;p&gt;
When I shifted some piece of the code from common bank into other
banks, I found that the starting address of each bank in the M51 file
(A part of which i have shown above), changed.&lt;/p&gt;

&lt;p&gt;
However, a very good solution is change the Code Optimization
level to Level10. Go to:&lt;/p&gt;

&lt;pre&gt;
Project -&amp;gt; Tool Chain Integration -&amp;gt; Compiler (Tab) -&amp;gt; Customize -&amp;gt; Optimization -&amp;gt; Level
&lt;/pre&gt;

&lt;p&gt;
&lt;br /&gt;
Select &amp;quot;Level 10: Rearrange Code (Linker Optimization)&amp;quot;.&lt;br /&gt;
Save Project and click on &amp;quot;Rebuild&amp;quot; or press &amp;quot;Ctrl + Shift + F7&amp;quot;
keys.&lt;/p&gt;

&lt;p&gt;
Now write your code in any bank without worrying about linking.
The linker will take care of everything. It rearranges the code in
each bank and hence will generate the hex file with minimum code
size.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Address Space overflow</title><link>https://community.arm.com/thread/145314?ContentTypeID=1</link><pubDate>Mon, 30 Apr 2012 01:26:54 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:d24f3779-8c45-4fec-86b5-209bc3893ab6</guid><dc:creator>Dejan Durdenic</dc:creator><description>&lt;p&gt;&lt;p&gt;
Just a hint - C51 linker does not show composite CODE+CONSTANT
size. So, your BANK1 module&lt;br /&gt;
takes 32745 bytes of CODE + 1850 bytes of CONSTANT space which
together gives more than 32768 bytes. Try to solve BANK1 and BANK2
sizes first...&lt;/p&gt;

&lt;p&gt;
- Dejan&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Address Space overflow</title><link>https://community.arm.com/thread/146842?ContentTypeID=1</link><pubDate>Mon, 30 Apr 2012 01:15:09 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:7f5bbfab-73a4-43f5-aa5b-57d0eb4fe033</guid><dc:creator>Frustrated Consultant</dc:creator><description>&lt;p&gt;&lt;p&gt;
I think you need to examine details relating to the &amp;#39;common area&amp;#39;.
I suspect the common code might be being placed at the start of each
bank.&lt;/p&gt;

&lt;p&gt;
You mention that the datasheet specifies:&lt;/p&gt;

&lt;pre&gt;
Common Bank Area:  0000H to 8000H
Bank1 Area:        8000H to FFFFH
Bank2 Area:        8000H to FFFFH
Bank3 Area:        8000H to F7FFH
&lt;/pre&gt;

&lt;p&gt;
But, there is no specification of the common area in the linker
invocation.&lt;/p&gt;

&lt;p&gt;
For example, my old project (which seems to have similarities to
your memory layout) has a linker invocation containing:&lt;/p&gt;

&lt;pre&gt;
BANKAREA (0X8000, 0XFFEF) RAMSIZE (256) DISABLEWARNING (16) &lt;b&gt;CODE (0X0000-0X7FFF)&lt;/b&gt; XDATA (0X0000-0XFFFF)
&lt;/pre&gt;

&lt;p&gt;
Note the &amp;#39;code&amp;#39; which I did not see in your linker invocation.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Address Space overflow</title><link>https://community.arm.com/thread/146843?ContentTypeID=1</link><pubDate>Mon, 30 Apr 2012 00:57:49 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:9fd0b097-d4ac-4d35-b2ad-4604f6b6fa4b</guid><dc:creator>Frustrated Consultant</dc:creator><description>&lt;p&gt;&lt;p&gt;
&lt;i&gt;What type of Parameters are you referring to? Can you give an
example?&lt;/i&gt;&lt;/p&gt;

&lt;p&gt;
No. That&amp;#39;s why you need to look at the settings carefully. There&amp;#39;s
obviously something missing or incorrect, otherwise it would be
producing the output you expect.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Address Space overflow</title><link>https://community.arm.com/thread/145303?ContentTypeID=1</link><pubDate>Mon, 30 Apr 2012 00:43:47 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:e5d1b526-e13f-49f5-89dd-502602d6ee82</guid><dc:creator>Ash J</dc:creator><description>&lt;p&gt;&lt;p&gt;
The following extract from M51:&lt;/p&gt;

&lt;pre&gt;
BL51 BANKED LINKER/LOCATER V6.05, INVOKED BY:
C:\KEIL\C51\BIN\BL51.EXE
D:\dhaval&amp;#39;s disso\DissoVer4.41C_i2c\common.obj, D:\dhaval&amp;#39;s disso\DissoVer4.41C_i2c\L51_BANK.obj, BANK1
{D:\dhaval&amp;#39;s disso\DissoVer4.41C_i2c\main.obj}, BANK3
{D:\dhaval&amp;#39;s disso\DissoVer4.41C_i2c\screens.obj}, D:\dhaval&amp;#39;s disso\DissoVer4.41C_i2c\STARTUP.obj, BANK2
{D:\dhaval&amp;#39;s disso\DissoVer4.41C_i2c\menu.obj} TO D:\dhaval&amp;#39;s disso\DissoVer4.41C_i2c\TDT08L

RS (256) PL (68) PW (78) BANKAREA (8000H, 0FFFFH)
&lt;/pre&gt;

&lt;p&gt;
&lt;i&gt;So, the simplistic view would be that your banked code should
start at 0x8000, but you need to check other parameters that might
cause it to be starting further up.&lt;/i&gt;&lt;/p&gt;

&lt;p&gt;
What type of Parameters are you referring to? Can you give an
example?&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Address Space overflow</title><link>https://community.arm.com/thread/145298?ContentTypeID=1</link><pubDate>Mon, 30 Apr 2012 00:41:25 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:71f6f81a-d8ab-4808-9b9f-6f96b26f4308</guid><dc:creator>Frustrated Consultant</dc:creator><description>&lt;p&gt;&lt;p&gt;
Set the option to produce a linker map file, enable everything, do
a rebuild (if necessary) and look for the information at the start
that begins with something like:&lt;/p&gt;

&lt;pre&gt;
BL51 BANKED LINKER/LOCATER V5.03, INVOKED BY:
C:\KEIL\C51\BIN\BL51.EXE BANK1 {.....etc.......}
&lt;/pre&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Address Space overflow</title><link>https://community.arm.com/thread/143150?ContentTypeID=1</link><pubDate>Mon, 30 Apr 2012 00:35:46 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:88fb4a96-8c4c-4366-bc68-eeabc4259e5f</guid><dc:creator>Ash J</dc:creator><description>&lt;p&gt;&lt;pre&gt;
Keil Compiler Options:
Under Listing:
Marked Check boxes:
 1. Generate .lst file
 2. Include Conditional code

Warnings: Level 2

Optimization Level:
Level 10 [Rearrange Code (Linker Optimization)]
Emphasis Favor Small Code

Memory Model:
Variable Location:
Large: XDATA
Code Size Limits: 64K Functions


Keil Linker Options:
Under Linking:
Marked Check boxes:
 1. Enable Variable Overlaying

RAM Size: 256
Selected Processor: C8051F120

&lt;/pre&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Address Space overflow</title><link>https://community.arm.com/thread/143157?ContentTypeID=1</link><pubDate>Mon, 30 Apr 2012 00:25:22 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:0c521c67-dc9c-46d9-93a5-23b7564311c6</guid><dc:creator>Frustrated Consultant</dc:creator><description>&lt;p&gt;&lt;p&gt;
The tool chain information is better, but I think that the
information in the map file would be the most certain way of looking
at the settings.&lt;/p&gt;

&lt;p&gt;
For example, in an old project of mine, the map file produced by
the linker has a block of text that starts:&lt;/p&gt;

&lt;pre&gt;
BL51 BANKED LINKER/LOCATER V5.03, INVOKED BY:
C:\KEIL\C51\BIN\BL51.EXE BANK1 {.....etc.......}
&lt;/pre&gt;

&lt;p&gt;
The link settings used at time of the linker invokation should
show what details are being specified for the common and banking
details.&lt;/p&gt;

&lt;p&gt;
We can see from your details:&lt;/p&gt;

&lt;pre&gt;
BANKAREA(8000H,0FFFFH)
&lt;/pre&gt;

&lt;p&gt;
So, the simplistic view would be that your banked code should
start at 0x8000, but you need to check other parameters that might
cause it to be starting further up.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Address Space overflow</title><link>https://community.arm.com/thread/140232?ContentTypeID=1</link><pubDate>Mon, 30 Apr 2012 00:13:24 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:7519de51-3207-4b7e-8c8f-03435b3cc445</guid><dc:creator>Ash J</dc:creator><description>&lt;p&gt;&lt;p&gt;
To Reluctant Consultant.&lt;br /&gt;
1. &lt;i&gt;What I think would be more useful is the detail relating to the
information provided to the linker.&lt;/i&gt;&lt;br /&gt;
Are you referring to the following information:&lt;/p&gt;

&lt;pre&gt;
Tool Chain Integration (window in SiLabs)
Tool Vendor: Keil

Assembler Tab:
   Command Line Flags:
      XR GEN DB EP NOMOD51.

Compiler Tab:
   Command Line Flags:
      DB OE BR OR OT(8,Size) Large.

Linker Tab:
   Command Line Flags:
      RS(256) PL(68) PW(78) BANKAREA(8000H,0FFFFH).
&lt;/pre&gt;

&lt;p&gt;
2. &lt;i&gt;What you need to look at are the specifications relating to
the common and the banked areas.&lt;/i&gt;&lt;br /&gt;
Kindly elaborate, what I need to look at. I mean to say, I didn&amp;#39;t
exactly understand this line.&lt;/p&gt;

&lt;p&gt;
The datasheet specifications:&lt;/p&gt;

&lt;pre&gt;
Common Bank Area:  0000H to 8000H
Bank1 Area:        8000H to FFFFH
Bank2 Area:        8000H to FFFFH
Bank3 Area:        8000H to F7FFH
&lt;/pre&gt;

&lt;p&gt;
&lt;br /&gt;
1KB of Address reserved in Bank3 (F800H to FFFFH).&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Address Space overflow</title><link>https://community.arm.com/thread/130999?ContentTypeID=1</link><pubDate>Sun, 29 Apr 2012 22:39:20 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:873256d4-efef-42bf-9111-652fe99cf548</guid><dc:creator>Frustrated Consultant</dc:creator><description>&lt;p&gt;&lt;p&gt;
You talk about information &amp;#39;as stated in the datasheets&amp;#39;. I don&amp;#39;t
follow that part. The linker does not know (or read) the datasheets
so it has to rely on what is provided to it.&lt;/p&gt;

&lt;p&gt;
Though quite interesting, the result of the linkage is probably
not the best information to provide.&lt;/p&gt;

&lt;p&gt;
What I think would be more useful is the detail relating to the
information provided &lt;b&gt;to&lt;/b&gt; the linker.&lt;/p&gt;

&lt;p&gt;
Depending upon your listing settings, this information can be
given at the start of the map file.&lt;/p&gt;

&lt;p&gt;
What you need to look at are the specifications relating to the
common and the banked areas.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Address Space overflow</title><link>https://community.arm.com/thread/127489?ContentTypeID=1</link><pubDate>Sun, 29 Apr 2012 21:43:48 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:ea717b46-3070-488e-bf1a-9a0127c29115</guid><dc:creator>Ash J</dc:creator><description>&lt;p&gt;&lt;pre&gt;
******** File1.lst file extracts ***********
******** Common Bank ***********
MODULE INFORMATION:   STATIC OVERLAYABLE
   CODE SIZE        =  21521    ----
   CONSTANT SIZE    =   2318    ----
   XDATA SIZE       =    165      38
   PDATA SIZE       =   ----    ----
   DATA SIZE        =   ----    ----
C51 COMPILER V8.06   COMMON                                                                04/28/2012 12:10:22 PAGE 72
   IDATA SIZE       =   ----    ----
   BIT SIZE         =      5    ----
END OF MODULE INFORMATION.

******** File2.lst file extracts ***********
******** Bank 1 ***********
MODULE INFORMATION:   STATIC OVERLAYABLE
   CODE SIZE        =  32745    ----
   CONSTANT SIZE    =   1850    ----
   XDATA SIZE       =   2469      34
   PDATA SIZE       =   ----    ----
   DATA SIZE        =   ----    ----
   IDATA SIZE       =   ----    ----
   BIT SIZE         =    122    ----
END OF MODULE INFORMATION.
C51 COMPILATION COMPLETE.  0 WARNING(S),  0 ERROR(S)

******** File3.lst file extracts ***********
******** Bank 2 ***********
MODULE INFORMATION:   STATIC OVERLAYABLE
   CODE SIZE        =  34208    ----
   CONSTANT SIZE    =   3569    ----
   XDATA SIZE       =     34       7
   PDATA SIZE       =   ----    ----
   DATA SIZE        =   ----    ----
   IDATA SIZE       =   ----    ----
   BIT SIZE         =      1    ----
END OF MODULE INFORMATION.
C51 COMPILATION COMPLETE.  0 WARNING(S),  0 ERROR(S)

******** File3.lst file extracts *********
******** Bank 3 **********
MODULE INFORMATION:   STATIC OVERLAYABLE
   CODE SIZE        =   2316    ----
   CONSTANT SIZE    =   5952    ----
   XDATA SIZE       =    164    ----
   PDATA SIZE       =   ----    ----
   DATA SIZE        =   ----    ----
   IDATA SIZE       =   ----    ----
   BIT SIZE         =   ----    ----
END OF MODULE INFORMATION.
C51 COMPILATION COMPLETE.  0 WARNING(S),  0 ERROR(S)

NOTE1: I know that the file size (in BANK2) is greater than 32KB, but than the linker should not show address space overflow in &amp;#39;BANK1&amp;#39;.
*** ERROR L107:
    ADDRESS SPACE OVERFLOW SPACE: BANK1

*** ERROR L107:
    ADDRESS SPACE OVERFLOW SPACE: BANK2

Below are the extracts of M51 file:
            TYPE    BASE      LENGTH    RELOCATION   SEGMENT NAME
 * * * * * * *   C O D E   B A N K   1   * * * * * * *
                    0000H     9881H                  *** GAP ***       &lt;b&gt;NOTE2&lt;/b&gt;
            BANK1   9881H     1D5BH     UNIT
            BANK1   B5DCH     1756H     UNIT
            BANK1   CD32H     0D51H     UNIT
            BANK1   DA83H     0623H     UNIT
            BANK1   E0A6H     05DDH     UNIT
            BANK1   E683H     0541H     UNIT
            BANK1   EBC4H     044EH     UNIT
            BANK1   F012H     03D7H     UNIT
            BANK1   F3E9H     03BCH     UNIT
            BANK1   F7A5H     033AH     UNIT
            BANK1   FADFH     0322H     UNIT
            BANK1   FE01H     01B4H     UNIT
            BANK1   FFB5H     004BH     UNIT

            * * * * * * *   C O D E   B A N K   2   * * * * * * *
                    0000H     9881H                  *** GAP ***        &lt;b&gt;NOTE2&lt;/b&gt;
            BANK2   9881H     03CCH     UNIT
            BANK2   9C4DH     02A7H     UNIT
            BANK2   9EF4H     02A7H     UNIT
            BANK2   A19BH     0205H     UNIT
            BANK2   A3A0H     0175H     UNIT
BL51 BANKED LINKER/LOCATER V6.05            04/30/2012  09:54:32  PAGE 5

            BANK2   A515H     00F6H     UNIT
            BANK2   A60BH     00B2H     UNIT
            BANK2   A6BDH     0079H     UNIT
            BANK2   A736H     0053H     UNIT

            * * * * * * *   C O D E   B A N K   3   * * * * * * *
                    0000H     9881H                  *** GAP ***
            BANK3   9881H     06ECH     UNIT
            BANK3   9F6DH     0220H     UNIT

&lt;b&gt;NOTE2&lt;/b&gt;: Why does Bank start from 9981H and not from 8000H as stated in the datasheets?
Prior to latest compilation, the starting address was A185H. And during that compilation,

&lt;b&gt;the size of code overflowing + starting address = bank size&lt;/b&gt;

&lt;/pre&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Address Space overflow</title><link>https://community.arm.com/thread/116806?ContentTypeID=1</link><pubDate>Sun, 29 Apr 2012 21:34:11 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:7bb3e819-b404-4130-9d54-c48d0c7b64e6</guid><dc:creator>Ash J</dc:creator><description>&lt;p&gt;&lt;p&gt;
Wooohoo hooooo.......guys wait. Please Relax and chill.&lt;br /&gt;
Dear Andrew and Reluctant Consultant, I think we got diverted from
the main topic.&lt;/p&gt;

&lt;p&gt;
To Andrew and Reluctant Consultant, I have knowledge on Cortex-M3
and Cortex-M3 is used for all the new project development. This is a
back dated project, on which a lot of development has been done. And
changing the platform now would consume a lot of time as well as
cost. Hence, my project manager will be negative on changing of
platform.&lt;br /&gt;
Never the less, I would also, as my personal opinion, always work
with latest controllers and technology. But, that&amp;#39;s not in my hand.
I&amp;#39;ll have to get a break through on the existing problem.&lt;/p&gt;

&lt;p&gt;
Coming back to our issue....&lt;br /&gt;
Dear Dejan Durdenic, I have already read that datasheet (don&amp;#39;t mean
to sound rude or arrogant). Hence will you kindly highlight the exact
paragraph, that gives the solution to my problem. I have read a lot
of material on net, blogs and PDF&amp;#39;s (For past 2 days, I am doing
that).&lt;/p&gt;

&lt;p&gt;
Below are the details:&lt;/p&gt;

&lt;p&gt;
******** File1.lst file extracts ***********&lt;br /&gt;
******** Common Bank ***********&lt;br /&gt;
MODULE INFORMATION: STATIC OVERLAYABLE CODE SIZE = 21521 ----
CONSTANT SIZE = 2318 ---- XDATA SIZE = 165 38 PDATA SIZE = ---- ----
DATA SIZE = ---- ----&lt;br /&gt;
C51 COMPILER V8.06 COMMON 04/28/2012 12:10:22 PAGE 72&lt;/p&gt;

&lt;p&gt;
IDATA SIZE = ---- ---- BIT SIZE = 5 ----&lt;br /&gt;
END OF MODULE INFORMATION.&lt;br /&gt;
C51 COMPILATION COMPLETE. 0 WARNING(S), 0 ERROR(S)&lt;/p&gt;

&lt;p&gt;
******** File2.lst file extracts ***********&lt;br /&gt;
******** Bank 1 ***********&lt;br /&gt;
MODULE INFORMATION: STATIC OVERLAYABLE CODE SIZE = 32745 ----
CONSTANT SIZE = 1850 ---- XDATA SIZE = 2469 34 PDATA SIZE = ---- ----
DATA SIZE = ---- ---- IDATA SIZE = ---- ---- BIT SIZE = 122 ----&lt;br /&gt;
END OF MODULE INFORMATION.&lt;br /&gt;
C51 COMPILATION COMPLETE. 0 WARNING(S), 0 ERROR(S)&lt;/p&gt;

&lt;p&gt;
******** File3.lst file extracts ***********&lt;br /&gt;
******** Bank 2 ***********&lt;br /&gt;
MODULE INFORMATION: STATIC OVERLAYABLE CODE SIZE = 34208 ---- **refer
the &lt;b&gt;NOTE1&lt;/b&gt; below. CONSTANT SIZE = 3569 ---- XDATA SIZE = 34 7
PDATA SIZE = ---- ---- DATA SIZE = ---- ---- IDATA SIZE = ---- ----
BIT SIZE = 1 ----&lt;br /&gt;
END OF MODULE INFORMATION.&lt;br /&gt;
C51 COMPILATION COMPLETE. 0 WARNING(S), 0 ERROR(S)&lt;/p&gt;

&lt;p&gt;
******** File3.lst file extracts *********&lt;br /&gt;
******** Bank 3 **********&lt;br /&gt;
MODULE INFORMATION: STATIC OVERLAYABLE CODE SIZE = 2316 ---- CONSTANT
SIZE = 5952 ---- XDATA SIZE = 164 ---- PDATA SIZE = ---- ---- DATA
SIZE = ---- ---- IDATA SIZE = ---- ---- BIT SIZE = ---- ----&lt;br /&gt;
END OF MODULE INFORMATION.&lt;br /&gt;
C51 COMPILATION COMPLETE. 0 WARNING(S), 0 ERROR(S)&lt;/p&gt;

&lt;p&gt;
&lt;b&gt;NOTE1&lt;/b&gt;: I know that the file size (in BANK2) is greater than
32KB, but than the linker should not show address space overflow in
&amp;#39;BANK1&amp;#39;.&lt;br /&gt;
*** ERROR L107: ADDRESS SPACE OVERFLOW SPACE: BANK1&lt;/p&gt;

&lt;p&gt;
*** ERROR L107: ADDRESS SPACE OVERFLOW SPACE: BANK2&lt;/p&gt;

&lt;p&gt;
Below are the extracts of M51 file: TYPE BASE LENGTH RELOCATION
SEGMENT NAME&lt;br /&gt;
* * * * * * * C O D E B A N K 1 * * * * * * * 0000H 9881H *** GAP ***
&lt;b&gt;NOTE2&lt;/b&gt; BANK1 9881H 1D5BH UNIT BANK1 B5DCH 1756H UNIT BANK1
CD32H 0D51H UNIT BANK1 DA83H 0623H UNIT BANK1 E0A6H 05DDH UNIT BANK1
E683H 0541H UNIT BANK1 EBC4H 044EH UNIT BANK1 F012H 03D7H UNIT BANK1
F3E9H 03BCH UNIT BANK1 F7A5H 033AH UNIT BANK1 FADFH 0322H UNIT BANK1
FE01H 01B4H UNIT BANK1 FFB5H 004BH UNIT&lt;/p&gt;

&lt;p&gt;
* * * * * * * C O D E B A N K 2 * * * * * * * 0000H 9881H *** GAP
*** &lt;b&gt;NOTE2&lt;/b&gt; BANK2 9881H 03CCH UNIT BANK2 9C4DH 02A7H UNIT BANK2
9EF4H 02A7H UNIT BANK2 A19BH 0205H UNIT BANK2 A3A0H 0175H UNIT&lt;br /&gt;
BL51 BANKED LINKER/LOCATER V6.05 04/30/2012 09:54:32 PAGE 5&lt;/p&gt;

&lt;p&gt;
BANK2 A515H 00F6H UNIT BANK2 A60BH 00B2H UNIT BANK2 A6BDH 0079H
UNIT BANK2 A736H 0053H UNIT&lt;/p&gt;

&lt;p&gt;
* * * * * * * C O D E B A N K 3 * * * * * * * 0000H 9881H *** GAP
*** &lt;b&gt;NOTE2&lt;/b&gt; BANK3 9881H 06ECH UNIT BANK3 9F6DH 0220H UNIT&lt;/p&gt;

&lt;p&gt;
&lt;b&gt;NOTE2&lt;/b&gt;: Why does Bank start from 9981H and not from 8000H as
stated in the datasheets?&lt;br /&gt;
Prior to latest compilation, the starting address was A185H. And
during that compilation,&lt;/p&gt;

&lt;p&gt;
the size of code overflowing + starting address = bank size&lt;/p&gt;

&lt;p&gt;
I fail to understand, why the starting address is not &amp;#39;8000H&amp;#39; as
it should be?&lt;br /&gt;
Kindly assist.&lt;/p&gt;

&lt;p&gt;
Dhaval&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Address Space overflow</title><link>https://community.arm.com/thread/116807?ContentTypeID=1</link><pubDate>Sun, 29 Apr 2012 09:20:53 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:fe3a80ca-2b62-4394-8f5c-d4375524fe9e</guid><dc:creator>Frustrated Consultant</dc:creator><description>&lt;p&gt;&lt;p&gt;
&lt;i&gt;But this is a discussion forum - not the Real World...&lt;/i&gt;&lt;/p&gt;

&lt;p&gt;
And would you like to say how much time do &lt;b&gt;you&lt;/b&gt; spend on
forums?&lt;/p&gt;

&lt;p&gt;
Nah, probably best if you don&amp;#39;t.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Address Space overflow</title><link>https://community.arm.com/thread/119690?ContentTypeID=1</link><pubDate>Sun, 29 Apr 2012 09:20:49 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:4957df4b-61b5-4882-b9cf-a031fe6af7ea</guid><dc:creator>Ashley Madison</dc:creator><description>&lt;p&gt;&lt;p&gt;
&lt;i&gt;Maybe a competitor for the Petnium?&lt;/i&gt;&lt;/p&gt;

&lt;p&gt;
That sounds more likely, :)&lt;/p&gt;

&lt;p&gt;
&lt;i&gt;But this is a discussion forum - not the Real World...&lt;/i&gt;&lt;/p&gt;

&lt;p&gt;
More precisely, this is a discussion forum for real people talking
about issues in the real world.&lt;/p&gt;

&lt;p&gt;
If you wish to talk about fantasy, I am sure there are other
places for that where Keil products are not involved (I hope).&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Address Space overflow</title><link>https://community.arm.com/thread/105966?ContentTypeID=1</link><pubDate>Sun, 29 Apr 2012 09:00:07 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:e2117f6c-b02b-4cb8-8882-ea5c0088ffd2</guid><dc:creator>Andy Neil</dc:creator><description>&lt;p&gt;&lt;p&gt;
But this is a discussion forum - not the Real World...&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>