<?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: How to force constants in a specific section (MPC5668G with CW10.5) in CodeWarrior Development Tools</title>
    <link>https://community.nxp.com/t5/CodeWarrior-Development-Tools/How-to-force-constants-in-a-specific-section-MPC5668G-with-CW10/m-p/463931#M3505</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Hugo&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Arial','sans-serif';"&gt;Could you please replace your code in link command file with this one? And leave the ‘Generate ROM Image’ options with their default settings. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG style="font-family: 'Arial','sans-serif';"&gt;GROUP&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Arial','sans-serif';"&gt; : {&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Arial','sans-serif';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .__software_version (CONST) LOAD(&lt;STRONG&gt;ADDR&lt;/STRONG&gt;(.__software_version)): {}&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Arial','sans-serif';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } &amp;gt; system_cfg&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Arial','sans-serif';"&gt;Best Regards&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Arial','sans-serif';"&gt;Fiona Kuang&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Arial','sans-serif';"&gt;TIC - Technical Information Center&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Arial','sans-serif';"&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Arial','sans-serif';"&gt;Note: If this post answers your question, please click the Mark Correct button. Thank you!&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 21 Apr 2016 09:38:46 GMT</pubDate>
    <dc:creator>TICS_Fiona</dc:creator>
    <dc:date>2016-04-21T09:38:46Z</dc:date>
    <item>
      <title>How to force constants in a specific section (MPC5668G with CW10.5)</title>
      <link>https://community.nxp.com/t5/CodeWarrior-Development-Tools/How-to-force-constants-in-a-specific-section-MPC5668G-with-CW10/m-p/463930#M3504</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 trying to create a section at a specific address in which I want to put the software version of the application so it can be read back by the bootloader. Here is what I did in the linker script:&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;MEMORY&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; resetvector:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; org = 0x00000000,&amp;nbsp;&amp;nbsp; len = 0x00000008&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; system_cfg:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; org = 0x00003000,&amp;nbsp;&amp;nbsp; len = 0x00000010&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; internal_flash:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; org = 0x00003010,&amp;nbsp;&amp;nbsp; len = 0x000FCFF0&lt;/P&gt;&lt;P&gt;(...)&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(...)&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;GROUP: {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; .__software_version (CONST) : {}&lt;/P&gt;&lt;P&gt;} &amp;gt; system_cfg&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In my code, I have declared the software version constant as follow:&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;#pragma push&lt;/P&gt;&lt;P&gt;#pragma section R ".__software_version" ".__software_version"&lt;/P&gt;&lt;P&gt;__declspec (section ".__software_version") const uint32_t ESM_ku32NESSoftwareVersion;&lt;/P&gt;&lt;P&gt;#pragma pop&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the linker setting, I put ROM Image Address and RAM Buffer Address of ROM Image at 0x00003010 but the code won't boot. It get stuck in __init_data function. I've also tried to put 0x00003000 but it doesn't even reach the __start function and I get warnings at compilation on ROM image address overlapping other sections.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What am I doing wrong? Can anyone help me please?&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hugo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Apr 2016 16:05:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-Development-Tools/How-to-force-constants-in-a-specific-section-MPC5668G-with-CW10/m-p/463930#M3504</guid>
      <dc:creator>hbouch</dc:creator>
      <dc:date>2016-04-20T16:05:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to force constants in a specific section (MPC5668G with CW10.5)</title>
      <link>https://community.nxp.com/t5/CodeWarrior-Development-Tools/How-to-force-constants-in-a-specific-section-MPC5668G-with-CW10/m-p/463931#M3505</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Hugo&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Arial','sans-serif';"&gt;Could you please replace your code in link command file with this one? And leave the ‘Generate ROM Image’ options with their default settings. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG style="font-family: 'Arial','sans-serif';"&gt;GROUP&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Arial','sans-serif';"&gt; : {&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Arial','sans-serif';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .__software_version (CONST) LOAD(&lt;STRONG&gt;ADDR&lt;/STRONG&gt;(.__software_version)): {}&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Arial','sans-serif';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } &amp;gt; system_cfg&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Arial','sans-serif';"&gt;Best Regards&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Arial','sans-serif';"&gt;Fiona Kuang&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Arial','sans-serif';"&gt;TIC - Technical Information Center&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Arial','sans-serif';"&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Arial','sans-serif';"&gt;Note: If this post answers your question, please click the Mark Correct button. Thank you!&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Apr 2016 09:38:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-Development-Tools/How-to-force-constants-in-a-specific-section-MPC5668G-with-CW10/m-p/463931#M3505</guid>
      <dc:creator>TICS_Fiona</dc:creator>
      <dc:date>2016-04-21T09:38:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to force constants in a specific section (MPC5668G with CW10.5)</title>
      <link>https://community.nxp.com/t5/CodeWarrior-Development-Tools/How-to-force-constants-in-a-specific-section-MPC5668G-with-CW10/m-p/463932#M3506</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Fiona,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your answer but it didn't solve my problem. However I'm sure of what you mean when you say "&lt;SPAN style="font-family: 'Arial','sans-serif';"&gt;eave the ‘Generate ROM Image’ options with their default settings". I assumed 0x00003000. It compiles with the following linker warnings:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"Overlap of the ROM image address of .init section with executable address of .init section."&lt;/P&gt;&lt;P&gt;"Overlap of the ROM image address of .text section with executable address of .text section."&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I look at the .sx file, I see the block at address 0x00003000 but the content is not what I expected. I should see the software version (0x12345678):&lt;/P&gt;&lt;P&gt;S31900003000480000697C6000A6646302007C6001247FE802A6AA&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If forgot the initialisation of the constant in my previous post. You should have read:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#pragma push&lt;/P&gt;&lt;P&gt;#pragma section R ".__software_version" ".__software_version"&lt;/P&gt;&lt;P&gt;__declspec (section ".__software_version") const uint32_t ESM_ku32NESSoftwareVersion&lt;STRONG&gt; = 0x12345678&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;#pragma pop&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any other ideas?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Apr 2016 12:13:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-Development-Tools/How-to-force-constants-in-a-specific-section-MPC5668G-with-CW10/m-p/463932#M3506</guid>
      <dc:creator>hbouch</dc:creator>
      <dc:date>2016-04-21T12:13:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to force constants in a specific section (MPC5668G with CW10.5)</title>
      <link>https://community.nxp.com/t5/CodeWarrior-Development-Tools/How-to-force-constants-in-a-specific-section-MPC5668G-with-CW10/m-p/463933#M3507</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The ROM Image Address and RAM Buffer Address of ROM Image that should be used is 0x00003010. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, to make sure that my constant is in the output file, __declspec(force_export) has to be used in the declaration:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#pragma push&lt;/P&gt;&lt;P&gt;#pragma section R ".__software_version"&lt;/P&gt;&lt;P&gt;__declspec(section ".__software_version") &lt;STRONG&gt;__declspec(force_export)&lt;/STRONG&gt; const uint32_t ESM_ku32NESSoftwareVersion = 0x12345678;&lt;/P&gt;&lt;P&gt;#pragma pop&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for you help.&lt;/P&gt;&lt;P&gt;Hugo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Apr 2016 16:04:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-Development-Tools/How-to-force-constants-in-a-specific-section-MPC5668G-with-CW10/m-p/463933#M3507</guid>
      <dc:creator>hbouch</dc:creator>
      <dc:date>2016-04-25T16:04:37Z</dc:date>
    </item>
  </channel>
</rss>

