<?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: Conditionals in .prm file in CodeWarrior for MCU</title>
    <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Conditionals-in-prm-file/m-p/197531#M7336</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;this option is a feature of the IDE, so you would need to upgrade to that IDE/CW version.&lt;/P&gt;&lt;P&gt;But if you want to use the build tools from 3.1, then technically this should be possible: use the prog and lib folders from 3.1 inside the 4.6 IDE.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;BK&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 13 Jan 2012 03:56:18 GMT</pubDate>
    <dc:creator>BlackNight</dc:creator>
    <dc:date>2012-01-13T03:56:18Z</dc:date>
    <item>
      <title>Conditionals in .prm file</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Conditionals-in-prm-file/m-p/197528#M7333</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I just wanted to know if there is a way to make a condition inside .prm file, such as #ifdef or something like that.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The idea is to merge a project with the bootloader, using the HEXFILE sentence, and the conditional would be used to compile with or without it&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Jan 2012 01:58:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/Conditionals-in-prm-file/m-p/197528#M7333</guid>
      <dc:creator>sebasira</dc:creator>
      <dc:date>2012-01-13T01:58:29Z</dc:date>
    </item>
    <item>
      <title>Re: Conditionals in .prm file</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Conditionals-in-prm-file/m-p/197529#M7334</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;the answer depends if your are using the classic CodeWarrior or the eclipse one.&lt;/P&gt;&lt;P&gt;In classic you find that option in the linker preference panel as "Preprocess PRM file".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Extract from the manual:&lt;/P&gt;&lt;P&gt;Preprocess PRM file: When checked, the preprocessor of the ANSI-C compiler is&lt;BR /&gt;used to preprocess the PRM file prior to the linking step. In the PRM file, all ANSI-&lt;BR /&gt;preprocessor conditions like conditional inclusion (#if) are available. The same&lt;BR /&gt;preprocessor macros as in ANSI-C code can be used (e.g., #ifdef __SMALL__).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;BK&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Jan 2012 02:43:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/Conditionals-in-prm-file/m-p/197529#M7334</guid>
      <dc:creator>BlackNight</dc:creator>
      <dc:date>2012-01-13T02:43:11Z</dc:date>
    </item>
    <item>
      <title>Re: Conditionals in .prm file</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Conditionals-in-prm-file/m-p/197530#M7335</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi BlackNight, thanks for you inmediate response!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I forgot to specify that, II'm using CW v3.1; so yes, it's the classic one.&lt;/P&gt;&lt;P&gt;But I don't have that option&amp;nbsp;&lt;IMG alt=":smileysad:" class="emoticon emoticon-smileysad" id="smileysad" src="http://freescale.i.lithium.com/i/smilies/16x16_smiley-sad.gif" title="Smiley Sad" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In CW 4.6 is there, but no in CW 3.1.... Is there anything I can do under CW 3.1? Update linker or use linker from CW 4.6?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Jan 2012 03:16:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/Conditionals-in-prm-file/m-p/197530#M7335</guid>
      <dc:creator>sebasira</dc:creator>
      <dc:date>2012-01-13T03:16:30Z</dc:date>
    </item>
    <item>
      <title>Re: Conditionals in .prm file</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Conditionals-in-prm-file/m-p/197531#M7336</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;this option is a feature of the IDE, so you would need to upgrade to that IDE/CW version.&lt;/P&gt;&lt;P&gt;But if you want to use the build tools from 3.1, then technically this should be possible: use the prog and lib folders from 3.1 inside the 4.6 IDE.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;BK&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Jan 2012 03:56:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/Conditionals-in-prm-file/m-p/197531#M7336</guid>
      <dc:creator>BlackNight</dc:creator>
      <dc:date>2012-01-13T03:56:18Z</dc:date>
    </item>
    <item>
      <title>Re: Conditionals in .prm file</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Conditionals-in-prm-file/m-p/197532#M7337</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks again!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've migrated my proect from CW 3.1 to 4.6 so I can compile with v4.6&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Jan 2012 21:26:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/Conditionals-in-prm-file/m-p/197532#M7337</guid>
      <dc:creator>sebasira</dc:creator>
      <dc:date>2012-01-13T21:26:27Z</dc:date>
    </item>
    <item>
      <title>Re: Conditionals in .prm file</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Conditionals-in-prm-file/m-p/197533#M7338</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;﻿﻿﻿﻿Hello BlacKnight,&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;I encountered the following problem, maybe you can help me.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;I set the "Preprocess PRM file" option as you said (btw without this option and without conditionals in the prm file, I get no errors during make).&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;I use the MemoryBanker tool which is generating a .pre.prm file. All the errors that I get are located inside this file and are linked to each "#pragma" instruction. Even without any conditionals in the .prm file I get those errors when the "Preprocess PRM file" option is set. You will find more information in the attachments...&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Thank you for your time.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Allem77.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Mar 2012 19:56:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/Conditionals-in-prm-file/m-p/197533#M7338</guid>
      <dc:creator>Allem77</dc:creator>
      <dc:date>2012-03-08T19:56:59Z</dc:date>
    </item>
    <item>
      <title>Re: Conditionals in .prm file</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Conditionals-in-prm-file/m-p/197534#M7339</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Allem77!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've never used #pragma's in prm pre-processesing. Looking at your warning and error image, I can suggest two things:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1) "&lt;EM&gt;Preprocessor failure because of not supported preprocessor directive&lt;/EM&gt;", perhaps pragma is not suported&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2) &lt;SPAN&gt;"&lt;/SPAN&gt;&lt;EM&gt;Preprocessor failure because of Expected # at line start&lt;/EM&gt;&lt;SPAN&gt;", maybe you should erase indet and put the #pragma at the begining of the line (column 0)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Mar 2012 21:21:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/Conditionals-in-prm-file/m-p/197534#M7339</guid>
      <dc:creator>sebasira</dc:creator>
      <dc:date>2012-03-08T21:21:38Z</dc:date>
    </item>
    <item>
      <title>Re: Conditionals in .prm file</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Conditionals-in-prm-file/m-p/197535#M7340</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sebastian,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thank you for the hints.&lt;/P&gt;&lt;P&gt;Actually the #pragma's are coming from the MemoryBanker tool when it is optimizing the location of the different functions in the banks. So I don't have any control about the generation of those #pragma's.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It seems that the MemoryBanker tool is not compatible with the .prm perprocessing possibility... &amp;nbsp;hmmm&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Mar 2012 21:34:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/Conditionals-in-prm-file/m-p/197535#M7340</guid>
      <dc:creator>Allem77</dc:creator>
      <dc:date>2012-03-08T21:34:20Z</dc:date>
    </item>
    <item>
      <title>Re: Conditionals in .prm file</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Conditionals-in-prm-file/m-p/197536#M7341</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Hi Sebastian, I got in contact with the CW developers and indeed there is a compatibility problem. I'm posting their answer below... Have a nice day, Allem77. From Dev team: ************************ There is a compatibility problem (though not documented). With MemoryBanker enabled, a few peculiar header files (either provided with the library or linker-generated) need to be automatically included via the -AddIncl compiler option. Given the example you provided (test.mcp), this is what the compiler command line looks like: - for target 'Pass1': -CpuHCS12XE -Ml -D__NO_FLOAT__ -MapFLASH -D__MAP_FLASH__ -AddIncldistribution_support.h -MemBanker -D_DISTRIBUTE_CODE -D_DISTRIBUTE_CONST -D_DISTRIBUTE_DATA - for target 'Standard': -CpuHCS12XE -Ml -D__NO_FLOAT__ -MapFLASH -D__MAP_FLASH__ -AddIncl__MB_code.h -AddIncl__MB_data.h File distribution_support.h is provided with the HC(S)12 library. It contains the CODE_SEG/DATA_SEG pragmas required for activating code/data distribution. If it were not automatically included, it would have to be explicitly included in each source file within the application (obviously, only for the first compile-link pass). Files __MB_code.h and __MB_data.h are generated by the linker during the first pass. They contain the code/data distribution optimization information (provided via CODE_SEG/DATA_SEG pragmas) that the compiler needs to use in the second pass. As with distribution_support.h, if these files were not automatically included, they would have to be included in each source file (obviously, only for the second compile-link pass). When PRM file preprocessing is enabled, the compiler-embedded preprocessor will be instructed to preprocess the PRM file as if it were a C source file. The linker will then use (as linker parameter file) the preprocessing output (i.e. .pre.prm, not .prm). On the other hand, the -AddIncl options (for including the above-mentioned header files) directly affect the compiler-embedded preprocessor: it will include the header files prior to preprocessing the PRM file, just like it would do for any other source file to be preprocessed. Therefore, CODE_SEG and DATA_SEG pragmas will make it into the PRM preprocessor output - that the linker will subsequently use. The linker cannot handle CODE_SEG and DATA_SEG pragmas, hence the problem.&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Mar 2012 23:18:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/Conditionals-in-prm-file/m-p/197536#M7341</guid>
      <dc:creator>Allem77</dc:creator>
      <dc:date>2012-03-16T23:18:59Z</dc:date>
    </item>
  </channel>
</rss>

