<?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>Programmsize restriction within codeblock</title><link>https://community.arm.com/developer/tools-software/tools/f/keil-forum/24800/programmsize-restriction-within-codeblock</link><description> 
Hello, 
are there any restrictions of codesize within a codeblock? 

 
For examle the first code doesn&amp;#39;t work: 

 
if ( value ){
 .
 . many Codelines
 .
}
 

 
 
If i shorten the code above, then it works. i couldn&amp;#39;t find out the
border to the codesize</description><dc:language>en-US</dc:language><generator>Telligent Community 10</generator><item><title>RE: Programmsize restriction within codeblock</title><link>https://community.arm.com/thread/135937?ContentTypeID=1</link><pubDate>Fri, 02 Oct 2009 15:22:48 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:9338e544-1166-41ba-80a8-8a85b3f1cd26</guid><dc:creator>HansBernhard Broeker</dc:creator><description>&lt;p&gt;&lt;p&gt;
&lt;i&gt;If the code exceeds 2048 Bytes, then it doesn&amp;#39;t work.&lt;/i&gt;&lt;/p&gt;

&lt;p&gt;
... &amp;quot;the code&amp;quot; being the contents of that &amp;quot;code block&amp;quot;, I&amp;#39;ll
asumme...&lt;/p&gt;

&lt;p&gt;
So you just found by experience what the compiler directive &amp;quot;ROM&amp;quot;
(a.k.a. &amp;quot;Code Rom Size&amp;quot; in the uVision dialog) is for. You either
have to pick ROM(LARGE) for that module, or cut your functions
smaller.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Programmsize restriction within codeblock</title><link>https://community.arm.com/thread/125760?ContentTypeID=1</link><pubDate>Fri, 02 Oct 2009 14:43:21 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:e10aadb3-9952-4461-9665-e2074212d585</guid><dc:creator>Christian Tauschek</dc:creator><description>&lt;p&gt;&lt;p&gt;
Hello to all,&lt;br /&gt;
now i&amp;#39;ve found out the problem.&lt;br /&gt;
If the code exceeds 2048 Bytes, then it doesn&amp;#39;t work.&lt;br /&gt;
If my code has exactly 2048 Byte, then it works and it is enough to
insert only one _nop_ to crash the Code.&lt;br /&gt;
I am trying the demo. But i thought, i will get a compiler-message if
the demo-codesize ist exceeded.&lt;br /&gt;
But i didn&amp;#39;t.&lt;/p&gt;

&lt;p&gt;
Thanks for help&lt;br /&gt;
Christian Tauschek&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Programmsize restriction within codeblock</title><link>https://community.arm.com/thread/115262?ContentTypeID=1</link><pubDate>Fri, 02 Oct 2009 13:04:50 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:24af4f73-0e1a-4374-ac1d-000b3a344c71</guid><dc:creator>ImPer Westermark</dc:creator><description>&lt;p&gt;&lt;p&gt;
No, the OP did imply a problem with the compiler, and not when
running the code.&lt;/p&gt;

&lt;p&gt;
He described two work-arounds, and noted that:&lt;br /&gt;
&amp;quot;In both cases i don&amp;#39;t get any error-messages from the compiler,
while compiling.&amp;quot;&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Programmsize restriction within codeblock</title><link>https://community.arm.com/thread/103473?ContentTypeID=1</link><pubDate>Fri, 02 Oct 2009 13:01:24 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:afb496cc-0f76-49d4-a011-83c7936292f4</guid><dc:creator>HansBernhard Broeker</dc:creator><description>&lt;p&gt;&lt;p&gt;
&lt;i&gt;I don&amp;#39;t think the OP was saying that his code wasn&amp;#39;t working.
Rather that the compiler reported an error with these larger
blocks.&lt;/i&gt;&lt;/p&gt;

&lt;p&gt;
As a matter of fact, no. The OP said that the code didn&amp;#39;t work.
And that&amp;#39;s about all he decided to share with us as far as a
description of the problem is concerned.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Programmsize restriction within codeblock</title><link>https://community.arm.com/thread/77806?ContentTypeID=1</link><pubDate>Fri, 02 Oct 2009 12:29:01 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:8176d9e7-cd74-46d1-888f-aee5f64c3796</guid><dc:creator>Arthur Negus</dc:creator><description>&lt;p&gt;&lt;p&gt;
&lt;i&gt;&amp;quot;The code doesn&amp;#39;t work the way you expect it to? That&amp;#39;s nothing
new. Before blaming the compiler, you should search for bugs in your
code. Timing-related bugs, interaction with interrupts (shared
resources), even the simplest things like an unserviced watchdog
timer can crash a program.&amp;quot;&lt;/i&gt;&lt;/p&gt;

&lt;p&gt;
I don&amp;#39;t think the OP was saying that his code wasn&amp;#39;t working.
Rather that the compiler reported an error with these larger
blocks.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Programmsize restriction within codeblock</title><link>https://community.arm.com/thread/56957?ContentTypeID=1</link><pubDate>Fri, 02 Oct 2009 12:10:10 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:862bea33-a5a8-483b-933c-a50a210d32bc</guid><dc:creator>Mike Kleshov</dc:creator><description>&lt;p&gt;&lt;p&gt;
&lt;i&gt;If i shorten the code above, then it works. i couldn&amp;#39;t find out
the border to the codesize within the block.&lt;/i&gt;&lt;/p&gt;

&lt;p&gt;
The code doesn&amp;#39;t work the way you expect it to? That&amp;#39;s nothing
new. Before blaming the compiler, you should search for bugs in your
code. Timing-related bugs, interaction with interrupts (shared
resources), even the simplest things like an unserviced watchdog
timer can crash a program.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Programmsize restriction within codeblock</title><link>https://community.arm.com/thread/135932?ContentTypeID=1</link><pubDate>Fri, 02 Oct 2009 09:12:37 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:ce6a1b4d-db92-4476-910c-12aafe0e808b</guid><dc:creator>ImPer Westermark</dc:creator><description>&lt;p&gt;&lt;p&gt;
&amp;quot;As has already been noted, it is also a product name...&amp;quot;&lt;/p&gt;

&lt;p&gt;
Or at least &amp;quot;almost&amp;quot; a product name.&lt;br /&gt;
&amp;quot;Code::Blocks&amp;quot;&lt;br /&gt;
&lt;a href="http://www.codeblocks.org/"&gt;http://www.codeblocks.org/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;
One of the nicest open IDE available for Windows. Great support
for a lot of compilers.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Programmsize restriction within codeblock</title><link>https://community.arm.com/thread/125743?ContentTypeID=1</link><pubDate>Fri, 02 Oct 2009 06:50:34 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:389712e6-4635-4086-9a9d-b74d7c761049</guid><dc:creator>Andy Neil</dc:creator><description>&lt;p&gt;&lt;p&gt;
Yes, I made that &amp;quot;leap&amp;quot; - but you can never be sure that the OP
was making the same leap, or if he actually had some specific meaning
for his compound word &amp;quot;codeblock&amp;quot;&lt;/p&gt;

&lt;p&gt;
As has already been noted, it is also a product name...&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Programmsize restriction within codeblock</title><link>https://community.arm.com/thread/118977?ContentTypeID=1</link><pubDate>Fri, 02 Oct 2009 05:28:33 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:c59bb28e-cb94-4a6e-80e8-b881f8eb50a4</guid><dc:creator>Jack Sprat</dc:creator><description>&lt;p&gt;&lt;p&gt;
&lt;i&gt;Do you mean, for example, this: &lt;a href="http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1124.pdf"&gt;www.open-std.org/.../n1124.pdf&lt;/a&gt;
- which is &amp;quot;WG14/N1124 Committee Draft - May 6, 2005 ISO/IEC
9899:TC2&amp;quot; ?&lt;/i&gt;&lt;/p&gt;

&lt;p&gt;
Yes, that&amp;#39;s the one.&lt;/p&gt;

&lt;p&gt;
A block allows a set of declarations and statements to be grouped
into one syntactic unit.&lt;/p&gt;

&lt;p&gt;
&lt;i&gt;That paragraph refers to a &amp;quot;block&amp;quot; - not a &amp;quot;codeblock&amp;quot;.&lt;/i&gt;&lt;/p&gt;

&lt;p&gt;
&lt;i&gt;Like Erik, I have not heard the term &amp;quot;codeblock&amp;quot; used in this
context before.&lt;/i&gt;&lt;/p&gt;

&lt;p&gt;
While I certainly agree that the term &amp;#39;codeblock&amp;#39; is not used, I
was allowing for the reader&amp;#39;s ability to manage the conceptual
leap:&lt;/p&gt;

&lt;p&gt;
&amp;quot;Set of declarations and statements&amp;quot;: code.&lt;/p&gt;

&lt;p&gt;
&amp;quot;Set of declarations and statements grouped into one syntactic
unit&amp;quot;: codeblock, as in &amp;#39;block of code&amp;#39;.&lt;/p&gt;

&lt;p&gt;
I should know better.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Programmsize restriction within codeblock</title><link>https://community.arm.com/thread/115268?ContentTypeID=1</link><pubDate>Thu, 01 Oct 2009 06:34:45 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:10f18309-a4bb-4268-b5e4-0f1921d7557e</guid><dc:creator>Arthur Negus</dc:creator><description>&lt;p&gt;&lt;p&gt;
&lt;a href="http://wiki.codeblocks.org"&gt;http://wiki.codeblocks.org&lt;/a&gt;&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Programmsize restriction within codeblock</title><link>https://community.arm.com/thread/103476?ContentTypeID=1</link><pubDate>Thu, 01 Oct 2009 05:55:55 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:51dddb6a-de9c-4627-ae7d-e95153fda35f</guid><dc:creator>Andy Neil</dc:creator><description>&lt;p&gt;&lt;p&gt;
Do you mean, for example, this: &lt;a href="http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1124.pdf"&gt;www.open-std.org/.../n1124.pdf&lt;/a&gt;
- which is &lt;i&gt;&amp;quot;WG14/N1124 Committee Draft - May 6, 2005 &lt;b&gt;ISO/IEC
9899:TC2&lt;/b&gt;&amp;quot;&lt;/i&gt; ?&lt;/p&gt;

&lt;p&gt;
&lt;i&gt;&amp;quot;Refer to section 6.8 paragraph 3 for a full
explanation.&amp;quot;&lt;/i&gt;&lt;/p&gt;

&lt;p&gt;
That paragraph refers to a &lt;i&gt;&amp;quot;block&amp;quot;&lt;/i&gt; - not a
&lt;i&gt;&amp;quot;codeblock&amp;quot;&lt;/i&gt;.&lt;/p&gt;

&lt;p&gt;
Like Erik, I have not heard the term &lt;i&gt;&amp;quot;codeblock&amp;quot;&lt;/i&gt; used in
this context before.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Programmsize restriction within codeblock</title><link>https://community.arm.com/thread/118976?ContentTypeID=1</link><pubDate>Thu, 01 Oct 2009 05:42:38 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:dc523328-2f15-4b1a-b048-1687187c474e</guid><dc:creator>Jack Sprat</dc:creator><description>&lt;p&gt;&lt;p&gt;
&lt;i&gt;Now that i know what it is&lt;/i&gt;&lt;/p&gt;

&lt;p&gt;
I&amp;#39;ve no idea how you could manage without them. Are you really
sure you read and understood that paragraph?&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Programmsize restriction within codeblock</title><link>https://community.arm.com/thread/115267?ContentTypeID=1</link><pubDate>Thu, 01 Oct 2009 04:29:13 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:64c60234-c084-4e7e-9741-c360bd8023d0</guid><dc:creator>Christian Tauschek</dc:creator><description>&lt;p&gt;&lt;p&gt;
Hello,&lt;/p&gt;

&lt;pre&gt;
if ( value ) {
    .
    .      // i described this area as &amp;quot;codeblock&amp;quot;
    .
}
&lt;/pre&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Programmsize restriction within codeblock</title><link>https://community.arm.com/thread/103480?ContentTypeID=1</link><pubDate>Thu, 01 Oct 2009 04:08:27 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:fb23c69e-b4e1-47e4-bbfc-1a244f36cc58</guid><dc:creator>&amp;#178;erik malund</dc:creator><description>&lt;p&gt;&lt;p&gt;
Now that i know what it is&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Programmsize restriction within codeblock</title><link>https://community.arm.com/thread/56959?ContentTypeID=1</link><pubDate>Thu, 01 Oct 2009 04:04:11 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:9bf22900-a132-44f4-8861-8d0eb427cdd1</guid><dc:creator>Christoph Franck</dc:creator><description>&lt;p&gt;&lt;p&gt;
&lt;i&gt;are there any restrictions of codesize within a
codeblock?&lt;/i&gt;&lt;/p&gt;

&lt;p&gt;
The limitations of the compiler are given in the manual (always a
good source to refer to in case of problems):&lt;/p&gt;

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

&lt;p&gt;
There is no mention of a block length limit, but other limits
(e.g. nesting depth) exist.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Programmsize restriction within codeblock</title><link>https://community.arm.com/thread/77804?ContentTypeID=1</link><pubDate>Thu, 01 Oct 2009 03:58:40 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:cf1af7cd-e064-4269-a5a7-b731398ea985</guid><dc:creator>Jack Sprat</dc:creator><description>&lt;p&gt;&lt;p&gt;
&lt;i&gt;... what is a codeblock? I am not familiar with that
name&lt;/i&gt;&lt;/p&gt;

&lt;p&gt;
A draft of the C99 manual is widely available as a pdf on the
internet.&lt;/p&gt;

&lt;p&gt;
Refer to section 6.8 paragraph 3 for a full explanation.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Programmsize restriction within codeblock</title><link>https://community.arm.com/thread/56956?ContentTypeID=1</link><pubDate>Thu, 01 Oct 2009 03:38:45 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:09bab3fe-abd1-4f91-ac90-a4789b288dc4</guid><dc:creator>&amp;#178;erik malund</dc:creator><description>&lt;p&gt;&lt;p&gt;
... what is a codeblock? I am not familiar with that name&lt;/p&gt;

&lt;p&gt;
Erik&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>