<?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: calling functions from external files in Classic/Legacy CodeWarrior</title>
    <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/calling-functions-from-external-files/m-p/177414#M3891</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;First I assume there is a typo in your initial post. Content of main.c should read as:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In "main.c"&lt;/P&gt;&lt;P&gt;---------------------------------------------------------------&lt;/P&gt;&lt;P&gt;#include "header_file.h"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;lt;r-type&amp;gt;&amp;nbsp; retval;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/*call function*/&lt;/P&gt;&lt;P&gt;retVal = &amp;nbsp;&amp;lt;function_name&amp;gt; ();&lt;/P&gt;&lt;P&gt;---------------------------------------------------------------&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then next question is which CPU are you targeting (HC08, HC12, Coldfire, ..)&lt;BR /&gt;- Which version of CodeWarrior are you using?&lt;BR /&gt;&amp;nbsp;&amp;nbsp; To retrieve that info:&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; - Start CodeWarrior&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; - Select Help -&amp;gt; About Freescale CodeWarrior&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; - Click on "Install Products"&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; - CodeWarrior version used is displayed on top in the Installed Products dialog.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Finally did you enable generation of debug information on file_containing_function.c?&lt;/P&gt;&lt;P&gt;Please check FAQ-27442 on &lt;A href="http://www.freescale.com" rel="nofollow" target="_blank"&gt;www.freescale.com&lt;/A&gt; for more details on how to figure that out.&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, 19 Jan 2011 21:14:42 GMT</pubDate>
    <dc:creator>CrasyCat</dc:creator>
    <dc:date>2011-01-19T21:14:42Z</dc:date>
    <item>
      <title>calling functions from external files</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/calling-functions-from-external-files/m-p/177413#M3890</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello everybody,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Please excuse my newb question. The problem I am having is that I can't seem to call functions defined in external files. At the moment, in order to try and do so, I am using the following structure:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In "Main.c"&lt;/P&gt;&lt;P&gt;---------------------------------------------------------------&lt;/P&gt;&lt;P&gt;#include "header_file.h"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/*call function*/&lt;/P&gt;&lt;P&gt;&amp;lt;r-type&amp;gt; &amp;lt;function_name&amp;gt; ();&lt;/P&gt;&lt;P&gt;---------------------------------------------------------------&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In "header_file.h"&lt;/P&gt;&lt;P&gt;--------------------------------------------------------------&lt;/P&gt;&lt;P&gt;/*function prototype*/&lt;/P&gt;&lt;P&gt;&amp;lt;r-type&amp;gt; &amp;lt;function_name&amp;gt; (&amp;lt;p-type&amp;gt; &amp;lt;p-name&amp;gt;)&lt;/P&gt;&lt;P&gt;--------------------------------------------------------------&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In "file_containing_function.c"&lt;/P&gt;&lt;P&gt;-------------------------------------------------------------&lt;/P&gt;&lt;P&gt;/*define function*/&lt;/P&gt;&lt;P&gt;&amp;lt;r-type&amp;gt; &amp;lt;function_name&amp;gt; (&amp;lt;p-type&amp;gt; &amp;lt;p_name&amp;gt;)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; some_code;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;-------------------------------------------------------------&lt;/P&gt;&lt;P&gt;-------------------------------------------------------------&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The main.c file obviously already exists, however I have added both&amp;nbsp;the "header_file.h" containing the function prototype; and the "file_containing_function.c" which defines my function to my project. Can somebody please explain to me why when in debug mode, I cannot view the 'stack crawl window' step through the function in the external file. It simply seems to bypass the function call altogether.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your help. &amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Jan 2011 20:17:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/calling-functions-from-external-files/m-p/177413#M3890</guid>
      <dc:creator>antony_GB</dc:creator>
      <dc:date>2011-01-19T20:17:38Z</dc:date>
    </item>
    <item>
      <title>Re: calling functions from external files</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/calling-functions-from-external-files/m-p/177414#M3891</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;First I assume there is a typo in your initial post. Content of main.c should read as:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In "main.c"&lt;/P&gt;&lt;P&gt;---------------------------------------------------------------&lt;/P&gt;&lt;P&gt;#include "header_file.h"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;lt;r-type&amp;gt;&amp;nbsp; retval;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/*call function*/&lt;/P&gt;&lt;P&gt;retVal = &amp;nbsp;&amp;lt;function_name&amp;gt; ();&lt;/P&gt;&lt;P&gt;---------------------------------------------------------------&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then next question is which CPU are you targeting (HC08, HC12, Coldfire, ..)&lt;BR /&gt;- Which version of CodeWarrior are you using?&lt;BR /&gt;&amp;nbsp;&amp;nbsp; To retrieve that info:&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; - Start CodeWarrior&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; - Select Help -&amp;gt; About Freescale CodeWarrior&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; - Click on "Install Products"&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; - CodeWarrior version used is displayed on top in the Installed Products dialog.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Finally did you enable generation of debug information on file_containing_function.c?&lt;/P&gt;&lt;P&gt;Please check FAQ-27442 on &lt;A href="http://www.freescale.com" rel="nofollow" target="_blank"&gt;www.freescale.com&lt;/A&gt; for more details on how to figure that out.&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, 19 Jan 2011 21:14:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/calling-functions-from-external-files/m-p/177414#M3891</guid>
      <dc:creator>CrasyCat</dc:creator>
      <dc:date>2011-01-19T21:14:42Z</dc:date>
    </item>
    <item>
      <title>Re: calling functions from external files</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/calling-functions-from-external-files/m-p/177415#M3892</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks CrasyCat for correcting my syntax. Problem solved.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Jan 2011 22:16:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/calling-functions-from-external-files/m-p/177415#M3892</guid>
      <dc:creator>antony_GB</dc:creator>
      <dc:date>2011-01-19T22:16:02Z</dc:date>
    </item>
  </channel>
</rss>

