<?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 size compared to 8051</title><link>https://community.arm.com/developer/tools-software/tools/f/keil-forum/22174/code-size-compared-to-8051</link><description> 
I have run out of the 64K code space on my 8051 processor and need
to port to something like the Cortex-M3 with 128K. BUT...with a 32
bit processor, in theory I&amp;#39;d need 256K of program memory just to
break even. Does anyone have experience with what</description><dc:language>en-US</dc:language><generator>Telligent Community 10</generator><item><title>RE: Code size compared to 8051</title><link>https://community.arm.com/thread/49601?ContentTypeID=1</link><pubDate>Fri, 28 Mar 2008 01:28:53 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:97ce8279-690b-4d83-bcb6-72a181a388c7</guid><dc:creator>Catcus Blip</dc:creator><description>&lt;p&gt;&lt;p&gt;
David,&lt;br /&gt;
For the ARM9, the load and store multiple instructions allow you to
save or restore the entire register file or&lt;br /&gt;
any subset of registers in the one instruction. Take for example the
STM and LDM instructions.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Code size compared to 8051</title><link>https://community.arm.com/thread/88963?ContentTypeID=1</link><pubDate>Thu, 27 Mar 2008 12:54:43 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:27258c94-f2f7-4ba9-9e9c-d8b532f37281</guid><dc:creator>ImPer Westermark</dc:creator><description>&lt;p&gt;&lt;p&gt;
As Andy notes, the little guy has to use a number of instructions
to perform some operations since it doesn&amp;#39;t have 32-bit registers,
multiple address pointers etc. Just think about incrementing a 32-bit
integer on an 8-bit and 32-bit processor.&lt;/p&gt;

&lt;p&gt;
When I play around myself, or work with early prototypes, I
normally buy the largest edition of a chip to experiment with.
If/when it&amp;#39;s time for production, I may then decide to go for a more
optimized memory size for them.&lt;/p&gt;

&lt;p&gt;
One advantage with this approach is that I know that I have extra
room for debug code and trace printouts. When ordering 4-10
prototypes of a device, it normally doesn&amp;#39;t affect the total price so
much to have the factory manually replace the processor before the
soldering. Then I can use one prototype with augmented code, and one
prototype with production code. The other units may then be used for
long-time testing, sent to a test lab or to the customer.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Code size compared to 8051</title><link>https://community.arm.com/thread/49607?ContentTypeID=1</link><pubDate>Thu, 27 Mar 2008 12:42:59 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:1a7b15b4-9128-44fd-915a-de1a91a918fe</guid><dc:creator>Andy Neil</dc:creator><description>&lt;p&gt;&lt;p&gt;
&lt;i&gt;&amp;quot;in theory I&amp;#39;d need 256K of program memory just to break
even&amp;quot;&lt;/i&gt;&lt;/p&gt;

&lt;p&gt;
How on earth did you come to that conclusion?!&lt;/p&gt;

&lt;p&gt;
I presume you&amp;#39;re working on the basis that an 8051 is 8-bit, an
ARM is 32-bit, which is 4*8, therefore the code will 4*64K = 256K -
yes?&lt;/p&gt;

&lt;p&gt;
It really doesn&amp;#39;t work like that!&lt;/p&gt;

&lt;p&gt;
That assumes that every 8051 instruction has exactly one
equivalent ARM instruction that is exactly four times the size -
which is clearly nonsense!&lt;/p&gt;

&lt;p&gt;
A lot of your 8051 code will be concerned with doing things that
simply aren&amp;#39;t necessary on an ARM - like loading &amp;amp; reloading
DPTR, having to &amp;quot;manually&amp;quot; implement multi-byte operations with
single-byte instructions, etc, etc...&lt;/p&gt;

&lt;p&gt;
And don&amp;#39;t forget Thumb mode...&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>