<?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: MAP file and variables declaring order in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/MAP-file-and-variables-declaring-order/m-p/250236#M7027</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;Thank you for testing it. I'll guess I'll just have to deal with it, and hopefully if it doesn't change in the future (the order) then maybe I won't have any problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you very much!&lt;/P&gt;&lt;P&gt;Best Regards!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SebaS&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 26 Jun 2013 12:13:39 GMT</pubDate>
    <dc:creator>sebasira</dc:creator>
    <dc:date>2013-06-26T12:13:39Z</dc:date>
    <item>
      <title>MAP file and variables declaring order</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/MAP-file-and-variables-declaring-order/m-p/250230#M7021</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello to you all!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm working with TWRK60 and IAR Workbench.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've got a doubt about how the linker arrange variables in memory. The way I'm used to work, if I declare a variable before another one, then the first one is located at a smaller memory address.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To my sourprise, I've got the following:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;(Note: NVM_DATA is a macro for placing variables in an specific section)&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;NVM_DATA const tPARAM_MOVIL PROG_MOVIL;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;NVM_DATA const tPARAM_RADIO PROG_RADIO;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and then in the MAP file:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;PROG_MOVIL&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0x0007f810&amp;nbsp;&amp;nbsp;&amp;nbsp; 0xc&amp;nbsp; Data&amp;nbsp; Gb&amp;nbsp; DataNVM.o [1]&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;PROG_RADIO&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0x0007f800&amp;nbsp;&amp;nbsp; 0x10&amp;nbsp; Data&amp;nbsp; Gb&amp;nbsp; DataNVM.o [1]&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As you can see, I declare PROG_MOVIL &lt;STRONG&gt;before&lt;/STRONG&gt; PROG_RADIO, but it's placed &lt;STRONG&gt;after&lt;/STRONG&gt; it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Why's that?&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For me this would represent a problem in the future, when updating the firmware via bootloader, because I can't guarantee that nonVolatileData would be where it is suppose to be.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 May 2013 18:00:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/MAP-file-and-variables-declaring-order/m-p/250230#M7021</guid>
      <dc:creator>sebasira</dc:creator>
      <dc:date>2013-05-21T18:00:43Z</dc:date>
    </item>
    <item>
      <title>Re: MAP file and variables declaring order</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/MAP-file-and-variables-declaring-order/m-p/250231#M7022</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tried to use below code to place variable in a specific address:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#pragma location=0x3000&lt;/P&gt;&lt;P&gt;const int test1 = 1;&lt;/P&gt;&lt;P&gt;const int test2 @ 0x3004 = 2;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then in the map file, I could find below result:&lt;/P&gt;&lt;P&gt;test1&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; 0x00003000&amp;nbsp;&amp;nbsp;&amp;nbsp; 0x4&amp;nbsp; Data&amp;nbsp; Gb&amp;nbsp; hello_world.o [1]&lt;/P&gt;&lt;P&gt;test2&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; 0x00003004&amp;nbsp;&amp;nbsp;&amp;nbsp; 0x4&amp;nbsp; Data&amp;nbsp; Gb&amp;nbsp; hello_world.o [1]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I use below code:&lt;/P&gt;&lt;P&gt;#pragma location=0x3000&lt;/P&gt;&lt;P&gt;const int test1 = 1;&lt;/P&gt;&lt;P&gt;const int test2 = 2;&lt;/P&gt;&lt;P&gt;Then there only place test1 variable in 0x3000, and test2 in another place, the map with below result:&lt;/P&gt;&lt;P&gt;test1&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; 0x00003000&amp;nbsp;&amp;nbsp;&amp;nbsp; 0x4&amp;nbsp; Data&amp;nbsp; Gb&amp;nbsp; hello_world.o [1]&lt;/P&gt;&lt;P&gt;test2&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; 0x000016ec&amp;nbsp;&amp;nbsp;&amp;nbsp; 0x4&amp;nbsp; Data&amp;nbsp; Gb&amp;nbsp; hello_world.o [1]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If it is possible, could you attatch your project .icf file and variable definition code?&lt;/P&gt;&lt;P&gt;Wish it helps.&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Jun 2013 03:02:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/MAP-file-and-variables-declaring-order/m-p/250231#M7022</guid>
      <dc:creator>Hui_Ma</dc:creator>
      <dc:date>2013-06-18T03:02:16Z</dc:date>
    </item>
    <item>
      <title>Re: MAP file and variables declaring order</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/MAP-file-and-variables-declaring-order/m-p/250232#M7023</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Hui_Ma!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In your example, the problem is that &lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;STRONG&gt;#pragma location&lt;/STRONG&gt; only works for the following variable declaration. If you wish to declare 30 variables, you'll need 30 &lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;#pragma location&lt;/SPAN&gt;&lt;/SPAN&gt;.&lt;/P&gt;&lt;P&gt;Also, (I'm not sure) but I guess you'll need to change the address or it will throw you and overlap error&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;#pragma location=0x3000&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;const int test1 = 1;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;#pragma location=0x3004&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;const int test2 = 2;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;#pragma location=0x3008&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Hope it help you out!&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Best regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;SebaS&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Jun 2013 11:29:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/MAP-file-and-variables-declaring-order/m-p/250232#M7023</guid>
      <dc:creator>sebasira</dc:creator>
      <dc:date>2013-06-18T11:29:01Z</dc:date>
    </item>
    <item>
      <title>Re: MAP file and variables declaring order</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/MAP-file-and-variables-declaring-order/m-p/250233#M7024</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sebasira,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for the info.&lt;/P&gt;&lt;P&gt;I want to regenerate your mentioned situation, while I could use the #pragma location works for the following variable.&lt;/P&gt;&lt;P&gt;I consult with IAR engineer, who show me below link:&lt;/P&gt;&lt;P&gt;&lt;A href="http://supp.iar.com/Support/?note=36121"&gt;http://supp.iar.com/Support/?note=36121&lt;/A&gt;&lt;/P&gt;&lt;P&gt;If you could send us your below variable define and related icf file, then I could consult with IAR to get some comments.&lt;/P&gt;&lt;P&gt;&lt;EM&gt;NVM_DATA const tPARAM_MOVIL PROG_MOVIL;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;NVM_DATA const tPARAM_RADIO PROG_RADIO;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Thank you for the attention.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;B.R.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Ma Hui&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Jun 2013 07:50:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/MAP-file-and-variables-declaring-order/m-p/250233#M7024</guid>
      <dc:creator>Hui_Ma</dc:creator>
      <dc:date>2013-06-24T07:50:04Z</dc:date>
    </item>
    <item>
      <title>Re: MAP file and variables declaring order</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/MAP-file-and-variables-declaring-order/m-p/250234#M7025</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Ma Hui!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I guess this is the info you need:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ICF File:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;define symbol __ICFEDIT_region_ROM_DATA_start__ = 0x0007F800;&lt;/P&gt;&lt;P&gt;define symbol __ICFEDIT_region_ROM_DATA_end__&amp;nbsp;&amp;nbsp; = 0x0007FFFF;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;define region ROM_DATA_region&amp;nbsp;&amp;nbsp; = mem:[from __ICFEDIT_region_ROM_DATA_start__&amp;nbsp;&amp;nbsp; to __ICFEDIT_region_ROM_DATA_end__];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;place in ROM_DATA_region {readonly section NVM_DATA};&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Then, in C file:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;#define NVM_DATA&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _Pragma("location=\"NVM_DATA\"")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;EM style="font-family: inherit;"&gt;NVM_DATA const tPARAM_MOVIL PROG_MOVIL;&lt;/EM&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;EM style="font-family: inherit;"&gt;NVM_DATA const tPARAM_RADIO PROG_RADIO;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Notice that &lt;STRONG&gt;_Pragma("location=\"NVM_DATA\"") &lt;/STRONG&gt;is the same as&lt;STRONG&gt; #pragma location="NVM_DATA"&lt;/STRONG&gt;. So the lines above could be read as:&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;#pragma location="NVM_DATA"&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;EM style="font-family: inherit;"&gt;const tPARAM_MOVIL PROG_MOVIL;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;#pragma location="NVM_DATA"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;EM style="font-family: inherit;"&gt;const tPARAM_RADIO PROG_RADIO;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;EM style="font-family: inherit;"&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;STRONG&gt;tPARAM_MOVIL&lt;/STRONG&gt; and &lt;STRONG&gt;tPARAM_RADIO&lt;/STRONG&gt; are some data structures, and don't matter rigth now.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;If you go back to the first post, you would see that the order (memory location) in the MAP file is not the same as the order I define the variables.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;EM style="font-family: inherit;"&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;EM style="font-family: inherit;"&gt;Best Regards,&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;EM style="font-family: inherit;"&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;EM style="font-family: inherit;"&gt;SebaS&lt;BR /&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Jun 2013 12:17:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/MAP-file-and-variables-declaring-order/m-p/250234#M7025</guid>
      <dc:creator>sebasira</dc:creator>
      <dc:date>2013-06-24T12:17:53Z</dc:date>
    </item>
    <item>
      <title>Re: MAP file and variables declaring order</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/MAP-file-and-variables-declaring-order/m-p/250235#M7026</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello SebaS,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I use IAR V6.50.2 software with TWR-K40X256 board.&lt;/P&gt;&lt;P&gt;I config the .icf file below:&lt;/P&gt;&lt;P&gt;define symbol __ICFEDIT_region_ROM_DATA_start__ = 0x0003F800;&lt;/P&gt;&lt;P&gt;define symbol __ICFEDIT_region_ROM_DATA_end__&amp;nbsp;&amp;nbsp; = 0x0003FFFF;&lt;/P&gt;&lt;P&gt;define region ROM_DATA_region&amp;nbsp;&amp;nbsp; = mem:[from __ICFEDIT_region_ROM_DATA_start__&amp;nbsp;&amp;nbsp; to __ICFEDIT_region_ROM_DATA_end__];&lt;/P&gt;&lt;P&gt;place in ROM_DATA_region {readonly section NVM_DATA};&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In C code, I use below codes:&lt;/P&gt;&lt;P&gt; #define NVM_DATA&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _Pragma("location=\"NVM_DATA\"")&lt;BR /&gt;NVM_DATA const int test1 = 0x1 ;&lt;/P&gt;&lt;P&gt;NVM_DATA const int test2 = 0x2;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then after compile, I check the .map file and get below result:&lt;/P&gt;&lt;P&gt;test1&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; 0x0003f800&amp;nbsp;&amp;nbsp;&amp;nbsp; 0x4&amp;nbsp; Data&amp;nbsp; Gb&amp;nbsp; hello_world.o [1]&lt;/P&gt;&lt;P&gt;test2&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; 0x0003f804&amp;nbsp;&amp;nbsp;&amp;nbsp; 0x4&amp;nbsp; Data&amp;nbsp; Gb&amp;nbsp; hello_world.o [1]&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It shows the variables place in ROM with initilization order.&lt;/P&gt;&lt;P&gt;I don't meet your description issue.&lt;/P&gt;&lt;P&gt;Thank you for the attention.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Jun 2013 06:47:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/MAP-file-and-variables-declaring-order/m-p/250235#M7026</guid>
      <dc:creator>Hui_Ma</dc:creator>
      <dc:date>2013-06-26T06:47:59Z</dc:date>
    </item>
    <item>
      <title>Re: MAP file and variables declaring order</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/MAP-file-and-variables-declaring-order/m-p/250236#M7027</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;Thank you for testing it. I'll guess I'll just have to deal with it, and hopefully if it doesn't change in the future (the order) then maybe I won't have any problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you very much!&lt;/P&gt;&lt;P&gt;Best Regards!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SebaS&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Jun 2013 12:13:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/MAP-file-and-variables-declaring-order/m-p/250236#M7027</guid>
      <dc:creator>sebasira</dc:creator>
      <dc:date>2013-06-26T12:13:39Z</dc:date>
    </item>
  </channel>
</rss>

