<?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>CodeWarrior Development ToolsのトピックRe: 9S12XEP100 compiler issue: extern a structure</title>
    <link>https://community.nxp.com/t5/CodeWarrior-Development-Tools/9S12XEP100-compiler-issue-extern-a-structure/m-p/540130#M4490</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Peter,&lt;/P&gt;&lt;P&gt;Sorry i still recommend your send your project to me ,&lt;/P&gt;&lt;P&gt;then i can refer to the project and your describe to check the problem .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or only through your describe , you said you have contain the structure tCAN_MSG，&lt;/P&gt;&lt;P&gt;yes , you need declare the structures tCAN0_MSG, tCAN1_MSG if not declared .Also you need include the header files which you need .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps&lt;/P&gt;&lt;P&gt;Alice&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 28 Jul 2016 02:53:05 GMT</pubDate>
    <dc:creator>Alice_Yang</dc:creator>
    <dc:date>2016-07-28T02:53:05Z</dc:date>
    <item>
      <title>9S12XEP100 compiler issue: extern a structure</title>
      <link>https://community.nxp.com/t5/CodeWarrior-Development-Tools/9S12XEP100-compiler-issue-extern-a-structure/m-p/540127#M4487</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In my CAN application project including 3 files: main.c, CAN_drv.c, and CAN0_app.c.&lt;/P&gt;&lt;P&gt;CAN_drv will contain some CAN driver functions and structures about CAN message.&lt;/P&gt;&lt;P&gt;CAN_app contains some application functions in my system.&lt;/P&gt;&lt;P&gt;main.c will use these application functions in CAN_app.c.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;CAN_drv.h&lt;/P&gt;&lt;PRE class="c++" name="code"&gt;typedef struct&amp;nbsp; { &amp;nbsp; UINT&amp;nbsp;&amp;nbsp; id; &amp;nbsp; BOOL&amp;nbsp;&amp;nbsp; RTR;&amp;nbsp; &amp;nbsp; UBYTE&amp;nbsp; data[8];&amp;nbsp;&amp;nbsp; &amp;nbsp; UBYTE&amp;nbsp; prty; } tCAN_MSG; extern tCAN_MSG canRxMsg[5], &lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;P&gt;CAN_drv.c&lt;/P&gt;&lt;PRE class="c++" name="code"&gt;#include "CAN_drv.h" tCAN_MSG canRxMsg[5];&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;P&gt;CAN0_app.c&lt;/P&gt;&lt;PRE class="c++" name="code"&gt;#include "CAN_app.h" void CAN0_RX(tCAN_MSG *msg) { ... }&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;P&gt;CAN0_app.h&lt;/P&gt;&lt;PRE class="c++" name="code"&gt;#include "CAN_drv.h" extern void CAN0_RX(tCAN_MSG *msg);&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;P&gt;main.c&lt;/P&gt;&lt;PRE class="c++" name="code"&gt;#include "CAN_drv.h" #include "CAN_app.h" void main(void){ &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CAN0_RX(msg); }&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My CodeWarrior version IDE is 5.9.0 and compile error list occured in CAN0_app.h&lt;/P&gt;&lt;P&gt;"extern void CAN0_RX(tCAN_MSG *msg);"&lt;/P&gt;&lt;P&gt;The error list is below:&lt;/P&gt;&lt;P&gt;C5002: Illegal type,&lt;/P&gt;&lt;P&gt;C1815: msg not declared (or typename),&lt;/P&gt;&lt;P&gt;C1834: Indirection applied to non-pointer,&lt;/P&gt;&lt;P&gt;and other strange error about missing ";" or "}"&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there some declaration i missed?&lt;/P&gt;&lt;P&gt;Or this application structure should be modified to another type?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jul 2016 09:22:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-Development-Tools/9S12XEP100-compiler-issue-extern-a-structure/m-p/540127#M4487</guid>
      <dc:creator>peteyo</dc:creator>
      <dc:date>2016-07-26T09:22:14Z</dc:date>
    </item>
    <item>
      <title>Re: 9S12XEP100 compiler issue: extern a structure</title>
      <link>https://community.nxp.com/t5/CodeWarrior-Development-Tools/9S12XEP100-compiler-issue-extern-a-structure/m-p/540128#M4488</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Peter,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What about the define of msg on the main function?&lt;/P&gt;&lt;P&gt;CAN0_RX(msg);&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;You'd better send your project , it is convenient for check the problem.&lt;/P&gt;&lt;P&gt;If you can not attached it to here for some privacy , you can create one question on the&amp;nbsp; salesforce ,&lt;/P&gt;&lt;P&gt; the detail process please refer to this link :&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.nxp.com/docs/DOC-329745"&gt;How to submit a new question for NXP Support&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps&lt;/P&gt;&lt;P&gt;Alice&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;P&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Jul 2016 03:22:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-Development-Tools/9S12XEP100-compiler-issue-extern-a-structure/m-p/540128#M4488</guid>
      <dc:creator>Alice_Yang</dc:creator>
      <dc:date>2016-07-27T03:22:58Z</dc:date>
    </item>
    <item>
      <title>Re: 9S12XEP100 compiler issue: extern a structure</title>
      <link>https://community.nxp.com/t5/CodeWarrior-Development-Tools/9S12XEP100-compiler-issue-extern-a-structure/m-p/540129#M4489</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Alice,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks your reply.&lt;/P&gt;&lt;P&gt;I follow CAN example code from NXP and it contains structure tCAN_MSG and createMessage() in CAN.c/.h&lt;/P&gt;&lt;P&gt;I separate 3 files(CAN_drv, CAN0_app, and CAN1_app) in my project since there are 2 CAN-bus and lots of data of protocol in my application.&lt;/P&gt;&lt;P&gt;Function CAN0_RX() is to check the data from CAN BUS 0 and would be used inside CAN_RXISR() or main().&lt;/P&gt;&lt;P&gt;It seems I need to declare 2 structures (tCAN0_MSG, tCAN1_MSG) and 2 functions(createMessageCAN0, createMessageCAN1) in their own c and header file?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sincerely,&lt;/P&gt;&lt;P&gt;Peter Yu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Jul 2016 08:46:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-Development-Tools/9S12XEP100-compiler-issue-extern-a-structure/m-p/540129#M4489</guid>
      <dc:creator>peteyo</dc:creator>
      <dc:date>2016-07-27T08:46:43Z</dc:date>
    </item>
    <item>
      <title>Re: 9S12XEP100 compiler issue: extern a structure</title>
      <link>https://community.nxp.com/t5/CodeWarrior-Development-Tools/9S12XEP100-compiler-issue-extern-a-structure/m-p/540130#M4490</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Peter,&lt;/P&gt;&lt;P&gt;Sorry i still recommend your send your project to me ,&lt;/P&gt;&lt;P&gt;then i can refer to the project and your describe to check the problem .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or only through your describe , you said you have contain the structure tCAN_MSG，&lt;/P&gt;&lt;P&gt;yes , you need declare the structures tCAN0_MSG, tCAN1_MSG if not declared .Also you need include the header files which you need .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps&lt;/P&gt;&lt;P&gt;Alice&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Jul 2016 02:53:05 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-Development-Tools/9S12XEP100-compiler-issue-extern-a-structure/m-p/540130#M4490</guid>
      <dc:creator>Alice_Yang</dc:creator>
      <dc:date>2016-07-28T02:53:05Z</dc:date>
    </item>
  </channel>
</rss>

