<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: 'stack_effect' compiler directive related. in Other NXP Products</title>
    <link>https://community.nxp.com/t5/Other-NXP-Products/stack-effect-compiler-directive-related/m-p/205172#M2169</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you very much. Now i got some idea , and am on the track.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have some more doubts.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My sample application look like this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;----------------------------------------------------------------------------------------------------------------------------------------------------&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;File name: main.c&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;#include&amp;lt;stdio.h&amp;gt;&lt;BR /&gt;int add(int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;int main()&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;{&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;FONT color="#FF0000"&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;FONT color="#FF0000"&gt;int a = add(1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;FONT color="#FF0000"&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;FONT color="#FF0000"&gt;printf("The sum is = %d\n",a);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;&lt;/FONT&gt;&lt;SPAN&gt;&lt;FONT color="#FF0000"&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;FONT color="#FF0000"&gt;return 0;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;}&lt;BR /&gt;int add(int a,int b,int c,int d,int e,int f,int g,int h,int i,int j,int k,int l,int m,int n,int o,int p,int q,int r,int s,int t)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;{&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;SPAN&gt;&lt;FONT color="#FF0000"&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;FONT color="#FF0000"&gt;int sum = a+b+c+d+e+f+g+h+i+j+k+l+m+n+o+p+q+r+s+t;&lt;/FONT&gt;&lt;SPAN&gt;&lt;FONT color="#FF0000"&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;FONT color="#FF0000"&gt;sum = sum+t+s+o+j;&lt;/FONT&gt;&lt;SPAN&gt;&lt;FONT color="#FF0000"&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;FONT color="#FF0000"&gt;sum = add_asm(sum,g,0,0,0);&lt;/FONT&gt;&lt;SPAN&gt;&lt;FONT color="#FF0000"&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;FONT color="#FF0000"&gt;sum =&lt;/FONT&gt; &lt;SPAN&gt;&lt;FONT color="#FF0000"&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;FONT color="#FF0000"&gt;sum+f+g+h+i+j+k+l+m+n+o;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;&lt;/FONT&gt;&lt;SPAN&gt;&lt;FONT color="#FF0000"&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;FONT color="#FF0000"&gt;return sum;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;}&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;File name : assembly.asm&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;FONT color="#FF0000"&gt;SECTION .text&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;FONT color="#FF0000"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;global &amp;nbsp;_add_asm&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;FONT color="#FF0000"&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;FONT color="#FF0000"&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;FONT color="#FF0000"&gt;_add_asm&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;FONT color="#FF0000"&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;FONT color="#FF0000"&gt;;pragma stack_effect _add_asm,2 &amp;nbsp; ==&amp;gt;&lt;/FONT&gt; &lt;FONT color="#808080"&gt;commented&amp;nbsp;&lt;/FONT&gt;&lt;FONT color="#808080"&gt;stack_effect directive &amp;nbsp;(i just put 2 as the value, i donno how to set that value)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;FONT color="#FF0000"&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;FONT color="#FF0000"&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;FONT color="#FF0000"&gt;add d0,d1,d0&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;FONT color="#FF0000"&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;FONT color="#FF0000"&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;FONT color="#FF0000"&gt;rts&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;---------------------------------------------------------------------------------------------------------------------------------------------------------------&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1) Given " -enable-stack-effect " option in the C/C++ linker .&lt;/P&gt;&lt;P&gt;2) successfully build the above test project.&lt;/P&gt;&lt;P&gt;3) viewed the output &amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;.map file&amp;nbsp;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;4) There is no stack effect entry for my _add_asm function, but all the C function routines have the same.&lt;/P&gt;&lt;P&gt;5) Why the assembly routines didn't had the stack_effect option even if it is explicitly given in the assembly file itself.&lt;/P&gt;&lt;P&gt;6) Also , should the linker will take the &lt;STRONG&gt;&lt;EM&gt;";pragma stack_effect"&lt;/EM&gt;&lt;/STRONG&gt; (It is commented right?) &amp;nbsp;or not?&lt;/P&gt;&lt;P&gt;7) Also how can give the stack size in the above ;pragma sentence ?&lt;/P&gt;&lt;P&gt;8) I referred all of the above sentence you have mentioned. But i havn't got any details of stack effect , just a one page&amp;nbsp;explanation.&lt;/P&gt;&lt;P&gt;9) Should i need to give any extra options to enable stack effect entry in map file &amp;nbsp;for my own assembly functions?&lt;/P&gt;&lt;P&gt;10) How can i realize the effect of this stack_effect ;pragma by debugging&lt;/P&gt;&lt;P&gt;11) Can you please give me &lt;FONT color="#FF0000"&gt;XXX&lt;/FONT&gt; value in the the &lt;FONT color="#FF0000"&gt;;pragma stack_effect _add_asm ,XXX&lt;/FONT&gt; &lt;FONT color="#808080"&gt;, and how you calculated that?&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Expecting your detailed reply&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/Kanu__&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 07 Jun 2010 13:12:36 GMT</pubDate>
    <dc:creator>kanu__</dc:creator>
    <dc:date>2010-06-07T13:12:36Z</dc:date>
    <item>
      <title>'stack_effect' compiler directive related.</title>
      <link>https://community.nxp.com/t5/Other-NXP-Products/stack-effect-compiler-directive-related/m-p/205170#M2167</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you please give me some inputs on the 'stack_effect' directive.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;What is the significance(logic) of that ,when we declare it using commented pragma(i have seen like that only)?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1.Why we use that?&lt;/P&gt;&lt;P&gt;2.Whats the importance of that?&lt;/P&gt;&lt;P&gt;3.How to declare that for a simple asm function?&lt;/P&gt;&lt;P&gt;4.One example?&lt;/P&gt;&lt;P&gt;5. From where i will get more documents regarding this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/Kanu__&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Jun 2010 13:17:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Other-NXP-Products/stack-effect-compiler-directive-related/m-p/205170#M2167</guid>
      <dc:creator>kanu__</dc:creator>
      <dc:date>2010-06-04T13:17:09Z</dc:date>
    </item>
    <item>
      <title>Re: 'stack_effect' compiler directive related.</title>
      <link>https://community.nxp.com/t5/Other-NXP-Products/stack-effect-compiler-directive-related/m-p/205171#M2168</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The commented pragma stack_effect is used by the linker&amp;nbsp;to estimate stack usage for the application.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This feature is enabled if you add the option -Xlnk "-enable-stack-effect" to your linker option.&lt;/P&gt;&lt;P&gt;This feature is described in the StarCore SC100 Linker User Guide.pdf in chapter "Using the Linker" section "Command-Line Options" -&amp;gt; "Estimating Stack effect".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The compiler is generating the relevant information automatically so you do not have to care about it in ANSI C source files.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you have an assembly source file and if you want to provide the appropriate information to&amp;nbsp;the linker you need to add the pragma in your assembly source file.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You find some information on that in the StarCore Assembler User Guide.pdf chapter "Assembler Directives" section "Pragmas" -&amp;gt; "STACK_EFFECT"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;CrasyCat&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Jun 2010 19:02:05 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Other-NXP-Products/stack-effect-compiler-directive-related/m-p/205171#M2168</guid>
      <dc:creator>CrasyCat</dc:creator>
      <dc:date>2010-06-04T19:02:05Z</dc:date>
    </item>
    <item>
      <title>Re: 'stack_effect' compiler directive related.</title>
      <link>https://community.nxp.com/t5/Other-NXP-Products/stack-effect-compiler-directive-related/m-p/205172#M2169</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you very much. Now i got some idea , and am on the track.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have some more doubts.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My sample application look like this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;----------------------------------------------------------------------------------------------------------------------------------------------------&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;File name: main.c&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;#include&amp;lt;stdio.h&amp;gt;&lt;BR /&gt;int add(int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;int main()&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;{&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;FONT color="#FF0000"&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;FONT color="#FF0000"&gt;int a = add(1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;FONT color="#FF0000"&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;FONT color="#FF0000"&gt;printf("The sum is = %d\n",a);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;&lt;/FONT&gt;&lt;SPAN&gt;&lt;FONT color="#FF0000"&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;FONT color="#FF0000"&gt;return 0;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;}&lt;BR /&gt;int add(int a,int b,int c,int d,int e,int f,int g,int h,int i,int j,int k,int l,int m,int n,int o,int p,int q,int r,int s,int t)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;{&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;SPAN&gt;&lt;FONT color="#FF0000"&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;FONT color="#FF0000"&gt;int sum = a+b+c+d+e+f+g+h+i+j+k+l+m+n+o+p+q+r+s+t;&lt;/FONT&gt;&lt;SPAN&gt;&lt;FONT color="#FF0000"&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;FONT color="#FF0000"&gt;sum = sum+t+s+o+j;&lt;/FONT&gt;&lt;SPAN&gt;&lt;FONT color="#FF0000"&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;FONT color="#FF0000"&gt;sum = add_asm(sum,g,0,0,0);&lt;/FONT&gt;&lt;SPAN&gt;&lt;FONT color="#FF0000"&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;FONT color="#FF0000"&gt;sum =&lt;/FONT&gt; &lt;SPAN&gt;&lt;FONT color="#FF0000"&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;FONT color="#FF0000"&gt;sum+f+g+h+i+j+k+l+m+n+o;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;&lt;/FONT&gt;&lt;SPAN&gt;&lt;FONT color="#FF0000"&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;FONT color="#FF0000"&gt;return sum;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;}&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;File name : assembly.asm&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;FONT color="#FF0000"&gt;SECTION .text&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;FONT color="#FF0000"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;global &amp;nbsp;_add_asm&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;FONT color="#FF0000"&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;FONT color="#FF0000"&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;FONT color="#FF0000"&gt;_add_asm&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;FONT color="#FF0000"&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;FONT color="#FF0000"&gt;;pragma stack_effect _add_asm,2 &amp;nbsp; ==&amp;gt;&lt;/FONT&gt; &lt;FONT color="#808080"&gt;commented&amp;nbsp;&lt;/FONT&gt;&lt;FONT color="#808080"&gt;stack_effect directive &amp;nbsp;(i just put 2 as the value, i donno how to set that value)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;FONT color="#FF0000"&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;FONT color="#FF0000"&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;FONT color="#FF0000"&gt;add d0,d1,d0&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;FONT color="#FF0000"&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;FONT color="#FF0000"&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;FONT color="#FF0000"&gt;rts&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;---------------------------------------------------------------------------------------------------------------------------------------------------------------&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1) Given " -enable-stack-effect " option in the C/C++ linker .&lt;/P&gt;&lt;P&gt;2) successfully build the above test project.&lt;/P&gt;&lt;P&gt;3) viewed the output &amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;.map file&amp;nbsp;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;4) There is no stack effect entry for my _add_asm function, but all the C function routines have the same.&lt;/P&gt;&lt;P&gt;5) Why the assembly routines didn't had the stack_effect option even if it is explicitly given in the assembly file itself.&lt;/P&gt;&lt;P&gt;6) Also , should the linker will take the &lt;STRONG&gt;&lt;EM&gt;";pragma stack_effect"&lt;/EM&gt;&lt;/STRONG&gt; (It is commented right?) &amp;nbsp;or not?&lt;/P&gt;&lt;P&gt;7) Also how can give the stack size in the above ;pragma sentence ?&lt;/P&gt;&lt;P&gt;8) I referred all of the above sentence you have mentioned. But i havn't got any details of stack effect , just a one page&amp;nbsp;explanation.&lt;/P&gt;&lt;P&gt;9) Should i need to give any extra options to enable stack effect entry in map file &amp;nbsp;for my own assembly functions?&lt;/P&gt;&lt;P&gt;10) How can i realize the effect of this stack_effect ;pragma by debugging&lt;/P&gt;&lt;P&gt;11) Can you please give me &lt;FONT color="#FF0000"&gt;XXX&lt;/FONT&gt; value in the the &lt;FONT color="#FF0000"&gt;;pragma stack_effect _add_asm ,XXX&lt;/FONT&gt; &lt;FONT color="#808080"&gt;, and how you calculated that?&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Expecting your detailed reply&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/Kanu__&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Jun 2010 13:12:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Other-NXP-Products/stack-effect-compiler-directive-related/m-p/205172#M2169</guid>
      <dc:creator>kanu__</dc:creator>
      <dc:date>2010-06-07T13:12:36Z</dc:date>
    </item>
    <item>
      <title>Re: 'stack_effect' compiler directive related.</title>
      <link>https://community.nxp.com/t5/Other-NXP-Products/stack-effect-compiler-directive-related/m-p/205173#M2170</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sorry , on trial and error method some of my above points get solved.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The points are ,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;4) There is no stack effect entry for my _add_asm function, but all the C function routines have the same. --solved.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;b'z i changed the assembly function routine to&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;IF 1 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;SECTION .text&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;global &amp;nbsp;_add_asm&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT color="#339966"&gt;_add_asm TYPE func&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT&gt;&lt;STRONG&gt;&lt;FONT color="#339966"&gt;pragma stack_effect _add_asm,2&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;add d0,d1,d0&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;rts&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;ENDSEC&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;ENDIF&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;that is added&amp;nbsp;&lt;STRONG&gt;&lt;FONT color="#339966"&gt;TYPE func&lt;/FONT&gt;&lt;/STRONG&gt;&amp;nbsp;&amp;nbsp;and changed to &lt;STRONG&gt;&lt;FONT color="#339966"&gt;pragma stack_effect _add_asm,2&amp;nbsp;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT color="#339966"&gt;.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#808080"&gt;After build ,Now i can view my assembly function routine stack effect value in map file . ie stack effect value as 2&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#808080"&gt;Butby commenting the pragma line to&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#808080"&gt;&lt;SPAN&gt;;pragma stack_effect _add_asm,2&lt;/SPAN&gt; and tried but the map file is not showing any stack effect value (eg: given value 2)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#339966"&gt;&lt;STRONG&gt;But actually the pragma should be commented or not? (confused with your sentence commented pragma stack effect directive )&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#339966"&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#339966"&gt;&lt;STRONG&gt;In assembly file it is commented or not? If it is get commented then how the compiler **bleep** linker take that line?&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;9) Should i need to give any extra options to enable stack effect entry in map file &amp;nbsp;for my own assembly functions?--solved&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please give some inputs on my remaining points&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#808080"&gt;/Kanu__&lt;/FONT&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Jun 2010 14:27:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Other-NXP-Products/stack-effect-compiler-directive-related/m-p/205173#M2170</guid>
      <dc:creator>kanu__</dc:creator>
      <dc:date>2010-06-07T14:27:38Z</dc:date>
    </item>
    <item>
      <title>Re: 'stack_effect' compiler directive related.</title>
      <link>https://community.nxp.com/t5/Other-NXP-Products/stack-effect-compiler-directive-related/m-p/205174#M2171</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What are the remaining questions?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;CrasyCat&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Jun 2010 22:33:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Other-NXP-Products/stack-effect-compiler-directive-related/m-p/205174#M2171</guid>
      <dc:creator>CrasyCat</dc:creator>
      <dc:date>2010-06-07T22:33:43Z</dc:date>
    </item>
    <item>
      <title>Re: 'stack_effect' compiler directive related.</title>
      <link>https://community.nxp.com/t5/Other-NXP-Products/stack-effect-compiler-directive-related/m-p/205175#M2172</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;No &amp;nbsp;more questions other than above questions excluding point 4 and 9&lt;/P&gt;&lt;P&gt;I mean , Please give inputs for other points&amp;nbsp;excluding point 4 and 9 in my second post&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="lia-component-common-widget-date lia-message-posted-on DateTime"&gt;&lt;SPAN class="local-date"&gt;&lt;FONT color="#FF0000"&gt;@ 2010-06-07&lt;/FONT&gt;&lt;/SPAN&gt;&lt;FONT color="#FF0000"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;SPAN class="local-time"&gt;&lt;FONT color="#FF0000"&gt;07:12 AM&lt;/FONT&gt;&lt;/SPAN&gt;&lt;FONT color="#FF0000"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;FONT color="#FF0000"&gt;- last edited on&amp;nbsp;&lt;/FONT&gt;&lt;SPAN class="lia-component-common-widget-date lia-message-edited-on DateTime"&gt;&lt;SPAN class="local-date"&gt;&lt;FONT color="#FF0000"&gt;2010-06-07&lt;/FONT&gt;&lt;/SPAN&gt;&lt;FONT color="#FF0000"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;SPAN class="local-time"&gt;&lt;FONT color="#FF0000"&gt;07:16 AM&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/kanu__&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Jun 2010 00:55:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Other-NXP-Products/stack-effect-compiler-directive-related/m-p/205175#M2172</guid>
      <dc:creator>kanu__</dc:creator>
      <dc:date>2010-06-08T00:55:57Z</dc:date>
    </item>
  </channel>
</rss>

