<?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: Exclude section from .romp in CodeWarrior for MCU</title>
    <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Exclude-section-from-romp/m-p/504463#M12795</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;The &lt;STRONG&gt;.romp&lt;/STRONG&gt; is used by the linker for the ‘copy-down’ and initialization of .data.&lt;/P&gt;&lt;P&gt;if you want customize your own linker file, set "Generate linker file" as "no", thus the linker file will not be overwritten by processor expert.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_0.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/59055iF5E6CEC5FBB2B175/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_0.png" alt="pastedImage_0.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Jennie Zhang&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 31 May 2016 06:04:00 GMT</pubDate>
    <dc:creator>ZhangJennie</dc:creator>
    <dc:date>2016-05-31T06:04:00Z</dc:date>
    <item>
      <title>Exclude section from .romp</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Exclude-section-from-romp/m-p/504462#M12794</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I need to exclude an array from being initialized during boot. Therefore I added a new memory section "m_data_reset" in processor expert:&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="148653_148653.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/121548i2E63564202F2F18D/image-size/large?v=v2&amp;amp;px=999" role="button" title="148653_148653.png" alt="148653_148653.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="screenshot.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/56570i12A0C9B9B2E6D30B/image-size/large?v=v2&amp;amp;px=999" role="button" title="screenshot.png" alt="screenshot.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And mapped this array into my new section:&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;static uint8_t __attribute__ ((section (".m_data_reset"))) array[SIZE];&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As expected the new section isn't initialized by "zero_fill_bss()", but it gets zeroed by "__copy_rom_sections_to_ram()". I can manually suppress this by deleting the corresponding lines from ".romp" in the linker file:&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;.romp : AT(_romp_at)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;{&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp; __S_romp = _romp_at;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp; LONG(___ROM_AT);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp; LONG(_sdata);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp; LONG(___data_size);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp; LONG(___m_data_reset_ROMStart);&amp;nbsp; /* These lines */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp; LONG(___m_data_reset_RAMStart);&amp;nbsp; /* I have to&amp;nbsp;&amp;nbsp; */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp; LONG(___m_data_reset_ROMSize);&amp;nbsp;&amp;nbsp; /* delete&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp; LONG(0);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp; LONG(0);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp; LONG(0);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;} &amp;gt; m_data&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But as the linker file gets overwritten every time processor expert is run, I'm looking for a solution to tell processor expert to exclude this section from initialization. (Why is it included anyway in ".romp", the array isn't initialized? And it's not an array issue, a normal - non-array - variable is zeroed by "__copy_rom_sections_to_ram()" as well.)&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The only possible solution I've found up to know is to prevent processor expert to generate the linker file at all and to maintain it manually.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm using CodeWarrior 10.6 for SKEAZN64 with the GNU tool chain.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 May 2016 15:49:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/Exclude-section-from-romp/m-p/504462#M12794</guid>
      <dc:creator>christophschmid</dc:creator>
      <dc:date>2016-05-05T15:49:47Z</dc:date>
    </item>
    <item>
      <title>Re: Exclude section from .romp</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Exclude-section-from-romp/m-p/504463#M12795</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;The &lt;STRONG&gt;.romp&lt;/STRONG&gt; is used by the linker for the ‘copy-down’ and initialization of .data.&lt;/P&gt;&lt;P&gt;if you want customize your own linker file, set "Generate linker file" as "no", thus the linker file will not be overwritten by processor expert.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_0.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/59055iF5E6CEC5FBB2B175/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_0.png" alt="pastedImage_0.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Jennie Zhang&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 May 2016 06:04:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/Exclude-section-from-romp/m-p/504463#M12795</guid>
      <dc:creator>ZhangJennie</dc:creator>
      <dc:date>2016-05-31T06:04:00Z</dc:date>
    </item>
  </channel>
</rss>

