<?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 5.1 Error Messages in CodeWarrior for MCU</title>
    <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/CW-5-1-Error-Messages/m-p/141672#M2736</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Hi Spencer,&lt;BR /&gt;&lt;BR /&gt;As Erich pointed out, the problem is likely related to the definitions of CR or LF. I've had that error.&lt;BR /&gt;&lt;BR /&gt;Specifically, the definition should be:&lt;BR /&gt;&lt;BR /&gt;#define CR 0x0d&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;BR /&gt;but a common error that I make is to write it:&lt;BR /&gt;&lt;BR /&gt;#define CR 0x0d;&lt;BR /&gt;&lt;BR /&gt;The extra semicolon at the end of the macro will get substituted as well, causing the compiler to complain that it hasn't yet seen the closing parentheses.&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 31 Jul 2007 03:51:59 GMT</pubDate>
    <dc:creator>rocco</dc:creator>
    <dc:date>2007-07-31T03:51:59Z</dc:date>
    <item>
      <title>CW 5.1 Error Messages</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/CW-5-1-Error-Messages/m-p/141670#M2734</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;I get the error: "&lt;STRONG&gt;C2801: ')' missing&lt;/STRONG&gt;" when I try to compile the following code segment.&amp;nbsp; I am using CW5.1 with the latest patches and am targeting the JB16.&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;/******************************************************************************&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;cputchar&lt;BR /&gt;&amp;nbsp;&amp;nbsp;wait for RTS then send a single byte to the SCI transmitter */&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;char cputchar(unsigned char scbyte){&lt;BR /&gt;&amp;nbsp;if (ReadyToSend()) return 1;&amp;nbsp;&amp;nbsp;// wait for TX Empty bit to set&lt;BR /&gt;&amp;nbsp;SCDR = scbyte;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;// send char out TX&lt;BR /&gt;&amp;nbsp;return 0;&lt;BR /&gt;}&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;/****************************************************************************&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;cputch&lt;BR /&gt;&amp;nbsp;check for end of line marker and send CR/LF, else, send input char */&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;void cputch(unsigned char ch){&lt;BR /&gt;&amp;nbsp;if (ch == ('\n')){&lt;BR /&gt;&amp;nbsp;&amp;nbsp;cputchar(LF);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;cputchar(CR);&lt;BR /&gt;&amp;nbsp;} else {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;cputchar(ch);&lt;BR /&gt;&amp;nbsp;}&lt;BR /&gt;}&lt;/DIV&gt;&lt;DIV&gt;/*void cputch(unsigned char ch){&lt;BR /&gt;&amp;nbsp;unsigned char i, j;&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;i = LF;&lt;BR /&gt;&amp;nbsp;j = CR;&lt;BR /&gt;&amp;nbsp;if (ch == '\n') {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;cputchar(i);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;cputchar(j);&lt;BR /&gt;&amp;nbsp;}&lt;BR /&gt;}*/&lt;BR /&gt;/****************************************************************************&lt;BR /&gt;&lt;/DIV&gt;&lt;DIV&gt;I have included all the .h files necessary to define program variables including the sci.h file where I have defined LF and CR.&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;The code segment I have commented out compiles with no errors.&amp;nbsp; Why am I getting this error?&amp;nbsp; Why will this code segment not compile?&amp;nbsp; Any suggestions will be appreciated.&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Thanks&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jul 2007 22:43:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/CW-5-1-Error-Messages/m-p/141670#M2734</guid>
      <dc:creator>admin</dc:creator>
      <dc:date>2007-07-30T22:43:52Z</dc:date>
    </item>
    <item>
      <title>Re: CW 5.1 Error Messages</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/CW-5-1-Error-Messages/m-p/141671#M2735</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Hello,&lt;BR /&gt;I suggest you compile your source file with the -Lp option to produce a preprocessor file. You then maybe will see the problem in the preprocessor file itself, or simply try to compile the preprocessor output itself.&lt;BR /&gt;I think you may have something screwed up with your macros, and producing the preprocessor file will let you see what happend.&lt;BR /&gt;&lt;BR /&gt;Hope it helps,&lt;BR /&gt;Erich&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Jul 2007 01:21:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/CW-5-1-Error-Messages/m-p/141671#M2735</guid>
      <dc:creator>BlackNight</dc:creator>
      <dc:date>2007-07-31T01:21:34Z</dc:date>
    </item>
    <item>
      <title>Re: CW 5.1 Error Messages</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/CW-5-1-Error-Messages/m-p/141672#M2736</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Hi Spencer,&lt;BR /&gt;&lt;BR /&gt;As Erich pointed out, the problem is likely related to the definitions of CR or LF. I've had that error.&lt;BR /&gt;&lt;BR /&gt;Specifically, the definition should be:&lt;BR /&gt;&lt;BR /&gt;#define CR 0x0d&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;BR /&gt;but a common error that I make is to write it:&lt;BR /&gt;&lt;BR /&gt;#define CR 0x0d;&lt;BR /&gt;&lt;BR /&gt;The extra semicolon at the end of the macro will get substituted as well, causing the compiler to complain that it hasn't yet seen the closing parentheses.&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Jul 2007 03:51:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/CW-5-1-Error-Messages/m-p/141672#M2736</guid>
      <dc:creator>rocco</dc:creator>
      <dc:date>2007-07-31T03:51:59Z</dc:date>
    </item>
    <item>
      <title>Re: CW 5.1 Error Messages</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/CW-5-1-Error-Messages/m-p/141673#M2737</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Rocco&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;You hit the nail on the head.&amp;nbsp; I have been having other, similar, errors and when I removed the semi-colon the problems disappeared.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Thanks for the info.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Spencer&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Jul 2007 04:32:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/CW-5-1-Error-Messages/m-p/141673#M2737</guid>
      <dc:creator>admin</dc:creator>
      <dc:date>2007-07-31T04:32:52Z</dc:date>
    </item>
  </channel>
</rss>

