<?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>Is this KeilC&amp;#39;s compiler issue? A program flow will jump fly away</title><link>https://community.arm.com/developer/tools-software/tools/f/keil-forum/19807/is-this-keilc-s-compiler-issue-a-program-flow-will-jump-fly-away</link><description> Hello, there: 
 
I had my project builded with 0 error as well as 0 warning. Then I tried to simulate it with dScope. When I push step by step to trace my flow, I found the flow will jump flying away to elsewhere, returning back after finishing some</description><dc:language>en-US</dc:language><generator>Telligent Community 10</generator><item><title>RE: Is this KeilC's compiler issue? A program flow will jump fly away</title><link>https://community.arm.com/thread/111966?ContentTypeID=1</link><pubDate>Wed, 08 Mar 2006 21:25:30 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:3b590b34-ddc6-4687-82b9-088a55131753</guid><dc:creator>Morris pan</dc:creator><description>&lt;p&gt;Dear A.W, thanks for your help&amp;amp;#65306;&lt;br /&gt;
&lt;br /&gt;
I tried to down-level the optimization level, and the jump flying issue was gone as well as the working well of simulation.&lt;br /&gt;
&lt;br /&gt;
By the way, I also your instruction to put the interrupt dump in my project, and nothing was jump there.&lt;br /&gt;
&lt;br /&gt;
But come with another issue was the simulation worked fine and can see the output form serial windows, I can&amp;#39;t see any output by downloading code to CPU ?&lt;br /&gt;
&lt;br /&gt;
I really appreciate your all support.&lt;br /&gt;
&lt;br /&gt;
Morris&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Is this KeilC's compiler issue? A program flow will jump fly away</title><link>https://community.arm.com/thread/111965?ContentTypeID=1</link><pubDate>Wed, 08 Mar 2006 21:23:56 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:1575e5d3-6ba0-4169-9331-e33c6ea07e53</guid><dc:creator>Morris pan</dc:creator><description>&lt;p&gt;Dear Andy, thanks for your help&amp;amp;#65306;&lt;br /&gt;
&lt;br /&gt;
I tried to down-level the optimization level, and the jump flying issue was gone as well as the working well of simulation.&lt;br /&gt;
&lt;br /&gt;
But come with another issue was the simulation worked fine and can see the output form serial windows, I can&amp;#39;t see any output by downloading code to CPU ?&lt;br /&gt;
&lt;br /&gt;
I really appreciate your all support.&lt;br /&gt;
&lt;br /&gt;
Morris&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Is this KeilC's compiler issue? A program flow will jump fly away</title><link>https://community.arm.com/thread/97899?ContentTypeID=1</link><pubDate>Wed, 08 Mar 2006 02:51:44 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:2e8b078b-fcab-47e4-9958-0e27f908bd0d</guid><dc:creator>Andy Neil</dc:creator><description>&lt;p&gt;&lt;i&gt;&amp;quot;6.) According to disassembly code,&lt;br /&gt;
C:0x6191 12000E LCALL LatchBuffer_Clear(C:000E)&amp;quot;&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
Note that CODE address C:000E is within the TF0 interrupt vector...&lt;br /&gt;
&lt;br /&gt;
Can you use the debugger to check the interrupt flags?&lt;br /&gt;
&lt;br /&gt;
Or, put &amp;quot;dummy&amp;quot; handlers in for &lt;i&gt;&lt;b&gt;all&lt;/b&gt;&lt;/i&gt; interrupts that will enable you to tell when &amp;quot;unexpected&amp;quot; interrupts have occurred...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Is this KeilC's compiler issue? A program flow will jump fly away</title><link>https://community.arm.com/thread/111957?ContentTypeID=1</link><pubDate>Wed, 08 Mar 2006 01:15:00 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:1924a437-7911-4934-a592-2c681e5f99b6</guid><dc:creator>Andy Neil</dc:creator><description>&lt;p&gt;&lt;i&gt;&amp;quot;If it does, there&amp;#39;s something wrong with your new modules&amp;quot;&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
So go back to the working version, and carefully add modules one at a time;&lt;br /&gt;
Check, Test, &amp;amp; Inspect thoroughly at each stage.&lt;br /&gt;
&lt;br /&gt;
Thus you can narrow down precisely where the error was introduced.&lt;br /&gt;
&lt;br /&gt;
If you&amp;#39;ve added so much code that you&amp;#39;re now on the edge of overflowing your code space, that could possibly be a cause...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Is this KeilC's compiler issue? A program flow will jump fly away</title><link>https://community.arm.com/thread/97903?ContentTypeID=1</link><pubDate>Wed, 08 Mar 2006 01:08:46 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:e1bc64e5-8927-4b05-ae33-f3c2b5bfc4e8</guid><dc:creator>Andy Neil</dc:creator><description>&lt;p&gt;&lt;i&gt;&amp;quot;5.) In my previous version, the system program worked fine, but after my adding more and more module, this strange thing happened.&amp;quot;&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
So the standard procedure would be to go back to that version, rebuild it, and check if it still works.&lt;br /&gt;
If it does, there&amp;#39;s something wrong with your new modules;&lt;br /&gt;
If it doesn&amp;#39;t, you&amp;#39;ve broken the tools!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Is this KeilC's compiler issue? A program flow will jump fly away</title><link>https://community.arm.com/thread/97901?ContentTypeID=1</link><pubDate>Wed, 08 Mar 2006 01:06:20 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:6b9fb75a-7bb0-41e7-b37c-ffe4ba096125</guid><dc:creator>Andy Neil</dc:creator><description>&lt;p&gt;What optimisation level are you using?&lt;br /&gt;
&lt;br /&gt;
Could this be common entry/exit merging, or something?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Is this KeilC's compiler issue? A program flow will jump fly away</title><link>https://community.arm.com/thread/73883?ContentTypeID=1</link><pubDate>Tue, 07 Mar 2006 19:28:15 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:17a88399-ba06-4b40-893a-db10cd5d758a</guid><dc:creator>Morris pan</dc:creator><description>&lt;p&gt;Dear Erik, thanks for you reply, and I try to list it as blow :P :&lt;br /&gt;
&lt;br /&gt;
1.) I used C and my KeilC is V7.5&lt;br /&gt;
&lt;br /&gt;
2.) I opened 6 interrupts for my system program :&lt;br /&gt;
    &lt;b&gt; T0 &lt;/b&gt; : System Time Calculator&lt;br /&gt;
    &lt;b&gt; T2 &lt;/b&gt; : System task scheduler timer, and I only implemented 2 task , that says, I/O port triggering and time.second, time.minutes for my system program.&lt;br /&gt;
    &lt;b&gt; T1 &lt;/b&gt; : Baud rate generator&lt;br /&gt;
    &lt;b&gt; Sr &lt;/b&gt; : Serial Port&lt;br /&gt;
&lt;br /&gt;
3.) My CPU is 8052 based, and it has 1024 byte on-chip RAM.&lt;br /&gt;
&lt;br /&gt;
4.) I used Large memory model.&lt;br /&gt;
&lt;br /&gt;
5.) In my previous version, the system program worked fine, but after my adding more and more module, this strange thing happened.&lt;br /&gt;
&lt;br /&gt;
6.) According to disassembly code,&lt;br /&gt;
&lt;b&gt;C:0x6191    12000E   LCALL    LatchBuffer_Clear(C:000E)&lt;/b&gt;&lt;br /&gt;
, it should jump to C:000E, but when I traced into it, it jumped to and executed these three executions&lt;br /&gt;
&lt;b&gt;C:0x001B    F51C     MOV      0x1C,A &lt;/b&gt;&lt;br /&gt;
&lt;b&gt;C:0x001D    F51D     MOV      0x1D,AC573_Init(C:692B)&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;C:0x001F    22       RET      devIIC_Initial(C:4E03)&lt;/b&gt;&lt;br /&gt;
then returned back to C:000E.&lt;br /&gt;
&lt;br /&gt;
7.) Program Size: data=72.3 xdata=230 code=26927.&lt;br /&gt;
&lt;br /&gt;
8.) Main system flow&lt;br /&gt;
&lt;pre&gt;
PowerOn();
Init_CPU();
Init_SystemDriver();
SystemRun(); // Enable system scheduler
&lt;/pre&gt;
&lt;br /&gt;
Thanks for you help. Morris&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Is this KeilC's compiler issue? A program flow will jump fly away</title><link>https://community.arm.com/thread/45665?ContentTypeID=1</link><pubDate>Tue, 07 Mar 2006 14:40:13 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:6ea94b69-efe0-4895-b5fc-8641e395679e</guid><dc:creator>erik  malund</dc:creator><description>&lt;p&gt;&lt;i&gt;I had my project builded with 0 error as well as 0 warning. Then I tried to simulate it with dScope. When I push step by step to trace my flow, I found the flow will jump flying away to elsewhere, returning back after finishing some instruction.&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
I can think of 47 reasons, so if youy want an answer, you need to be more specific.&lt;br /&gt;
&lt;br /&gt;
e.g. C or assembler&lt;br /&gt;
e.g. any ISRs coded&lt;br /&gt;
e.g. any interrupts enabled&lt;br /&gt;
e.g. what is the instruction where this happens&lt;br /&gt;
&lt;br /&gt;
etc&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;more words, does not make you appear stupid, it makes a relvant answer possible&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Erik&lt;br /&gt;
&lt;br /&gt;
on second thought, its 49 resasons&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>