<?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>[C51] OVERLAY between MAIN and ISR</title><link>https://community.arm.com/developer/tools-software/tools/f/keil-forum/38624/c51-overlay-between-main-and-isr</link><description> 
I have an issue with overlayed variables. 

 
Some locals variables function used within the MAIN call tree
context are overlayed with local variables used within ISRs call tree
context. 

 
So, when ISR is executed, main local variables are
corrupted</description><dc:language>en-US</dc:language><generator>Telligent Community 10</generator><item><title>RE: [C51] OVERLAY between MAIN and ISR</title><link>https://community.arm.com/thread/57296?ContentTypeID=1</link><pubDate>Fri, 20 Nov 2009 07:36:20 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:a8899f6b-d52b-42fb-bb11-dfc3fadbbf3b</guid><dc:creator>HansBernhard Broeker</dc:creator><description>&lt;p&gt;&lt;p&gt;
&lt;i&gt;how can I prevent this overlay within the linker file ?&lt;/i&gt;&lt;/p&gt;

&lt;p&gt;
You should never have to --- the linker does call tree analysis to
be able to prevent this without your help.&lt;/p&gt;

&lt;p&gt;
So unless you broke it explicitly (e.g. by using the linker&amp;#39;s call
tree modification instructions), this can&amp;#39;t happen. We&amp;#39;ll need a more
concrete description of what you&amp;#39;re doing. A minimal example with the
actual compiler and linker options would be helpful.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [C51] OVERLAY between MAIN and ISR</title><link>https://community.arm.com/thread/77938?ContentTypeID=1</link><pubDate>Fri, 20 Nov 2009 02:22:43 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:37a4102a-be24-4c8e-be60-8220a8e8a2d2</guid><dc:creator>Nicolas Dries</dc:creator><description>&lt;p&gt;&lt;p&gt;
no, functions are only called either within the main or ISR, but
never both.&lt;/p&gt;

&lt;p&gt;
This is also well analyzed within the map file, where differents
call tree are shown.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [C51] OVERLAY between MAIN and ISR</title><link>https://community.arm.com/thread/57292?ContentTypeID=1</link><pubDate>Fri, 20 Nov 2009 02:15:08 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:46c89b72-d830-428e-8838-d10aba5c0962</guid><dc:creator>Christoph Franck</dc:creator><description>&lt;p&gt;&lt;p&gt;
&lt;i&gt;how can I prevent this overlay within the linker file ?&lt;/i&gt;&lt;/p&gt;

&lt;p&gt;
Are you calling functions from both main and the isr? In that
case, you may have to declare them as reentrant, or include two
copies of the same function, one for calling from main and one for
calling from the isr.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>