<?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>S32 Design Studio中的主题 why the sequence of defined variable is not different from the map file on s32ds?</title>
    <link>https://community.nxp.com/t5/S32-Design-Studio/why-the-sequence-of-defined-variable-is-not-different-from-the/m-p/714934#M2001</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;EM&gt;hellow ,friends&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; develop environment: &lt;STRONG&gt;s32ds&amp;nbsp;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; use chip:&lt;STRONG&gt; &amp;nbsp;S32K144&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; in project ,l define variable as below:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;__attribute__ ((section(".SRAM1"))) uint16_t SCRSys_DataVerH_C;&lt;BR /&gt;__attribute__ ((section(".SRAM1"))) uint16_t SCRSys_DataVerM_C;&lt;BR /&gt;__attribute__ ((section(".SRAM1"))) uint16_t SCRSys_DataVerL_C;&lt;BR /&gt;__attribute__ ((section(".SRAM1"))) uint16_t ExhTemp_tDSTrans_CUR[18];&lt;BR /&gt;__attribute__ ((section(".SRAM1"))) uint16_t TnkTemp_tTransAxis_CUR[26];&lt;BR /&gt;__attribute__ ((section(".SRAM1"))) uint16_t TnkTemp_tTrans_CUR[26];&lt;BR /&gt;__attribute__ ((section(".SRAM1"))) uint16_t TnkLvl_lTransAxis_CUR[17];&lt;BR /&gt;__attribute__ ((section(".SRAM1"))) uint16_t TnkLvl_lTrans_CUR[17];&lt;/EM&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;but in map file ,the &lt;STRONG&gt;sequence&lt;/STRONG&gt; of the variable address is &lt;STRONG&gt;opposite&lt;/STRONG&gt;, l want the sequence of the variable address is &lt;STRONG&gt;the same as&lt;/STRONG&gt; the define variable, how to &lt;STRONG&gt;set&lt;/STRONG&gt; it on &lt;STRONG&gt;s32ds&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;in project map file&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt; .SRAM1 0x1fffb000 0xda ./Sources/test.o&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; 0x1fffb000 TnkLvl_lTrans_CUR&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; 0x1fffb024 TnkLvl_lTransAxis_CUR&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; 0x1fffb048 TnkTemp_tTrans_CUR&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; 0x1fffb07c TnkTemp_tTransAxis_CUR&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; 0x1fffb0b0 ExhTemp_tDSTrans_CUR&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; 0x1fffb0d4 SCRSys_DataVerL_C&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; 0x1fffb0d6 SCRSys_DataVerM_C&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; 0x1fffb0d8 SCRSys_DataVerH_C&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; 0x1fffb0dc . = ALIGN (0x4)&lt;/EM&gt;&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-338911"&gt;hello_world.zip&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 27 Sep 2017 07:25:23 GMT</pubDate>
    <dc:creator>jinshuaixu</dc:creator>
    <dc:date>2017-09-27T07:25:23Z</dc:date>
    <item>
      <title>why the sequence of defined variable is not different from the map file on s32ds?</title>
      <link>https://community.nxp.com/t5/S32-Design-Studio/why-the-sequence-of-defined-variable-is-not-different-from-the/m-p/714934#M2001</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;EM&gt;hellow ,friends&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; develop environment: &lt;STRONG&gt;s32ds&amp;nbsp;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; use chip:&lt;STRONG&gt; &amp;nbsp;S32K144&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; in project ,l define variable as below:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;__attribute__ ((section(".SRAM1"))) uint16_t SCRSys_DataVerH_C;&lt;BR /&gt;__attribute__ ((section(".SRAM1"))) uint16_t SCRSys_DataVerM_C;&lt;BR /&gt;__attribute__ ((section(".SRAM1"))) uint16_t SCRSys_DataVerL_C;&lt;BR /&gt;__attribute__ ((section(".SRAM1"))) uint16_t ExhTemp_tDSTrans_CUR[18];&lt;BR /&gt;__attribute__ ((section(".SRAM1"))) uint16_t TnkTemp_tTransAxis_CUR[26];&lt;BR /&gt;__attribute__ ((section(".SRAM1"))) uint16_t TnkTemp_tTrans_CUR[26];&lt;BR /&gt;__attribute__ ((section(".SRAM1"))) uint16_t TnkLvl_lTransAxis_CUR[17];&lt;BR /&gt;__attribute__ ((section(".SRAM1"))) uint16_t TnkLvl_lTrans_CUR[17];&lt;/EM&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;but in map file ,the &lt;STRONG&gt;sequence&lt;/STRONG&gt; of the variable address is &lt;STRONG&gt;opposite&lt;/STRONG&gt;, l want the sequence of the variable address is &lt;STRONG&gt;the same as&lt;/STRONG&gt; the define variable, how to &lt;STRONG&gt;set&lt;/STRONG&gt; it on &lt;STRONG&gt;s32ds&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;in project map file&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt; .SRAM1 0x1fffb000 0xda ./Sources/test.o&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; 0x1fffb000 TnkLvl_lTrans_CUR&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; 0x1fffb024 TnkLvl_lTransAxis_CUR&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; 0x1fffb048 TnkTemp_tTrans_CUR&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; 0x1fffb07c TnkTemp_tTransAxis_CUR&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; 0x1fffb0b0 ExhTemp_tDSTrans_CUR&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; 0x1fffb0d4 SCRSys_DataVerL_C&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; 0x1fffb0d6 SCRSys_DataVerM_C&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; 0x1fffb0d8 SCRSys_DataVerH_C&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; 0x1fffb0dc . = ALIGN (0x4)&lt;/EM&gt;&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-338911"&gt;hello_world.zip&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Sep 2017 07:25:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-Design-Studio/why-the-sequence-of-defined-variable-is-not-different-from-the/m-p/714934#M2001</guid>
      <dc:creator>jinshuaixu</dc:creator>
      <dc:date>2017-09-27T07:25:23Z</dc:date>
    </item>
    <item>
      <title>Re: why the sequence of defined variable is not different from the map file on s32ds?</title>
      <link>https://community.nxp.com/t5/S32-Design-Studio/why-the-sequence-of-defined-variable-is-not-different-from-the/m-p/714935#M2002</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;In fact this is rather a default GCC compiler behavior then a defect.&amp;nbsp;&amp;nbsp;I've checked on both GCC ARM and e200 GCC with the same result.&lt;/P&gt;&lt;P&gt;Note: Compiler Optimization -O3 vs. non-optimized code the allocation is reversed each other&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Relying on the C source object placement in the order as declared is definitely not a good practice.&lt;/P&gt;&lt;P&gt;If you need to ensure the allocation follows a certain sequence I'd declare it as a single C struct with multiple items representing the objects.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps.&lt;/P&gt;&lt;P&gt;Stan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Sep 2017 14:25:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-Design-Studio/why-the-sequence-of-defined-variable-is-not-different-from-the/m-p/714935#M2002</guid>
      <dc:creator>stanish</dc:creator>
      <dc:date>2017-09-27T14:25:28Z</dc:date>
    </item>
  </channel>
</rss>

