<?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のトピックRe: C pre-processor for #define</title>
    <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/C-pre-processor-for-define/m-p/287456#M10573</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Bruce,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;what is the processor used ?&lt;/P&gt;&lt;P&gt;The MCU V10.3 and V10.4 (last version) are including several archiectures and so different build tool chain.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Pascal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 12 Jun 2013 13:45:06 GMT</pubDate>
    <dc:creator>trytohelp</dc:creator>
    <dc:date>2013-06-12T13:45:06Z</dc:date>
    <item>
      <title>C pre-processor for #define</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/C-pre-processor-for-define/m-p/287455#M10572</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The C pre-processor in CW 10.3 does not seem to follow the C standards for #define.&amp;nbsp; It replaces the name that is part of another name.&amp;nbsp; For example, if I define C1, it will modify MCG_C1.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does anyone know if there is a preference setting that will make it act like satndard C? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Jun 2013 16:55:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/C-pre-processor-for-define/m-p/287455#M10572</guid>
      <dc:creator>wba</dc:creator>
      <dc:date>2013-06-11T16:55:41Z</dc:date>
    </item>
    <item>
      <title>Re: C pre-processor for #define</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/C-pre-processor-for-define/m-p/287456#M10573</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Bruce,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;what is the processor used ?&lt;/P&gt;&lt;P&gt;The MCU V10.3 and V10.4 (last version) are including several archiectures and so different build tool chain.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Pascal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Jun 2013 13:45:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/C-pre-processor-for-define/m-p/287456#M10573</guid>
      <dc:creator>trytohelp</dc:creator>
      <dc:date>2013-06-12T13:45:06Z</dc:date>
    </item>
    <item>
      <title>Re: C pre-processor for #define</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/C-pre-processor-for-define/m-p/287457#M10574</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Pascal,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using the Kinetis MKL05Z8VLC4.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Jun 2013 14:22:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/C-pre-processor-for-define/m-p/287457#M10574</guid>
      <dc:creator>wba</dc:creator>
      <dc:date>2013-06-12T14:22:26Z</dc:date>
    </item>
    <item>
      <title>Re: C pre-processor for #define</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/C-pre-processor-for-define/m-p/287458#M10575</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Bruce,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are you using GNU or Freescale compiler ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pascal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Jun 2013 14:26:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/C-pre-processor-for-define/m-p/287458#M10575</guid>
      <dc:creator>trytohelp</dc:creator>
      <dc:date>2013-06-12T14:26:59Z</dc:date>
    </item>
    <item>
      <title>Re: C pre-processor for #define</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/C-pre-processor-for-define/m-p/287459#M10576</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Bruce,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Only GCC compiler is available for this architecture.&lt;/P&gt;&lt;P&gt;I will check it and keep you informed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pascal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Jun 2013 15:14:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/C-pre-processor-for-define/m-p/287459#M10576</guid>
      <dc:creator>trytohelp</dc:creator>
      <dc:date>2013-06-12T15:14:37Z</dc:date>
    </item>
    <item>
      <title>Re: C pre-processor for #define</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/C-pre-processor-for-define/m-p/287460#M10577</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;I've created an example under MCU V10.4.&lt;/P&gt;&lt;P&gt;I don't reproduced the problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;C code:&lt;/P&gt;&lt;P&gt;++++++++++++++&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #7f0055; font-size: 10pt; font-family: Consolas;"&gt;#define&lt;/STRONG&gt;&lt;SPAN style="font-family: Consolas; color: black; font-size: 10pt;"&gt; C1 1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #7f0055; font-size: 10pt; font-family: Consolas;"&gt;int&lt;/STRONG&gt;&lt;SPAN style="font-family: Consolas; color: black; font-size: 10pt;"&gt; &lt;STRONG style="background: silver;"&gt;main&lt;/STRONG&gt;(&lt;/SPAN&gt;&lt;STRONG style="color: #7f0055; font-size: 10pt; font-family: Consolas;"&gt;void&lt;/STRONG&gt;&lt;SPAN style="font-family: Consolas; color: black; font-size: 10pt;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; color: black; font-size: 10pt;"&gt;{&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG style="color: #7f0055; font-size: 10pt; font-family: Consolas;"&gt;int&lt;/STRONG&gt;&lt;SPAN style="font-family: Consolas; color: black; font-size: 10pt;"&gt; counter = 0;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #7f0055; font-size: 10pt; font-family: Consolas;"&gt;#if&lt;/STRONG&gt;&lt;SPAN style="font-family: Consolas; color: black; font-size: 10pt;"&gt; C1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG style="color: #7f0055; font-size: 10pt; font-family: Consolas;"&gt;for&lt;/STRONG&gt;&lt;SPAN style="font-family: Consolas; color: black; font-size: 10pt;"&gt;(;;) {&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; color: black; font-size: 10pt;"&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; counter++;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; color: black; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #7f0055; font-size: 10pt; font-family: Consolas;"&gt;#endif&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG style="color: #7f0055; font-size: 10pt; font-family: Consolas;"&gt;return&lt;/STRONG&gt;&lt;SPAN style="font-family: Consolas; color: black; font-size: 10pt;"&gt; 0;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; color: black; font-size: 10pt;"&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;++++++++++++++&lt;/P&gt;&lt;P&gt;pre-process file&lt;/P&gt;&lt;P&gt;++++++++++++++&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN lang="FR-CH" style="font-family: Consolas; color: #7f0055; font-size: 10pt;"&gt;# &lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN lang="FR-CH" style="font-family: Consolas; color: black; font-size: 10pt;"&gt;1 &lt;/SPAN&gt;&lt;SPAN lang="FR-CH" style="font-family: Consolas; color: #2a00ff; font-size: 10pt;"&gt;"&amp;lt;command-line&amp;gt;"&lt;/SPAN&gt;&lt;SPAN lang="FR-CH" style="font-family: Consolas; color: black; font-size: 10pt;"&gt; 2&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN lang="FR-CH" style="font-family: Consolas; color: #7f0055; font-size: 10pt;"&gt;# &lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN lang="FR-CH" style="font-family: Consolas; color: black; font-size: 10pt;"&gt;1 &lt;/SPAN&gt;&lt;SPAN lang="FR-CH" style="font-family: Consolas; color: #2a00ff; font-size: 10pt;"&gt;"..\\Sources\\main.c"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN lang="FR-CH" style="font-family: Consolas; color: #7f0055; font-size: 10pt;"&gt;# &lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN lang="FR-CH" style="font-family: Consolas; color: black; font-size: 10pt;"&gt;14 &lt;/SPAN&gt;&lt;SPAN lang="FR-CH" style="font-family: Consolas; color: #2a00ff; font-size: 10pt;"&gt;"..\\Sources\\main.c"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #7f0055; font-size: 10pt; font-family: Consolas;"&gt;int&lt;/STRONG&gt;&lt;SPAN style="font-family: Consolas; color: black; font-size: 10pt;"&gt; main(&lt;/SPAN&gt;&lt;STRONG style="color: #7f0055; font-size: 10pt; font-family: Consolas;"&gt;void&lt;/STRONG&gt;&lt;SPAN style="font-family: Consolas; color: black; font-size: 10pt;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; color: black; font-size: 10pt;"&gt;{&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;STRONG style="color: #7f0055; font-size: 10pt; font-family: Consolas;"&gt;int&lt;/STRONG&gt;&lt;SPAN style="font-family: Consolas; color: black; font-size: 10pt;"&gt; counter = 0;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #7f0055; font-size: 10pt; font-family: Consolas;"&gt; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #7f0055; font-size: 10pt; font-family: Consolas;"&gt; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #7f0055; font-size: 10pt; font-family: Consolas;"&gt;for&lt;/STRONG&gt;&lt;SPAN style="font-family: Consolas; color: black; font-size: 10pt;"&gt;(;;) {&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; color: black; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; counter++;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; color: black; font-size: 10pt;"&gt; }&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;STRONG style="color: #7f0055; font-size: 10pt; font-family: Consolas;"&gt;return&lt;/STRONG&gt;&lt;SPAN style="font-family: Consolas; color: black; font-size: 10pt;"&gt; 0;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; color: black; font-size: 10pt;"&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;++++++++++++++&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've checked with the Compiler Preprocess option -DC1 too.&lt;/P&gt;&lt;P&gt;On my side it seems to work fine.&lt;/P&gt;&lt;P&gt;Please can you provide us more details to reproduce the issue?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pascal&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;/SPAN&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Jun 2013 15:29:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/C-pre-processor-for-define/m-p/287460#M10577</guid>
      <dc:creator>trytohelp</dc:creator>
      <dc:date>2013-06-12T15:29:10Z</dc:date>
    </item>
    <item>
      <title>Re: C pre-processor for #define</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/C-pre-processor-for-define/m-p/287461#M10578</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Pascal, Thanks for replying.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have found the problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; I have a #define C1 ...&amp;nbsp; that I used for a configuration bit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In MCUinit.c there is a line MCG_C1 = ...&lt;/P&gt;&lt;P&gt;MCG_C1 is a macro that uses C1 which is defined as an element of a structure.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The error that I get is "expected identifier before '(' token".&amp;nbsp; That didn't tell me anything.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would have hoped that I would get a warning message if I used a name that was already defined in MKL05Z4.h&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Bruce&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Jun 2013 16:58:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/C-pre-processor-for-define/m-p/287461#M10578</guid>
      <dc:creator>wba</dc:creator>
      <dc:date>2013-06-12T16:58:50Z</dc:date>
    </item>
    <item>
      <title>Re: C pre-processor for #define</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/C-pre-processor-for-define/m-p/287462#M10579</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Bruce,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So problem is solved.&lt;/P&gt;&lt;P&gt;The C1 was already defined in&amp;nbsp; header file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pascal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Jun 2013 05:02:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/C-pre-processor-for-define/m-p/287462#M10579</guid>
      <dc:creator>trytohelp</dc:creator>
      <dc:date>2013-06-13T05:02:56Z</dc:date>
    </item>
  </channel>
</rss>

