<?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>Program size problem</title><link>https://community.arm.com/developer/tools-software/tools/f/keil-forum/42524/program-size-problem</link><description> Hi there, 
 
I&amp;#39;m having problem with the size of my binary code. My program uses cosine, arc tangent and square root. My kit only has a memory of 8k. I&amp;#39;m not including the math.h file. Instead, I coded the functions in the program itself. When I compile</description><dc:language>en-US</dc:language><generator>Telligent Community 10</generator><item><title>RE: Program size problem</title><link>https://community.arm.com/thread/122657?ContentTypeID=1</link><pubDate>Wed, 26 Jan 2005 16:12:02 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:3ba1d2a5-3e15-4fcb-986d-c64a27c6ae5e</guid><dc:creator>Andy Neil</dc:creator><description>&lt;p&gt;&lt;i&gt;&amp;quot;I&amp;#39;m using SDCC&amp;quot;&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
The SDCC homepage lists sources of support for SDCC - including mailing lists and a User Forum:&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://sdcc.sourceforge.net/" target="_blank"&gt;http://sdcc.sourceforge.net/&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Program size problem</title><link>https://community.arm.com/thread/111286?ContentTypeID=1</link><pubDate>Wed, 26 Jan 2005 15:18:05 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:3fa5508f-0724-4ad0-847c-3ca03e2e5afb</guid><dc:creator>Nei San</dc:creator><description>&lt;p&gt;Sorry,&lt;br /&gt;
&lt;br /&gt;
I&amp;#39;m using SDCC, I couldn&amp;#39;t get Keil.&lt;br /&gt;
&lt;br /&gt;
Thanks.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Program size problem</title><link>https://community.arm.com/thread/96898?ContentTypeID=1</link><pubDate>Wed, 26 Jan 2005 15:15:51 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:352eb486-3e8c-4ed5-a905-8bef2d9998d6</guid><dc:creator>Andy Neil</dc:creator><description>&lt;p&gt;&lt;i&gt;&amp;quot;$NAME $EXT --vc --use-stdout --model-small --stack-loc 0xD0&amp;quot;&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
That&amp;#39;s not a Keil C51 command line!&lt;br /&gt;
&lt;br /&gt;
What compiler are you using?&lt;br /&gt;
&lt;br /&gt;
Note that this forum is specifically for &lt;b&gt;Keil&lt;/b&gt; products:&lt;br /&gt;
&lt;a href="http://www.keil.com/forum/"&gt;http://www.keil.com/forum/&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Program size problem</title><link>https://community.arm.com/thread/73022?ContentTypeID=1</link><pubDate>Wed, 26 Jan 2005 15:11:27 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:039d7338-7b37-4442-8346-09d633d97359</guid><dc:creator>Nei San</dc:creator><description>&lt;p&gt;Sorry,&lt;br /&gt;
&lt;br /&gt;
The error message I get is&lt;br /&gt;
&lt;br /&gt;
removing robo20053.rel&lt;br /&gt;
?ASxxxx-Error-&amp;lt;a&amp;gt; in line 2572 of robo20053.asm&lt;br /&gt;
              &amp;lt;a&amp;gt; machine specific addressing or addressing mode error&lt;br /&gt;
&lt;br /&gt;
When I compile with model-large a binary that had 6K turns to have 9K. I&amp;#39;m using the command line that came with the compiler:&lt;br /&gt;
&amp;quot;$NAME $EXT --vc --use-stdout --model-small --stack-loc 0xD0&amp;quot; so I dont&amp;#39;t know what optimization set it&amp;#39;s using.&lt;br /&gt;
&lt;br /&gt;
My kit has a RAM size of 256 bytes and the compiler shows me this report when I use model-large:&lt;br /&gt;
&lt;br /&gt;
Direct Internal RAM:&lt;br /&gt;
   Name             Start    End      Size     Max&lt;br /&gt;
   ---------------- -------- -------- -------- --------&lt;br /&gt;
   REG_BANK_0       0x00     0x07         8        8&lt;br /&gt;
   REG_BANK_1       0x08                  0        8&lt;br /&gt;
   REG_BANK_2       0x10                  0        8&lt;br /&gt;
   REG_BANK_3       0x18                  0        8&lt;br /&gt;
   BSEG_BYTES       0x20                  0       16&lt;br /&gt;
   DATA             0x08     0x1a        19      128&lt;br /&gt;
   ---------------- -------- -------- -------- --------&lt;br /&gt;
   TOTAL:           0x00     0x1a        27      128&lt;br /&gt;
&lt;br /&gt;
Stack starts at: 0xd0 (sp set to 0xcf) with 48 bytes available&lt;br /&gt;
&lt;br /&gt;
Other memory:&lt;br /&gt;
   Name             Start    End      Size     Max&lt;br /&gt;
   ---------------- -------- -------- -------- --------&lt;br /&gt;
   INDIRECT RAM     0x80                  0      128&lt;br /&gt;
   EXTERNAL RAM     0x0000   0x0104     261    65536&lt;br /&gt;
   ROM/EPROM/FLASH  0x0000   0x264c    9805    65536&lt;br /&gt;
&lt;br /&gt;
Is that correct?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Program size problem</title><link>https://community.arm.com/thread/43497?ContentTypeID=1</link><pubDate>Wed, 26 Jan 2005 14:17:54 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:29f1dc57-24db-49f8-9cd0-28bcb6f54e31</guid><dc:creator>Andy Neil</dc:creator><description>&lt;p&gt;&lt;i&gt;&amp;quot;When I compile using model-large the program compiles but the size is bigger than 8k.&amp;quot;&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
How much bigger?&lt;br /&gt;
What optimisation setting are you using?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Program size problem</title><link>https://community.arm.com/thread/43496?ContentTypeID=1</link><pubDate>Wed, 26 Jan 2005 13:54:10 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:2eec0598-1fd2-49ab-a906-3a6ba7934963</guid><dc:creator>erik  malund</dc:creator><description>&lt;p&gt;&lt;i&gt;appears an error message&lt;/i&gt;&lt;br /&gt;
if the error message is ... the answer is ....&lt;br /&gt;
if the error message is ... the answer is ....&lt;br /&gt;
if the error message is ... the answer is ....&lt;br /&gt;
if the error message is ... the answer is ....&lt;br /&gt;
if the error message is ... the answer is ....&lt;br /&gt;
if the error message is ... the answer is ....&lt;br /&gt;
&lt;br /&gt;
get my drift ?&lt;br /&gt;
&lt;br /&gt;
Erik&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>