<?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 How does the compiler detect the target? in Classic/Legacy CodeWarrior</title>
    <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/How-does-the-compiler-detect-the-target/m-p/212767#M5976</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Im sure this is probably simple, I just have not found the answer.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have several targets in one project (CW7.2), when I select a target, I need to change what code compiles without manually defining a name and including that in everything. Something like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;#ifdef Target1&lt;/P&gt;&lt;P&gt;.... some code ....&lt;/P&gt;&lt;P&gt;#endif&lt;/P&gt;&lt;P&gt;...some more code ...&lt;/P&gt;&lt;P&gt;#ifdefine Target2&lt;/P&gt;&lt;P&gt;... some more code ...&lt;/P&gt;&lt;P&gt;#endif&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is this possible?I have read the help files and came up with nothing...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Carl&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 08 Jun 2011 12:42:44 GMT</pubDate>
    <dc:creator>CarlFST60L</dc:creator>
    <dc:date>2011-06-08T12:42:44Z</dc:date>
    <item>
      <title>How does the compiler detect the target?</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/How-does-the-compiler-detect-the-target/m-p/212767#M5976</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Im sure this is probably simple, I just have not found the answer.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have several targets in one project (CW7.2), when I select a target, I need to change what code compiles without manually defining a name and including that in everything. Something like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;#ifdef Target1&lt;/P&gt;&lt;P&gt;.... some code ....&lt;/P&gt;&lt;P&gt;#endif&lt;/P&gt;&lt;P&gt;...some more code ...&lt;/P&gt;&lt;P&gt;#ifdefine Target2&lt;/P&gt;&lt;P&gt;... some more code ...&lt;/P&gt;&lt;P&gt;#endif&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is this possible?I have read the help files and came up with nothing...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Carl&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Jun 2011 12:42:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/How-does-the-compiler-detect-the-target/m-p/212767#M5976</guid>
      <dc:creator>CarlFST60L</dc:creator>
      <dc:date>2011-06-08T12:42:44Z</dc:date>
    </item>
    <item>
      <title>Re: How does the compiler detect the target?</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/How-does-the-compiler-detect-the-target/m-p/212768#M5977</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; You can specify the macro you want to use in the &lt;STRONG&gt;Target Setting's&lt;/STRONG&gt; &lt;STRONG&gt;&lt;EM&gt;C/C++ Preprocessor&lt;/EM&gt;&lt;/STRONG&gt; panel.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;- Open the Target Settings dialog (Press ALT+F7)&lt;/P&gt;&lt;P&gt;&amp;nbsp; - Go to &lt;STRONG&gt;&lt;EM&gt;Language Settings&lt;/EM&gt;&lt;/STRONG&gt; &amp;gt; &lt;STRONG&gt;&lt;EM&gt;C/C++ Preprocessor&lt;/EM&gt;&lt;/STRONG&gt; panel&lt;/P&gt;&lt;P&gt;&amp;nbsp; - Add your define in the &lt;STRONG&gt;&lt;EM&gt;Prefix Text&lt;/EM&gt;&lt;/STRONG&gt; edit box.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example in the setting for target 1 specify&lt;/P&gt;&lt;P&gt;&lt;EM&gt;#define Target1&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;these settings are target specific. So just add the appropriate define for each target.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;CrasyCat&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Jun 2011 13:04:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/How-does-the-compiler-detect-the-target/m-p/212768#M5977</guid>
      <dc:creator>CrasyCat</dc:creator>
      <dc:date>2011-06-08T13:04:08Z</dc:date>
    </item>
    <item>
      <title>Re: How does the compiler detect the target?</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/How-does-the-compiler-detect-the-target/m-p/212769#M5978</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ahhh, so simple, the worst part is I found I have previously modified this for other reasons!&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Carl&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Jun 2011 13:50:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/How-does-the-compiler-detect-the-target/m-p/212769#M5978</guid>
      <dc:creator>CarlFST60L</dc:creator>
      <dc:date>2011-06-08T13:50:42Z</dc:date>
    </item>
    <item>
      <title>Re: How does the compiler detect the target?</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/How-does-the-compiler-detect-the-target/m-p/212770#M5979</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How do I modify the Coldfire preprocessor in CW10.1? There appears to be an option for HCS08 projects, but not Coldfire...? And I have done it successfully in CW7.2.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Carl Norman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Aug 2011 05:36:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/How-does-the-compiler-detect-the-target/m-p/212770#M5979</guid>
      <dc:creator>CarlFST60L</dc:creator>
      <dc:date>2011-08-05T05:36:01Z</dc:date>
    </item>
    <item>
      <title>Re: How does the compiler detect the target?</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/How-does-the-compiler-detect-the-target/m-p/212771#M5980</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Apparently there is nothing available for CW10.1 for coldfire...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is a work around:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.freescale.com/message/80556#80556" title="https://community.freescale.com/message/80556#80556"&gt;https://community.freescale.com/message/80556#80556&lt;/A&gt;﻿&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Aug 2011 05:48:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/How-does-the-compiler-detect-the-target/m-p/212771#M5980</guid>
      <dc:creator>CarlFST60L</dc:creator>
      <dc:date>2011-08-05T05:48:14Z</dc:date>
    </item>
    <item>
      <title>Re: How does the compiler detect the target?</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/How-does-the-compiler-detect-the-target/m-p/212772#M5981</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Did you consider creating a .h file containing all the #define for your configuration and specifying it as a prefix file in C-C++ Build &amp;gt; Settings &amp;gt; Tool Settings &amp;gt; ColdFire Compiler&amp;nbsp;&amp;gt; Input&amp;nbsp;&amp;gt; Prefix File edit box.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Just switch the prefix file for the other configurations.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;CrasyCat&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Aug 2011 12:51:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/How-does-the-compiler-detect-the-target/m-p/212772#M5981</guid>
      <dc:creator>CrasyCat</dc:creator>
      <dc:date>2011-08-05T12:51:47Z</dc:date>
    </item>
    <item>
      <title>Re: How does the compiler detect the target?</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/How-does-the-compiler-detect-the-target/m-p/212773#M5982</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, I just ported over to using this Prefix file method as it was getting to messy.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Would be nice if the IDE was aware of this, the IDE is unaware of definitions in this file so its also quite useless. Any idea how to get the IDE to be aware of the prefix file?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I do something like this in the prefix file&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;#define _TEST_&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then in my code&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;#ifdef _TEST_&lt;/P&gt;&lt;P&gt;#warning TEST&lt;/P&gt;&lt;P&gt;#endif&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This entire statement is in gray as the IDE is not aware of _TEST_ being defined, yet it highlights the #warning as something is aware the #warning statement is there...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Aug 2011 13:04:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/How-does-the-compiler-detect-the-target/m-p/212773#M5982</guid>
      <dc:creator>CarlFST60L</dc:creator>
      <dc:date>2011-08-11T13:04:11Z</dc:date>
    </item>
  </channel>
</rss>

