<?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: predefined symbols in CodeWarrior for MCU</title>
    <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/predefined-symbols/m-p/250064#M9636</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Markus:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You are correct, derivative.h includes a header file, and each MCU header file contains a macro definition. You may use that definition for your purpose. Does this clarify your doubt? Sorry, I did not fully understand your last question.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards!&lt;/P&gt;&lt;P&gt;Jorge Gonzalez&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 11 Dec 2013 00:28:57 GMT</pubDate>
    <dc:creator>Jorge_Gonzalez</dc:creator>
    <dc:date>2013-12-11T00:28:57Z</dc:date>
    <item>
      <title>predefined symbols</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/predefined-symbols/m-p/250060#M9632</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does the Codewarrior Compiler automatically create a symbol which indicates which controller is used? Just like other Embedded Compiler do.&lt;/P&gt;&lt;P&gt;Something like:&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;#define DEVICE K60_FX_512&lt;/P&gt;&lt;P&gt;#define DEVICE COLDFIRE_xxxx&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to enable processor specific Code automatically by checking those symbols (if they are available)&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks and Regards&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Markus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 08 Dec 2013 20:21:17 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/predefined-symbols/m-p/250060#M9632</guid>
      <dc:creator>Masmiseim</dc:creator>
      <dc:date>2013-12-08T20:21:17Z</dc:date>
    </item>
    <item>
      <title>Re: predefined symbols</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/predefined-symbols/m-p/250061#M9633</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Markus:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CodeWarrior does not automatically create those symbols, but you can add them very easily either in your code or directly in the project settings, just by going to Project -&amp;gt; Properties. Look at the next screenshot:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Symbols.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/41836i2558B43C2DBB43CF/image-size/large?v=v2&amp;amp;px=999" role="button" title="Symbols.png" alt="Symbols.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this is useful!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jorge Gonzalez&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Dec 2013 01:55:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/predefined-symbols/m-p/250061#M9633</guid>
      <dc:creator>Jorge_Gonzalez</dc:creator>
      <dc:date>2013-12-09T01:55:55Z</dc:date>
    </item>
    <item>
      <title>Re: predefined symbols</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/predefined-symbols/m-p/250062#M9634</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Jorge,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the feedback. You are right; I could add such a symbol manually in the Project settings.&lt;/P&gt;&lt;P&gt;But when I change the target Controller of the Project, I have to change the symbol manually. And this will be forgotten often; ending up with strange errors. That’s why I’m searching for a solution which changes the symbol automatically.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Markus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Dec 2013 10:09:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/predefined-symbols/m-p/250062#M9634</guid>
      <dc:creator>Masmiseim</dc:creator>
      <dc:date>2013-12-09T10:09:41Z</dc:date>
    </item>
    <item>
      <title>Re: predefined symbols</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/predefined-symbols/m-p/250063#M9635</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think I found a solution. The project wizard creates the derivates.h File while setting up a new project. This includes the controller specific header File. I can use the macro definition of the Include Guard to check which controller is used.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it correct, that it is not possible to change the controller derivate used in a project?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Markus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Dec 2013 10:22:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/predefined-symbols/m-p/250063#M9635</guid>
      <dc:creator>Masmiseim</dc:creator>
      <dc:date>2013-12-10T10:22:42Z</dc:date>
    </item>
    <item>
      <title>Re: predefined symbols</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/predefined-symbols/m-p/250064#M9636</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Markus:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You are correct, derivative.h includes a header file, and each MCU header file contains a macro definition. You may use that definition for your purpose. Does this clarify your doubt? Sorry, I did not fully understand your last question.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards!&lt;/P&gt;&lt;P&gt;Jorge Gonzalez&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Dec 2013 00:28:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/predefined-symbols/m-p/250064#M9636</guid>
      <dc:creator>Jorge_Gonzalez</dc:creator>
      <dc:date>2013-12-11T00:28:57Z</dc:date>
    </item>
    <item>
      <title>Re: predefined symbols</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/predefined-symbols/m-p/250065#M9637</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Jorge,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when I set up a new project, I have to choose the controller which I will develop for. There is no possibility to change the controller in an existing project. I have to set up a new project with the new controller. Is this correct?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Markus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Dec 2013 10:31:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/predefined-symbols/m-p/250065#M9637</guid>
      <dc:creator>Masmiseim</dc:creator>
      <dc:date>2013-12-11T10:31:02Z</dc:date>
    </item>
    <item>
      <title>Re: predefined symbols</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/predefined-symbols/m-p/250066#M9638</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Markus:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Well, the general answer would be no, you cannot change the controller. But if the project just involves crude source and header files (does not involve custom libraries, RTOS, stacks or similar), and you are switching to a MCU from same family, then you could reuse a project by modifying project settings, connection settings and files such as derivative.h and linker file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But if in your mind is just to have a magic macro definition to switch between devices, that is not possible.&lt;/P&gt;&lt;P&gt;However you can have common sources and control the compilation with #if and #ifdef as usual.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this clarifies a little more your doubts.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards!&lt;/P&gt;&lt;P&gt;Jorge Gonzalez&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Dec 2013 06:36:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/predefined-symbols/m-p/250066#M9638</guid>
      <dc:creator>Jorge_Gonzalez</dc:creator>
      <dc:date>2013-12-12T06:36:18Z</dc:date>
    </item>
  </channel>
</rss>

