<?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>S32Kのトピックplacing data in an absolute address in flash(ROM)</title>
    <link>https://community.nxp.com/t5/S32K/placing-data-in-an-absolute-address-in-flash-ROM/m-p/670686#M725</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 place a variable called my_checksum in an absolute flash location. Target is S32K144EVB and I'm using design studio 1.3. Here is what I did:&lt;/P&gt;&lt;P&gt;In the linker file used for this project which is attached.I added&amp;nbsp; &lt;STRONG style="font-size: small;"&gt;m_chksum &lt;/STRONG&gt; to memory areas:&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/* Specify the memory areas */&lt;/P&gt;&lt;P&gt;MEMORY&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #cc0000; font-size: small;"&gt;/* Flash */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; m_interrupts (RX) : &lt;/SPAN&gt;&lt;STRONG style=": ; color: #006699; font-size: small;"&gt;ORIGIN&lt;/STRONG&gt;&lt;SPAN style="font-size: small;"&gt; = 0x00000000, &lt;/SPAN&gt;&lt;STRONG style=": ; color: #006699; font-size: small;"&gt;LENGTH&lt;/STRONG&gt;&lt;SPAN style="font-size: small;"&gt; = 0x00000400&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; m_flash_config (RX) : &lt;/SPAN&gt;&lt;STRONG style=": ; color: #006699; font-size: small;"&gt;ORIGIN&lt;/STRONG&gt;&lt;SPAN style="font-size: small;"&gt; = 0x00000400, &lt;/SPAN&gt;&lt;STRONG style=": ; color: #006699; font-size: small;"&gt;LENGTH&lt;/STRONG&gt;&lt;SPAN style="font-size: small;"&gt; = 0x00000010&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; m_text (RX) : &lt;/SPAN&gt;&lt;STRONG style=": ; color: #006699; font-size: small;"&gt;ORIGIN&lt;/STRONG&gt;&lt;SPAN style="font-size: small;"&gt; = 0x00000410, &lt;/SPAN&gt;&lt;STRONG style=": ; color: #006699; font-size: small;"&gt;LENGTH&lt;/STRONG&gt;&lt;SPAN style="font-size: small;"&gt; = 0x00070000&lt;/SPAN&gt;&lt;SPAN style="color: #cc0000; font-size: small;"&gt;/*0x0007FBF0*/&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #cc0000; font-size: small;"&gt;/*this was added*/&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN style="font-size: small;"&gt; m_chksum (RX) : &lt;/SPAN&gt;&lt;SPAN style="color: #006699; font-size: small;"&gt;ORIGIN&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt; = 0x00070410, &lt;/SPAN&gt;&lt;SPAN style="color: #006699; font-size: small;"&gt;LENGTH&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt; = 0x00000008&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #cc0000; font-size: small;"&gt;/* SRAM_L */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; m_data (RW) : &lt;/SPAN&gt;&lt;STRONG style=": ; color: #006699; font-size: small;"&gt;ORIGIN&lt;/STRONG&gt;&lt;SPAN style="font-size: small;"&gt; = 0x1FFF8000, &lt;/SPAN&gt;&lt;STRONG style=": ; color: #006699; font-size: small;"&gt;LENGTH&lt;/STRONG&gt;&lt;SPAN style="font-size: small;"&gt; = 0x00008000&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #cc0000; font-size: small;"&gt;/* SRAM_U */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; m_data_2 (RW) : &lt;/SPAN&gt;&lt;STRONG style=": ; color: #006699; font-size: small;"&gt;ORIGIN&lt;/STRONG&gt;&lt;SPAN style="font-size: small;"&gt; = 0x20000000, &lt;/SPAN&gt;&lt;STRONG style=": ; color: #006699; font-size: small;"&gt;LENGTH&lt;/STRONG&gt;&lt;SPAN style="font-size: small;"&gt; = 0x00007000&lt;/SPAN&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;and added the section below:&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #cc0000; font-size: small;"&gt;/* koor added*/&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;.myBufBlock :&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; . = &lt;/SPAN&gt;&lt;STRONG style=": ; color: #0099ff; font-size: small;"&gt;ALIGN&lt;/STRONG&gt;&lt;SPAN style="font-size: small;"&gt;(4);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #0099ff; font-size: small;"&gt;KEEP&lt;/STRONG&gt;&lt;SPAN style="font-size: small;"&gt;(*(.myBufBlock)) &lt;/SPAN&gt;&lt;SPAN style="color: #cc0000; font-size: small;"&gt;/* keep my variable even if not referenced */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; . = &lt;/SPAN&gt;&lt;STRONG style=": ; color: #0099ff; font-size: small;"&gt;ALIGN&lt;/STRONG&gt;&lt;SPAN style="font-size: small;"&gt;(4);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;} &amp;gt; m_chksum&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the main.c I added the line below, just before main()&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #7f0055; font-size: small;"&gt;&lt;STRONG&gt;__attribute__&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;((section (&lt;/SPAN&gt;&lt;SPAN style="color: #2a00ff; font-size: small;"&gt;".myBufBlock"&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;))) &lt;/SPAN&gt;&lt;STRONG style=": ; color: #7f0055; font-size: small;"&gt;unsigned&lt;/STRONG&gt;&lt;SPAN style="font-size: small;"&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #7f0055; font-size: small;"&gt;long&lt;/STRONG&gt;&lt;SPAN style="font-size: small;"&gt; my_chksum=0X12345678 ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt;looking at the MAP file it places my_chksum at &amp;nbsp;0x1fff8400&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; my_chksum&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;which is the start of the code _ram in .data section .&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any idea why is it doing that?&lt;/P&gt;&lt;P&gt;The target is a 512k part and I am not exceeding that .when I build the code and run&amp;nbsp;, everything seems normal except the address of my_chksum variable.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Koorosh Hajiani&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Original Attachment has been moved to: &lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-338533"&gt;S32K1xx_flash.ld.zip&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 21 Jun 2017 20:26:01 GMT</pubDate>
    <dc:creator>hajianik</dc:creator>
    <dc:date>2017-06-21T20:26:01Z</dc:date>
    <item>
      <title>placing data in an absolute address in flash(ROM)</title>
      <link>https://community.nxp.com/t5/S32K/placing-data-in-an-absolute-address-in-flash-ROM/m-p/670686#M725</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 place a variable called my_checksum in an absolute flash location. Target is S32K144EVB and I'm using design studio 1.3. Here is what I did:&lt;/P&gt;&lt;P&gt;In the linker file used for this project which is attached.I added&amp;nbsp; &lt;STRONG style="font-size: small;"&gt;m_chksum &lt;/STRONG&gt; to memory areas:&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/* Specify the memory areas */&lt;/P&gt;&lt;P&gt;MEMORY&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #cc0000; font-size: small;"&gt;/* Flash */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; m_interrupts (RX) : &lt;/SPAN&gt;&lt;STRONG style=": ; color: #006699; font-size: small;"&gt;ORIGIN&lt;/STRONG&gt;&lt;SPAN style="font-size: small;"&gt; = 0x00000000, &lt;/SPAN&gt;&lt;STRONG style=": ; color: #006699; font-size: small;"&gt;LENGTH&lt;/STRONG&gt;&lt;SPAN style="font-size: small;"&gt; = 0x00000400&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; m_flash_config (RX) : &lt;/SPAN&gt;&lt;STRONG style=": ; color: #006699; font-size: small;"&gt;ORIGIN&lt;/STRONG&gt;&lt;SPAN style="font-size: small;"&gt; = 0x00000400, &lt;/SPAN&gt;&lt;STRONG style=": ; color: #006699; font-size: small;"&gt;LENGTH&lt;/STRONG&gt;&lt;SPAN style="font-size: small;"&gt; = 0x00000010&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; m_text (RX) : &lt;/SPAN&gt;&lt;STRONG style=": ; color: #006699; font-size: small;"&gt;ORIGIN&lt;/STRONG&gt;&lt;SPAN style="font-size: small;"&gt; = 0x00000410, &lt;/SPAN&gt;&lt;STRONG style=": ; color: #006699; font-size: small;"&gt;LENGTH&lt;/STRONG&gt;&lt;SPAN style="font-size: small;"&gt; = 0x00070000&lt;/SPAN&gt;&lt;SPAN style="color: #cc0000; font-size: small;"&gt;/*0x0007FBF0*/&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #cc0000; font-size: small;"&gt;/*this was added*/&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN style="font-size: small;"&gt; m_chksum (RX) : &lt;/SPAN&gt;&lt;SPAN style="color: #006699; font-size: small;"&gt;ORIGIN&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt; = 0x00070410, &lt;/SPAN&gt;&lt;SPAN style="color: #006699; font-size: small;"&gt;LENGTH&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt; = 0x00000008&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #cc0000; font-size: small;"&gt;/* SRAM_L */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; m_data (RW) : &lt;/SPAN&gt;&lt;STRONG style=": ; color: #006699; font-size: small;"&gt;ORIGIN&lt;/STRONG&gt;&lt;SPAN style="font-size: small;"&gt; = 0x1FFF8000, &lt;/SPAN&gt;&lt;STRONG style=": ; color: #006699; font-size: small;"&gt;LENGTH&lt;/STRONG&gt;&lt;SPAN style="font-size: small;"&gt; = 0x00008000&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #cc0000; font-size: small;"&gt;/* SRAM_U */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; m_data_2 (RW) : &lt;/SPAN&gt;&lt;STRONG style=": ; color: #006699; font-size: small;"&gt;ORIGIN&lt;/STRONG&gt;&lt;SPAN style="font-size: small;"&gt; = 0x20000000, &lt;/SPAN&gt;&lt;STRONG style=": ; color: #006699; font-size: small;"&gt;LENGTH&lt;/STRONG&gt;&lt;SPAN style="font-size: small;"&gt; = 0x00007000&lt;/SPAN&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;and added the section below:&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #cc0000; font-size: small;"&gt;/* koor added*/&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;.myBufBlock :&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; . = &lt;/SPAN&gt;&lt;STRONG style=": ; color: #0099ff; font-size: small;"&gt;ALIGN&lt;/STRONG&gt;&lt;SPAN style="font-size: small;"&gt;(4);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #0099ff; font-size: small;"&gt;KEEP&lt;/STRONG&gt;&lt;SPAN style="font-size: small;"&gt;(*(.myBufBlock)) &lt;/SPAN&gt;&lt;SPAN style="color: #cc0000; font-size: small;"&gt;/* keep my variable even if not referenced */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; . = &lt;/SPAN&gt;&lt;STRONG style=": ; color: #0099ff; font-size: small;"&gt;ALIGN&lt;/STRONG&gt;&lt;SPAN style="font-size: small;"&gt;(4);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;} &amp;gt; m_chksum&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the main.c I added the line below, just before main()&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #7f0055; font-size: small;"&gt;&lt;STRONG&gt;__attribute__&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;((section (&lt;/SPAN&gt;&lt;SPAN style="color: #2a00ff; font-size: small;"&gt;".myBufBlock"&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;))) &lt;/SPAN&gt;&lt;STRONG style=": ; color: #7f0055; font-size: small;"&gt;unsigned&lt;/STRONG&gt;&lt;SPAN style="font-size: small;"&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #7f0055; font-size: small;"&gt;long&lt;/STRONG&gt;&lt;SPAN style="font-size: small;"&gt; my_chksum=0X12345678 ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt;looking at the MAP file it places my_chksum at &amp;nbsp;0x1fff8400&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; my_chksum&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;which is the start of the code _ram in .data section .&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any idea why is it doing that?&lt;/P&gt;&lt;P&gt;The target is a 512k part and I am not exceeding that .when I build the code and run&amp;nbsp;, everything seems normal except the address of my_chksum variable.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Koorosh Hajiani&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Original Attachment has been moved to: &lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-338533"&gt;S32K1xx_flash.ld.zip&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Jun 2017 20:26:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/placing-data-in-an-absolute-address-in-flash-ROM/m-p/670686#M725</guid>
      <dc:creator>hajianik</dc:creator>
      <dc:date>2017-06-21T20:26:01Z</dc:date>
    </item>
    <item>
      <title>Re: placing data in an absolute address in flash(ROM)</title>
      <link>https://community.nxp.com/t5/S32K/placing-data-in-an-absolute-address-in-flash-ROM/m-p/670687#M726</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;linker file you shared does not contain the code you have written in your post, but when I tested the code you wrote above, map file is correct and variable my_chksum is placed at address 0x00070410.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please see the files in the attachment.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Martin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Jun 2017 13:49:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/placing-data-in-an-absolute-address-in-flash-ROM/m-p/670687#M726</guid>
      <dc:creator>martin_kovar</dc:creator>
      <dc:date>2017-06-22T13:49:34Z</dc:date>
    </item>
    <item>
      <title>Re: placing data in an absolute address in flash(ROM)</title>
      <link>https://community.nxp.com/t5/S32K/placing-data-in-an-absolute-address-in-flash-ROM/m-p/670688#M727</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Thanks for the reply.&lt;/P&gt;&lt;P&gt;Sorry&lt;/P&gt;&lt;P&gt;where are the attachment you are talking about. I don't see them.&lt;/P&gt;&lt;P&gt;I'm totally confused now.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Koorosh Hajiani&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Jun 2017 14:32:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/placing-data-in-an-absolute-address-in-flash-ROM/m-p/670688#M727</guid>
      <dc:creator>hajianik</dc:creator>
      <dc:date>2017-06-22T14:32:10Z</dc:date>
    </item>
    <item>
      <title>Re: placing data in an absolute address in flash(ROM)</title>
      <link>https://community.nxp.com/t5/S32K/placing-data-in-an-absolute-address-in-flash-ROM/m-p/670689#M728</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So I KNOW WHAT THE ISSUE WAS NOW , THANKS FOR POINTING THAT OUT.&lt;/P&gt;&lt;P&gt;In my project folder in Design Studio under&amp;nbsp; &lt;STRONG&gt;Project_Setting/Linker_Files/&lt;/STRONG&gt;&amp;nbsp; , there are seceral .ld files :&lt;/P&gt;&lt;P&gt;S32K144_100_flash.ld ....and also S32K1xx_flash.ld. Cheking the project property just now ,I realized that this one&lt;/P&gt;&lt;P&gt;"S32K1xx_flash.ld" is used as the Linker Script file for this project and this is the one I attached yesterday.&lt;/P&gt;&lt;P&gt;However when I was doing this yesterday, I was under the impression that "S32K144_100_flash.ld" is the file used for the project and did modify this file which was not used by the project.&lt;/P&gt;&lt;P&gt;So I did not mean to attach "S32K1xx_flash.ld" but I did&amp;nbsp; by mistake (Go Figure)which led to the solution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Koorosh Hajiani&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Jun 2017 15:14:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/placing-data-in-an-absolute-address-in-flash-ROM/m-p/670689#M728</guid>
      <dc:creator>hajianik</dc:creator>
      <dc:date>2017-06-22T15:14:49Z</dc:date>
    </item>
    <item>
      <title>Re: placing data in an absolute address in flash(ROM)</title>
      <link>https://community.nxp.com/t5/S32K/placing-data-in-an-absolute-address-in-flash-ROM/m-p/670690#M729</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Something peculiar about this that I can't explain,&lt;/P&gt;&lt;P&gt;When I look at the hex file generated for this, the address 0x70410 does not exist and yet the variable "my-chksum" that I placed at that address&amp;nbsp;appears in the Map file correctly.&lt;/P&gt;&lt;P&gt;I also print the address of this variable correctly.&lt;/P&gt;&lt;P&gt;Furthermore when examining the disassembly of the code, It appears that the address is fetched from location 0x5064 which is in the main.o memory region and looking at that location in the hex file ,it in fact contains the address 0x70410.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you shed some light on this?&amp;nbsp;&lt;/P&gt;&lt;P&gt;why this location is not in .hex file and why it is accessed via&amp;nbsp; location 0x5064?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Koorosh Hajiani&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Jun 2017 14:49:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/placing-data-in-an-absolute-address-in-flash-ROM/m-p/670690#M729</guid>
      <dc:creator>hajianik</dc:creator>
      <dc:date>2017-06-23T14:49:24Z</dc:date>
    </item>
    <item>
      <title>Re: placing data in an absolute address in flash(ROM)</title>
      <link>https://community.nxp.com/t5/S32K/placing-data-in-an-absolute-address-in-flash-ROM/m-p/670691#M730</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 used your code and works correct on my side. Please see figures below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/24534i5DC688FFCBF5DF3C/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is map file:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_2.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/24498iF0F085E6986E7145/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_2.png" alt="pastedImage_2.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am attaching you the project I used.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Martin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Jun 2017 11:43:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/placing-data-in-an-absolute-address-in-flash-ROM/m-p/670691#M730</guid>
      <dc:creator>martin_kovar</dc:creator>
      <dc:date>2017-06-26T11:43:02Z</dc:date>
    </item>
    <item>
      <title>Re: placing data in an absolute address in flash(ROM)</title>
      <link>https://community.nxp.com/t5/S32K/placing-data-in-an-absolute-address-in-flash-ROM/m-p/670692#M731</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Martin,&lt;/P&gt;&lt;P&gt;Thank you for your response.&lt;/P&gt;&lt;P&gt;I noticed that in your project you've selected the "S-RECORD" for the flash image .&lt;/P&gt;&lt;P&gt;this works for me too however when I select the "INTEL HEX" , it will place 0X 70410 at location 0x5064(as if 0x5064 is a pointer which points to location 0x70410&amp;nbsp;and yet this section shows correctly in the MAP file.&lt;/P&gt;&lt;P&gt;This is a bit strange. I've been googling this and can't find any answers. the&amp;nbsp; image of hex file is attached.&lt;/P&gt;&lt;P&gt;Keep in mind the Endianess of Intel vs. Motorola.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Koorosh Hajiani&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper" image-alt="hex_capture.PNG"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/24042i11B3911319A63BB2/image-size/large?v=v2&amp;amp;px=999" role="button" title="hex_capture.PNG" alt="hex_capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Jun 2017 14:46:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/placing-data-in-an-absolute-address-in-flash-ROM/m-p/670692#M731</guid>
      <dc:creator>hajianik</dc:creator>
      <dc:date>2017-06-26T14:46:04Z</dc:date>
    </item>
    <item>
      <title>Re: placing data in an absolute address in flash(ROM)</title>
      <link>https://community.nxp.com/t5/S32K/placing-data-in-an-absolute-address-in-flash-ROM/m-p/670693#M732</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please share the complete hex file. Probably the section you have created is appended at the end.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Sep 2019 12:46:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/placing-data-in-an-absolute-address-in-flash-ROM/m-p/670693#M732</guid>
      <dc:creator>ummerkunnummalk</dc:creator>
      <dc:date>2019-09-09T12:46:26Z</dc:date>
    </item>
    <item>
      <title>Re: placing data in an absolute address in flash(ROM)</title>
      <link>https://community.nxp.com/t5/S32K/placing-data-in-an-absolute-address-in-flash-ROM/m-p/670694#M733</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May I recommend that you change the variable definition to include the &lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;const&lt;/SPAN&gt; modifier?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="language-c line-numbers"&gt;&lt;CODE&gt;&lt;SPAN class="token function"&gt;__attribute__&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;section &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;".myBufBlock"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;const&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;unsigned&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;long&lt;/SPAN&gt; my_chksum&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0X12345678&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Because your declaration was non-&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;const&lt;/SPAN&gt;, the compiler wants to put it in ROM as an initialised variable, and then copy it into RAM at boot for you to modify it. By declaring a linker section for it this process is altered, but you're still making it hard for the compiler.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;By making it &lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;const&lt;/SPAN&gt;, it makes more sense to&amp;nbsp;whoever reads the code, as well as the compiler.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As for the "accessed via &lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;0x5064&lt;/SPAN&gt;" issue, that has to do with the ARM assembly language. Every ARM instruction is exactly 32 bits (16 bits for Thumb/Thumb2, but that's another topic). That means that it cannot encode a 32-bit offset into an instruction - there'd be no room left for the actual op-code! So instead what the compiler does is encode an instruction like "Load&amp;nbsp;a register with the 32-bit contents of memory that is 128 bytes away from here":&lt;/P&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;ldr    r13,(pc+0x80)&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;The value &lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;0x80&lt;/SPAN&gt; is easily stored as part of the rest of the&amp;nbsp;op-code - the maximum is&amp;nbsp;±4095 bytes - but it means that the compiler has to also store the 32-bit address in the code somewhere nearby, rather than explicitly as part of the instruction.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Jul 2020 04:47:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/placing-data-in-an-absolute-address-in-flash-ROM/m-p/670694#M733</guid>
      <dc:creator>johnadriaan</dc:creator>
      <dc:date>2020-07-31T04:47:07Z</dc:date>
    </item>
  </channel>
</rss>

