<?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 D-Flash s19 file creation in S12 / MagniV Microcontrollers</title>
    <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/D-Flash-s19-file-creation/m-p/219792#M9206</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'm using CW 5.0 for S12XE family&lt;/P&gt;&lt;P&gt;I'd like to know whether it is possible to create a CW project where I specify only the eeprom (D-flash)&amp;nbsp;data structures (no code etc.).&lt;/P&gt;&lt;P&gt;Theorically, I'd like to build this project and then use the S19 file as it is to program only&amp;nbsp;the D-Flash content through a BDM programmer.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you very much.&lt;/P&gt;&lt;P&gt;Davide&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 07 Oct 2009 14:42:00 GMT</pubDate>
    <dc:creator>davide_ferrari</dc:creator>
    <dc:date>2009-10-07T14:42:00Z</dc:date>
    <item>
      <title>D-Flash s19 file creation</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/D-Flash-s19-file-creation/m-p/219792#M9206</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'm using CW 5.0 for S12XE family&lt;/P&gt;&lt;P&gt;I'd like to know whether it is possible to create a CW project where I specify only the eeprom (D-flash)&amp;nbsp;data structures (no code etc.).&lt;/P&gt;&lt;P&gt;Theorically, I'd like to build this project and then use the S19 file as it is to program only&amp;nbsp;the D-Flash content through a BDM programmer.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you very much.&lt;/P&gt;&lt;P&gt;Davide&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Oct 2009 14:42:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/D-Flash-s19-file-creation/m-p/219792#M9206</guid>
      <dc:creator>davide_ferrari</dc:creator>
      <dc:date>2009-10-07T14:42:00Z</dc:date>
    </item>
    <item>
      <title>Re: D-Flash s19 file creation</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/D-Flash-s19-file-creation/m-p/219793#M9207</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sure, why not.&lt;/P&gt;&lt;P&gt;In the linker prm file tell the linker with the INIT directive to start linking at your global constant instead of the default _Startup, also refer to the same constant with the INIT directive. Remove all VECTOR entries (and whatever you use to setup the vector table). Remove the start12.c (and any other not used c files) from the project (or at least from the build configuration).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then there are some warnings (about the stack, initialization and similar) which you can be disabled.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So after the changes, the prm would loke like:&lt;/P&gt;&lt;PRE&gt;
STACKSIZE 0//VECTOR 0 _StartupINIT SampleConstantMAIN SampleConstant&lt;/PRE&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, 08 Oct 2009 05:44:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/D-Flash-s19-file-creation/m-p/219793#M9207</guid>
      <dc:creator>CompilerGuru</dc:creator>
      <dc:date>2009-10-08T05:44:39Z</dc:date>
    </item>
    <item>
      <title>Re: D-Flash s19 file creation</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/D-Flash-s19-file-creation/m-p/219794#M9208</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for your answer.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It seems working, but the problem now is that the compiler/linker doesn't allocate the const structures that I've defined (there are more than one) because they are not used anywhere.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I couldn't find how to disable this optimization, could you please advise how to do it?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many thanks&lt;/P&gt;&lt;P&gt;Davide&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Oct 2009 13:49:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/D-Flash-s19-file-creation/m-p/219794#M9208</guid>
      <dc:creator>davide_ferrari</dc:creator>
      <dc:date>2009-10-08T13:49:14Z</dc:date>
    </item>
    <item>
      <title>Re: D-Flash s19 file creation</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/D-Flash-s19-file-creation/m-p/219795#M9209</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try adding this to your prm file:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ENTRIES /* keep the following unreferenced variables */&lt;BR /&gt;&amp;nbsp;&amp;nbsp; *&lt;BR /&gt;END&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Above&amp;nbsp;will also link&amp;nbsp;all *.lib&amp;nbsp;functions, so probably you will need to remove libraries from your data-only project.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Another option is to&amp;nbsp;link everything from specified object&amp;nbsp;files:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ENTRIES&lt;BR /&gt;&amp;nbsp;&amp;nbsp; myFile1.o:* myFile2.o:*&lt;/P&gt;&lt;P&gt;END&lt;/P&gt;&lt;DIV class="message-edit-history"&gt;&lt;SPAN class="edit-author"&gt;Message Edited by kef on&lt;/SPAN&gt; &lt;SPAN class="local-date"&gt;2009-10-08&lt;/SPAN&gt; &lt;SPAN class="local-time"&gt;12:50 PM&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Oct 2009 16:49:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/D-Flash-s19-file-creation/m-p/219795#M9209</guid>
      <dc:creator>kef</dc:creator>
      <dc:date>2009-10-08T16:49:12Z</dc:date>
    </item>
    <item>
      <title>Re: D-Flash s19 file creation</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/D-Flash-s19-file-creation/m-p/219796#M9210</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you very much. It works fine. &lt;IMG alt=":smileyvery-happy:" class="emoticon emoticon-smileyvery-happy" id="smileyvery-happy" src="http://freescale.i.lithium.com/i/smilies/16x16_smiley-very-happy.gif" title="Smiley Very Happy" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Contrary to what I said before, the INIT specifier dosn't work for const structure, because the linker modifies the structure allocation to the .init segment (that is not linked at the address I want).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've solved this problem by specifying the "Link as ROM library" option in the linker.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So now my .prm file looks like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;SEGMENTS&lt;/P&gt;&lt;P&gt;EEPROM_00&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = READ_ONLY&amp;nbsp;&amp;nbsp; DATA_FAR IBCC_FAR&amp;nbsp; 0x000800 TO 0x000BFB FILL 0xFF;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CRC32_EE_00&amp;nbsp;&amp;nbsp; = READ_ONLY&amp;nbsp;&amp;nbsp; DATA_FAR IBCC_FAR&amp;nbsp; 0x000BFC TO 0x000BFF;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;END&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PLACEMENT&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; EEPROM_CONFIGURATION&amp;nbsp; INTO EEPROM_00;&lt;BR /&gt;END&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;CHECKSUM&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CHECKSUM_ENTRY&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; METHOD_CRC32&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; OF&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; READ_ONLY&amp;nbsp;&amp;nbsp; 0x000800 TO 0x000BFB&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; INTO&amp;nbsp;&amp;nbsp;&amp;nbsp; READ_ONLY&amp;nbsp;&amp;nbsp; 0x000BFC SIZE 4&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; UNDEFINED 0xff&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; END&lt;BR /&gt;END&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ENTRIES /* keep the following unreferenced variables */&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* OSEK: always allocate the vector table and all dependent objects */&lt;BR /&gt;&amp;nbsp; //_vectab OsBuildNumber _OsOrtiStackStart _OsOrtiStart&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; list of the structures names that must be allocated&lt;/P&gt;&lt;P&gt;END&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;STACKSIZE 0&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you again for your help&lt;/P&gt;&lt;P&gt;Davide&lt;/P&gt;&lt;DIV class="message-edit-history"&gt;&lt;SPAN class="edit-author"&gt;Message Edited by davide.ferrari on&lt;/SPAN&gt; &lt;SPAN class="local-date"&gt;2009-10-08&lt;/SPAN&gt; &lt;SPAN class="local-time"&gt;02:05 PM&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Oct 2009 20:04:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/D-Flash-s19-file-creation/m-p/219796#M9210</guid>
      <dc:creator>davide_ferrari</dc:creator>
      <dc:date>2009-10-08T20:04:49Z</dc:date>
    </item>
  </channel>
</rss>

