<?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: CW problem with handling of function pointers in CodeWarrior for MCU</title>
    <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/CW-problem-with-handling-of-function-pointers/m-p/182702#M6249</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;My code flow is like this &amp;nbsp;Main() -&amp;gt; GUI_DispCharAt( char c, int, int) -&amp;gt; GL_DispChar(c) -&amp;gt;&amp;nbsp;GUI_Context.pAFont-&amp;gt;pfDispChar(c);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the address of each of the above routines are: &amp;nbsp;Main(): 0x 4a69&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Where is the calling function located (address)?: &amp;nbsp;&lt;STRONG&gt;&lt;FONT color="#ff0000"&gt;GL_DsipChar(c)&lt;/FONT&gt;&lt;/STRONG&gt;: 0x2bc6&lt;/P&gt;&lt;P&gt;Where is the called function located (address)? :&lt;FONT color="#ff0000"&gt;GUI_Context.pAFont-&amp;gt;pfDispChar(c);&lt;/FONT&gt;&amp;nbsp;0x20ef&lt;/P&gt;&lt;P&gt;GUI_Context&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am attaching 3 files (print screen), 2 of them gives you the address of the above functions and 3rd one shows the error after executing the&amp;nbsp;&lt;STRONG&gt;&lt;FONT color="#ff0000"&gt;GUI_Context.pAFont-&amp;gt;pfDispChar(c);&lt;/FONT&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#3366FF"&gt;GUI_Context si strcuture;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#3366FF"&gt;paFont is member of GUI_context&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#3366FF"&gt;pfDispChar () is function and member of paFont&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#3366FF"&gt;&lt;SPAN style="line-height: normal;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;Which memory model are you using (tiny, small, ...)? its default one i.e., small&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you look at the disassembly window what is the code generated for the function pointer invocation?: can not see the code generated after this compiler jumping out from the location and giving an error (see the error file attached)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thansk&lt;/P&gt;&lt;P&gt;Sunil&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Attachments:&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.freescale.com/files/community_files/CW816COMM/7121_1_error.png" rel="nofollow" target="_self" title="error.png 243 KB"&gt;error.png 243 KB&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.freescale.com/files/community_files/CW816COMM/7121_2_GL_DispChar_Address.png" rel="nofollow" target="_self" title="GL_DispChar_Address.png 266 KB"&gt;GL_DispChar_Address.png 266 KB&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.freescale.com/files/community_files/CW816COMM/7121_3_GUI_DispCharAt_Address_routine.png" rel="nofollow" target="_self" title="GUI_DispCharAt_Address_routine.png 261 KB"&gt;GUI_DispCharAt_Address_routine.png 261 KB&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 12 Feb 2011 11:54:16 GMT</pubDate>
    <dc:creator>Sunil_Reddy</dc:creator>
    <dc:date>2011-02-12T11:54:16Z</dc:date>
    <item>
      <title>CW problem with handling of function pointers</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/CW-problem-with-handling-of-function-pointers/m-p/182700#M6247</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&amp;nbsp;&lt;BR /&gt;I am working with CW version 10 and using HS08 MCU. THe&amp;nbsp;&lt;BR /&gt;problem seems to be CW having the problem with handling the&amp;nbsp;&lt;BR /&gt;function pointers.&amp;nbsp;&lt;BR /&gt;in detail: When I go through single step debugging, CW is not&amp;nbsp;&lt;BR /&gt;finding the link, at this stage the CW is jumping out of the&amp;nbsp;&lt;BR /&gt;function and giving error. The location where CW is not finding the&amp;nbsp;&lt;BR /&gt;link is "GUI_Context.pAFont-&amp;gt;pfDispChar(c);"&amp;nbsp;&lt;BR /&gt;GUI_Context is a structure;&amp;nbsp;&lt;BR /&gt;pAFont is GUI_COntext variable;&amp;nbsp;&lt;BR /&gt;pfDispChar is function pointer in pAFont structure'&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;thanks&amp;nbsp;&lt;BR /&gt;Sunil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Feb 2011 10:24:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/CW-problem-with-handling-of-function-pointers/m-p/182700#M6247</guid>
      <dc:creator>Sunil_Reddy</dc:creator>
      <dc:date>2011-02-11T10:24:33Z</dc:date>
    </item>
    <item>
      <title>Re: CW problem with handling of function pointers</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/CW-problem-with-handling-of-function-pointers/m-p/182701#M6248</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;Where is the calling function located (address)?&lt;/P&gt;&lt;P&gt;Where is the called function located (address)?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Which memory model are you using (tiny, small, ...)?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you look at the disassembly window what is the code generated for the function pointer invocation?&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, 11 Feb 2011 21:43:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/CW-problem-with-handling-of-function-pointers/m-p/182701#M6248</guid>
      <dc:creator>CrasyCat</dc:creator>
      <dc:date>2011-02-11T21:43:18Z</dc:date>
    </item>
    <item>
      <title>Re: CW problem with handling of function pointers</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/CW-problem-with-handling-of-function-pointers/m-p/182702#M6249</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;My code flow is like this &amp;nbsp;Main() -&amp;gt; GUI_DispCharAt( char c, int, int) -&amp;gt; GL_DispChar(c) -&amp;gt;&amp;nbsp;GUI_Context.pAFont-&amp;gt;pfDispChar(c);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the address of each of the above routines are: &amp;nbsp;Main(): 0x 4a69&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Where is the calling function located (address)?: &amp;nbsp;&lt;STRONG&gt;&lt;FONT color="#ff0000"&gt;GL_DsipChar(c)&lt;/FONT&gt;&lt;/STRONG&gt;: 0x2bc6&lt;/P&gt;&lt;P&gt;Where is the called function located (address)? :&lt;FONT color="#ff0000"&gt;GUI_Context.pAFont-&amp;gt;pfDispChar(c);&lt;/FONT&gt;&amp;nbsp;0x20ef&lt;/P&gt;&lt;P&gt;GUI_Context&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am attaching 3 files (print screen), 2 of them gives you the address of the above functions and 3rd one shows the error after executing the&amp;nbsp;&lt;STRONG&gt;&lt;FONT color="#ff0000"&gt;GUI_Context.pAFont-&amp;gt;pfDispChar(c);&lt;/FONT&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#3366FF"&gt;GUI_Context si strcuture;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#3366FF"&gt;paFont is member of GUI_context&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#3366FF"&gt;pfDispChar () is function and member of paFont&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#3366FF"&gt;&lt;SPAN style="line-height: normal;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;Which memory model are you using (tiny, small, ...)? its default one i.e., small&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you look at the disassembly window what is the code generated for the function pointer invocation?: can not see the code generated after this compiler jumping out from the location and giving an error (see the error file attached)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thansk&lt;/P&gt;&lt;P&gt;Sunil&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Attachments:&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.freescale.com/files/community_files/CW816COMM/7121_1_error.png" rel="nofollow" target="_self" title="error.png 243 KB"&gt;error.png 243 KB&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.freescale.com/files/community_files/CW816COMM/7121_2_GL_DispChar_Address.png" rel="nofollow" target="_self" title="GL_DispChar_Address.png 266 KB"&gt;GL_DispChar_Address.png 266 KB&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.freescale.com/files/community_files/CW816COMM/7121_3_GUI_DispCharAt_Address_routine.png" rel="nofollow" target="_self" title="GUI_DispCharAt_Address_routine.png 261 KB"&gt;GUI_DispCharAt_Address_routine.png 261 KB&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 12 Feb 2011 11:54:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/CW-problem-with-handling-of-function-pointers/m-p/182702#M6249</guid>
      <dc:creator>Sunil_Reddy</dc:creator>
      <dc:date>2011-02-12T11:54:16Z</dc:date>
    </item>
    <item>
      <title>Re: CW problem with handling of function pointers</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/CW-problem-with-handling-of-function-pointers/m-p/182703#M6250</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;How is your function pointer defined?&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>Wed, 16 Feb 2011 23:39:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/CW-problem-with-handling-of-function-pointers/m-p/182703#M6250</guid>
      <dc:creator>CrasyCat</dc:creator>
      <dc:date>2011-02-16T23:39:25Z</dc:date>
    </item>
  </channel>
</rss>

