<?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: Code Warrior HC08 Compiler Error: C2801: 'while' missing in Classic/Legacy CodeWarrior</title>
    <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Code-Warrior-HC08-Compiler-Error-C2801-while-missing/m-p/170105#M3343</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not sure which line you refer to with "first line", the function prototype?&lt;/P&gt;&lt;P&gt;Anyhow, for such errors I would recommend to generate a preprocessor listing and then compile that.&lt;/P&gt;&lt;P&gt;In the code below, I guess there are at least some macros hidden, maybe one more than you think due to a name collision.&lt;/P&gt;&lt;P&gt;Also if the error is on the function prototype, the error might be in the stuff before the shown function.&lt;/P&gt;&lt;P&gt;Daniel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 07 Jun 2012 10:31:40 GMT</pubDate>
    <dc:creator>CompilerGuru</dc:creator>
    <dc:date>2012-06-07T10:31:40Z</dc:date>
    <item>
      <title>Code Warrior HC08 Compiler Error: C2801: 'while' missing</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Code-Warrior-HC08-Compiler-Error-C2801-while-missing/m-p/170104#M3342</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am using code warrior for first time.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am facing this error during my code compilation:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This points to my this function first line.&lt;/P&gt;&lt;P&gt;I am not able to understand what is this about?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Code&lt;/P&gt;&lt;P&gt;=========================================&lt;/P&gt;&lt;P&gt;void FlashEraseRestart(uint16 startAddr, uint16 size)&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp; FlashOpStatus status = FLASH_OP_OK;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; uint32 addr = startAddr;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; if(addr &amp;gt;= FLASH_START_ADDRESS)&lt;BR /&gt;&amp;nbsp;&amp;nbsp; {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //Disable Interrupts. Access to flash during flash operations is not allowed&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; asm&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SEI;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for(addr = startAddr; addr &amp;lt; (startAddr + size - 1UL); addr += FLASH_SECTOR_SIZE)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //Erase 1 sector at a time&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; status = u8Flash_Erase((uint16)addr);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (FLASH_OP_OK != status)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR /&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; break;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //Enable interrupts&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; asm&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CLI;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;&amp;nbsp;&amp;nbsp; else&lt;BR /&gt;&amp;nbsp;&amp;nbsp; {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; status = FLASH_OP_ERROR;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;&amp;nbsp;&amp;nbsp; return status;&lt;BR /&gt;}&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Jun 2012 22:58:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Code-Warrior-HC08-Compiler-Error-C2801-while-missing/m-p/170104#M3342</guid>
      <dc:creator>Aniljaganath</dc:creator>
      <dc:date>2012-06-06T22:58:19Z</dc:date>
    </item>
    <item>
      <title>Re: Code Warrior HC08 Compiler Error: C2801: 'while' missing</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Code-Warrior-HC08-Compiler-Error-C2801-while-missing/m-p/170105#M3343</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not sure which line you refer to with "first line", the function prototype?&lt;/P&gt;&lt;P&gt;Anyhow, for such errors I would recommend to generate a preprocessor listing and then compile that.&lt;/P&gt;&lt;P&gt;In the code below, I guess there are at least some macros hidden, maybe one more than you think due to a name collision.&lt;/P&gt;&lt;P&gt;Also if the error is on the function prototype, the error might be in the stuff before the shown function.&lt;/P&gt;&lt;P&gt;Daniel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Jun 2012 10:31:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Code-Warrior-HC08-Compiler-Error-C2801-while-missing/m-p/170105#M3343</guid>
      <dc:creator>CompilerGuru</dc:creator>
      <dc:date>2012-06-07T10:31:40Z</dc:date>
    </item>
  </channel>
</rss>

