<?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>Code banking</title><link>https://community.arm.com/developer/tools-software/tools/f/keil-forum/15845/code-banking</link><description> Hello Forum, 
I recently took over a project, that did not have code banking implemented. 
The hardware was designed with code banking in mind, a 128K FLASH is used and the A16 of the FLASH is connected to P1.5 of the 8051. We&amp;#39;ve have slowly been getting</description><dc:language>en-US</dc:language><generator>Telligent Community 10</generator><item><title>RE: Code banking</title><link>https://community.arm.com/thread/40205?ContentTypeID=1</link><pubDate>Fri, 09 May 2003 18:03:03 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:7ce4676e-2c68-4e4b-9414-be18037f6445</guid><dc:creator>Andy Neil</dc:creator><description>&lt;p&gt;Rather than code banking, have you looked at just moving your constants out of &lt;b&gt;code&lt;/b&gt; and into &lt;b&gt;xdata&lt;/b&gt; space?&lt;br /&gt;
&lt;br /&gt;
See the &lt;b&gt;Manuals&lt;/b&gt;, and this thread:&lt;br /&gt;
&lt;a href="http://www.keil.com/forum/docs/thread2636.asp"&gt;http://www.keil.com/forum/docs/thread2636.asp&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Code banking</title><link>https://community.arm.com/thread/95504?ContentTypeID=1</link><pubDate>Fri, 09 May 2003 17:00:56 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:a9e2744f-fd71-42a3-8a61-374a295a7207</guid><dc:creator>Jon Ward</dc:creator><description>&lt;p&gt;Not really.  Take a look at the following knowledgebase article that may help out.&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://www.keil.com/support/docs/1144.htm"&gt;http://www.keil.com/support/docs/1144.htm&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Jon&lt;/b&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Code banking</title><link>https://community.arm.com/thread/71446?ContentTypeID=1</link><pubDate>Fri, 09 May 2003 14:32:21 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:cf3cab56-077e-429c-b414-92702b7e70ad</guid><dc:creator>Andy Vedel</dc:creator><description>&lt;p&gt;Thank you Jon for you quick response.&lt;br /&gt;
&lt;br /&gt;
Is it possible to create one HEX file, instead of a HEX file for each bank?&lt;br /&gt;
&lt;br /&gt;
TIA,&lt;br /&gt;
&lt;br /&gt;
Andy&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Code banking</title><link>https://community.arm.com/thread/40204?ContentTypeID=1</link><pubDate>Fri, 09 May 2003 11:30:36 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:4773a04a-ecce-4265-8a46-6b0477d8787f</guid><dc:creator>Jon Ward</dc:creator><description>&lt;p&gt;&lt;i&gt;This will give me 2 banks from 0 - 0xFFFF, but what about the comon area? Where will that be placed?&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
The common area will be copied into both banks.  This may sound wasteful, but for your configuration it&amp;#39;s not too bad at all.  Just try to group common functions together and place the groups in bank 0 or bank 1.  Leave as little as possible in the common area to maximize the amount of code space available.&lt;br /&gt;
&lt;br /&gt;
If you have &amp;quot;common&amp;quot; routines that are frequently called from everywhere in your program, place them in the common area (so that they are called faster than they would be if a bank switch was required).&lt;br /&gt;
&lt;br /&gt;
You have to gauge the tradeoff between maximum program space (meaning small common area) and maximum performance (meaning few bank switches).  Remember that calls to functions in a different bank require a bank switch--and that takes a few extra instructions per function call.  Calls to functions in the common area or in the same code bank require no additional overhead, and subsequently, these are fast.&lt;br /&gt;
&lt;br /&gt;
Create a few simple test cases with one or two functions in the common area, and each code bank to get that warm fuzzy feeling you get when thing work as expected.&lt;br /&gt;
&lt;br /&gt;
The following knowledgebase article contains a lot of general information regarding code banking:  &lt;a href="http://www.keil.com/support/docs/158.htm"&gt;http://www.keil.com/support/docs/158.htm&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Jon&lt;/b&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>