<?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 for MCUのトピックInclude</title>
    <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Include/m-p/160000#M4352</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;I'm trying to learn the C language&amp;nbsp;for microcontrollers but&amp;nbsp;I'm&amp;nbsp;facing a problem that I can not see the solution.&amp;nbsp;I started&amp;nbsp;an application using the CodeWarrior Processor Expert and&amp;nbsp;after setting the pins, interruptions and so one,&amp;nbsp;it generated two files named&amp;nbsp;MCUinit.c and MCUinit.h and besides&amp;nbsp;main.c,&lt;BR /&gt;libraries (include)&amp;nbsp;files&amp;nbsp;and others.&lt;BR /&gt;My intention is to generate a file type ".c", ".h", ".inc" or another (because I haven't had success yet) where I will&amp;nbsp;place the global variables and/or functions that could be accessed by all files of the program (main.c, MCUinit.c).&lt;BR /&gt;I&amp;nbsp;created a ".h" (and also tested as".c") file&amp;nbsp;with definitions of&amp;nbsp; global variables but only file main.c can use this&amp;nbsp;variables without problems while the file MCUinit.c returns the message that the variable was not declared.&lt;BR /&gt;If I include&amp;nbsp;the same filte&amp;nbsp;intto&amp;nbsp;MCUinit.c file&amp;nbsp;it returns that the&amp;nbsp;variables&amp;nbsp;had already been declared.&lt;/DIV&gt;&lt;DIV&gt;The microcintroller is MC9S08QG8&lt;BR /&gt;Could&amp;nbsp;someone&amp;nbsp;help me?&lt;/DIV&gt;&lt;DIV&gt;Thanks a lot.&lt;/DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 29 May 2008 17:46:27 GMT</pubDate>
    <dc:creator>admin</dc:creator>
    <dc:date>2008-05-29T17:46:27Z</dc:date>
    <item>
      <title>Include</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Include/m-p/160000#M4352</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;I'm trying to learn the C language&amp;nbsp;for microcontrollers but&amp;nbsp;I'm&amp;nbsp;facing a problem that I can not see the solution.&amp;nbsp;I started&amp;nbsp;an application using the CodeWarrior Processor Expert and&amp;nbsp;after setting the pins, interruptions and so one,&amp;nbsp;it generated two files named&amp;nbsp;MCUinit.c and MCUinit.h and besides&amp;nbsp;main.c,&lt;BR /&gt;libraries (include)&amp;nbsp;files&amp;nbsp;and others.&lt;BR /&gt;My intention is to generate a file type ".c", ".h", ".inc" or another (because I haven't had success yet) where I will&amp;nbsp;place the global variables and/or functions that could be accessed by all files of the program (main.c, MCUinit.c).&lt;BR /&gt;I&amp;nbsp;created a ".h" (and also tested as".c") file&amp;nbsp;with definitions of&amp;nbsp; global variables but only file main.c can use this&amp;nbsp;variables without problems while the file MCUinit.c returns the message that the variable was not declared.&lt;BR /&gt;If I include&amp;nbsp;the same filte&amp;nbsp;intto&amp;nbsp;MCUinit.c file&amp;nbsp;it returns that the&amp;nbsp;variables&amp;nbsp;had already been declared.&lt;/DIV&gt;&lt;DIV&gt;The microcintroller is MC9S08QG8&lt;BR /&gt;Could&amp;nbsp;someone&amp;nbsp;help me?&lt;/DIV&gt;&lt;DIV&gt;Thanks a lot.&lt;/DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 May 2008 17:46:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/Include/m-p/160000#M4352</guid>
      <dc:creator>admin</dc:creator>
      <dc:date>2008-05-29T17:46:27Z</dc:date>
    </item>
    <item>
      <title>Re: Include</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Include/m-p/160001#M4353</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Hello&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Seems to be complex to explain and understand.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I would recommend you to submit a service request for that.&lt;BR /&gt;&lt;BR /&gt;Click &lt;A href="https://www.freescale.com/webapp/servicerequest.create_SR.framework?regFlag=fromOpenSR" rel="nofollow" target="_blank"&gt;here&lt;/A&gt; to submit a service request.&lt;BR /&gt;&lt;BR /&gt;Make sure to attach a reproducible project and installed product information to the service request.&lt;BR /&gt;To generate the required information:&lt;BR /&gt;- Start CodeWarrior&lt;BR /&gt;- Open the project&lt;BR /&gt;- Select "Help" -&amp;gt; "Pack and Go" and follow instructions on the screen.&lt;BR /&gt;&lt;BR /&gt;Attach the generated .zip file to the SR.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;CrasyCat&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 May 2008 20:18:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/Include/m-p/160001#M4353</guid>
      <dc:creator>CrasyCat</dc:creator>
      <dc:date>2008-05-29T20:18:12Z</dc:date>
    </item>
    <item>
      <title>Re: Include</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Include/m-p/160002#M4354</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;It sounds like you are trying to place definitions of variables in a header file(.h) and then include it in main.c and MCUinit.c.&amp;nbsp;You should not put any definitions in your header file but only declarations, put your defintions at the top of your .c file.&amp;nbsp;&lt;DIV&gt;&lt;BLOCKQUOTE&gt;&lt;DIV class="msg_source_code"&gt;&lt;DIV class="text_smallest"&gt;Code:&lt;/DIV&gt;&lt;PRE&gt;unsigned char Variable1;   // Defintion, should go at the top of the .c file it belongs toextern unsigned char Variable1;   // Declaration, this goes into your header file&lt;/PRE&gt;&lt;/DIV&gt;&lt;P&gt;You might want to take a look at the following link as well:&lt;/P&gt;&lt;P&gt;&lt;A href="http://forums.freescale.com/freescale/board/message?board.id=CW816COMM&amp;amp;message.id=4163&amp;amp;query.id=57322#M4163" rel="nofollow noopener noreferrer noopener noreferrer" target="_blank"&gt;http://forums.freescale.com/freescale/board/message?board.id=CW816COMM&amp;amp;message.id=4163&amp;amp;query.id=57322#M4163&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I would also suggest reading up on the difference between a definition and a declaration.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;- Brett&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Oct 2020 09:05:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/Include/m-p/160002#M4354</guid>
      <dc:creator>allawtterb</dc:creator>
      <dc:date>2020-10-29T09:05:18Z</dc:date>
    </item>
  </channel>
</rss>

