<?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 Code port to S32K controller in S32 Design Studio</title>
    <link>https://community.nxp.com/t5/S32-Design-Studio/Code-port-to-S32K-controller/m-p/780527#M3047</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 need to port the code&amp;nbsp;from Renesas to NXP (IAR compiler&amp;nbsp;used for renesas development ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the code has&amp;nbsp;some compiler oriented directives , I am not getting how to change those directives to S32 design studio&amp;nbsp;(gcc compiler)&amp;nbsp; support format.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Problem 1:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #7f0055; font-size: small;"&gt;&lt;STRONG&gt;#pragma&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt; segment&lt;SPAN style="text-decoration: underline;"&gt;=&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #2a00ff; text-decoration: underline; font-size: small;"&gt;"bl_fsl_codearea_RAM"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style=": ; color: #7f0055; text-decoration: underline; font-size: small;"&gt;#pragma&lt;/STRONG&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;SPAN style="font-size: small;"&gt; segment=&lt;/SPAN&gt;&lt;SPAN style="color: #2a00ff; font-size: small;"&gt;"bl_blc_globaldata_RAM"&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt; __far&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #005032; font-size: small;"&gt;T_U32&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt; __far *u32SegmentStartAddress;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #005032; font-size: small;"&gt;T_U32&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt; __far *u32SegmentEndAddress;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style=": ; color: #7f0055; font-size: small;"&gt;volatile&lt;/STRONG&gt;&lt;SPAN style="font-size: small;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #005032; font-size: small;"&gt;T_BOOL&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt; boolInterruptFlagValue;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;/* Clear BL_FSL_CODE_RAM */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;&lt;SPAN style="text-decoration: underline; font-size: small;"&gt;u32SegmentStartAddress = __segment_begin(&lt;/SPAN&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;SPAN style="color: #2a00ff; font-size: small;"&gt;"bl_fsl_codearea_RAM"&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;);&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline; font-size: small;"&gt;u32SegmentEndAddress = __segment_end(&lt;/SPAN&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;SPAN style="color: #2a00ff; font-size: small;"&gt;"bl_fsl_codearea_RAM"&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;);&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style=": ; color: #7f0055; font-size: small;"&gt;while&lt;/STRONG&gt;&lt;SPAN style="font-size: small;"&gt; (u32SegmentStartAddress &amp;lt; u32SegmentEndAddress)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;*u32SegmentStartAddress = 0x00U;&lt;/P&gt;&lt;P&gt;u32SegmentStartAddress++;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Problem 2 :&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #7f0055; font-size: small;"&gt;&lt;STRONG&gt;#pragma&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt; dataseg=&lt;/SPAN&gt;&lt;SPAN style="color: #2a00ff; font-size: small;"&gt;"m_bl_std_faiRecdata_RAM"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;__no_init StdFailurRecord_t gStdFailureRecord;&lt;SPAN style="font-size: small;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #7f0055; font-size: small;"&gt;&lt;STRONG&gt;#pragma&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt; dataseg=&lt;/SPAN&gt;&lt;STRONG style=": ; color: #7f0055; font-size: small;"&gt;default&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style=": ; color: #7f0055; font-size: small;"&gt;the above code can be replace&amp;nbsp;with &amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style=": ; color: #7f0055; font-size: small;"&gt;&lt;SPAN style="color: #7f0055; font-size: small;"&gt;__attribute__&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;((section(&lt;/SPAN&gt;&lt;SPAN style="color: #2a00ff; font-size: small;"&gt;"m_bl_std_faiRecdata_RAM"&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;))) &lt;/SPAN&gt;&lt;SPAN style="color: #005032; font-size: small;"&gt;StdFailurRecord_t&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt; gStdFailureRecord;&lt;/SPAN&gt; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;is this correct?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Problem 3:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #7f0055; font-size: small;"&gt;&lt;STRONG&gt;#pragma&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt; constseg=&lt;/SPAN&gt;&lt;SPAN style="color: #2a00ff; font-size: small;"&gt;"m_blc_Configdata_start"&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // IAR code&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;__root &lt;SPAN style="text-decoration: underline;"&gt;const&lt;/SPAN&gt; ConfigData_t gConfigData =&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #7f0055; font-size: small;"&gt;&lt;STRONG&gt;const&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #005032; font-size: small;"&gt;ConfigData_t&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt; gConfigData &lt;/SPAN&gt;&lt;STRONG style=": ; color: #7f0055; font-size: small;"&gt;__attribute__&lt;/STRONG&gt;&lt;SPAN style="font-size: small;"&gt;((used)) =&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;{ 0xFFU,0xFFU,0xFFU,0xFFU,0xFFU,0xFFU,0xFFU,0xFFU}&lt;/P&gt;&lt;P&gt;};&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #7f0055; font-size: small;"&gt;&lt;STRONG&gt;#pragma&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt; dataseg=&lt;/SPAN&gt;&lt;STRONG style=": ; color: #7f0055; font-size: small;"&gt;default;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style=": ; color: #7f0055; font-size: small;"&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have replaced the code with&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #7f0055; font-size: small;"&gt;&lt;STRONG&gt;#pragma&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt; constseg=&lt;/SPAN&gt;&lt;SPAN style="color: #2a00ff; font-size: small;"&gt;"m_blc_Configdata_start"&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // GCC code&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #7f0055; font-size: small;"&gt;&lt;STRONG&gt;const&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #005032; font-size: small;"&gt;ConfigData_t&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt; gConfigData &lt;/SPAN&gt;&lt;STRONG style=": ; color: #7f0055; font-size: small;"&gt;__attribute__&lt;/STRONG&gt;&lt;SPAN style="font-size: small;"&gt;((used)) =&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;{ 0xFFU,0xFFU,0xFFU,0xFFU,0xFFU,0xFFU,0xFFU,0xFFU}&lt;/P&gt;&lt;P&gt;};&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #7f0055; font-size: small;"&gt;&lt;STRONG&gt;#pragma&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt; dataseg=&lt;/SPAN&gt;&lt;STRONG style=": ; color: #7f0055; font-size: small;"&gt;default&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;is it correct?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Problem 4:&lt;/P&gt;&lt;P&gt;what can I replace far and near&amp;nbsp;of &amp;nbsp;IAR in GCC compiler supportable format?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #005032; font-size: small;"&gt;T_U32&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt; __far *u32SegmentStartAddress;&lt;/SPAN&gt; (IAR format).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have gone through the gcc compiler reference manual and solved some of the compiler oriented directives errors,&lt;/P&gt;&lt;P&gt;the above directives are not getting how to solve.&lt;/P&gt;&lt;P&gt;kindly need your help in this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ambarish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 12 Dec 2017 09:07:14 GMT</pubDate>
    <dc:creator>ambarishhundeka</dc:creator>
    <dc:date>2017-12-12T09:07:14Z</dc:date>
    <item>
      <title>Code port to S32K controller</title>
      <link>https://community.nxp.com/t5/S32-Design-Studio/Code-port-to-S32K-controller/m-p/780527#M3047</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 need to port the code&amp;nbsp;from Renesas to NXP (IAR compiler&amp;nbsp;used for renesas development ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the code has&amp;nbsp;some compiler oriented directives , I am not getting how to change those directives to S32 design studio&amp;nbsp;(gcc compiler)&amp;nbsp; support format.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Problem 1:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #7f0055; font-size: small;"&gt;&lt;STRONG&gt;#pragma&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt; segment&lt;SPAN style="text-decoration: underline;"&gt;=&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #2a00ff; text-decoration: underline; font-size: small;"&gt;"bl_fsl_codearea_RAM"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style=": ; color: #7f0055; text-decoration: underline; font-size: small;"&gt;#pragma&lt;/STRONG&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;SPAN style="font-size: small;"&gt; segment=&lt;/SPAN&gt;&lt;SPAN style="color: #2a00ff; font-size: small;"&gt;"bl_blc_globaldata_RAM"&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt; __far&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #005032; font-size: small;"&gt;T_U32&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt; __far *u32SegmentStartAddress;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #005032; font-size: small;"&gt;T_U32&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt; __far *u32SegmentEndAddress;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style=": ; color: #7f0055; font-size: small;"&gt;volatile&lt;/STRONG&gt;&lt;SPAN style="font-size: small;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #005032; font-size: small;"&gt;T_BOOL&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt; boolInterruptFlagValue;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;/* Clear BL_FSL_CODE_RAM */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;&lt;SPAN style="text-decoration: underline; font-size: small;"&gt;u32SegmentStartAddress = __segment_begin(&lt;/SPAN&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;SPAN style="color: #2a00ff; font-size: small;"&gt;"bl_fsl_codearea_RAM"&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;);&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline; font-size: small;"&gt;u32SegmentEndAddress = __segment_end(&lt;/SPAN&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;SPAN style="color: #2a00ff; font-size: small;"&gt;"bl_fsl_codearea_RAM"&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;);&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style=": ; color: #7f0055; font-size: small;"&gt;while&lt;/STRONG&gt;&lt;SPAN style="font-size: small;"&gt; (u32SegmentStartAddress &amp;lt; u32SegmentEndAddress)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;*u32SegmentStartAddress = 0x00U;&lt;/P&gt;&lt;P&gt;u32SegmentStartAddress++;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Problem 2 :&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #7f0055; font-size: small;"&gt;&lt;STRONG&gt;#pragma&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt; dataseg=&lt;/SPAN&gt;&lt;SPAN style="color: #2a00ff; font-size: small;"&gt;"m_bl_std_faiRecdata_RAM"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;__no_init StdFailurRecord_t gStdFailureRecord;&lt;SPAN style="font-size: small;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #7f0055; font-size: small;"&gt;&lt;STRONG&gt;#pragma&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt; dataseg=&lt;/SPAN&gt;&lt;STRONG style=": ; color: #7f0055; font-size: small;"&gt;default&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style=": ; color: #7f0055; font-size: small;"&gt;the above code can be replace&amp;nbsp;with &amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style=": ; color: #7f0055; font-size: small;"&gt;&lt;SPAN style="color: #7f0055; font-size: small;"&gt;__attribute__&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;((section(&lt;/SPAN&gt;&lt;SPAN style="color: #2a00ff; font-size: small;"&gt;"m_bl_std_faiRecdata_RAM"&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;))) &lt;/SPAN&gt;&lt;SPAN style="color: #005032; font-size: small;"&gt;StdFailurRecord_t&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt; gStdFailureRecord;&lt;/SPAN&gt; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;is this correct?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Problem 3:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #7f0055; font-size: small;"&gt;&lt;STRONG&gt;#pragma&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt; constseg=&lt;/SPAN&gt;&lt;SPAN style="color: #2a00ff; font-size: small;"&gt;"m_blc_Configdata_start"&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // IAR code&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;__root &lt;SPAN style="text-decoration: underline;"&gt;const&lt;/SPAN&gt; ConfigData_t gConfigData =&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #7f0055; font-size: small;"&gt;&lt;STRONG&gt;const&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #005032; font-size: small;"&gt;ConfigData_t&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt; gConfigData &lt;/SPAN&gt;&lt;STRONG style=": ; color: #7f0055; font-size: small;"&gt;__attribute__&lt;/STRONG&gt;&lt;SPAN style="font-size: small;"&gt;((used)) =&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;{ 0xFFU,0xFFU,0xFFU,0xFFU,0xFFU,0xFFU,0xFFU,0xFFU}&lt;/P&gt;&lt;P&gt;};&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #7f0055; font-size: small;"&gt;&lt;STRONG&gt;#pragma&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt; dataseg=&lt;/SPAN&gt;&lt;STRONG style=": ; color: #7f0055; font-size: small;"&gt;default;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style=": ; color: #7f0055; font-size: small;"&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have replaced the code with&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #7f0055; font-size: small;"&gt;&lt;STRONG&gt;#pragma&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt; constseg=&lt;/SPAN&gt;&lt;SPAN style="color: #2a00ff; font-size: small;"&gt;"m_blc_Configdata_start"&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // GCC code&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #7f0055; font-size: small;"&gt;&lt;STRONG&gt;const&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #005032; font-size: small;"&gt;ConfigData_t&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt; gConfigData &lt;/SPAN&gt;&lt;STRONG style=": ; color: #7f0055; font-size: small;"&gt;__attribute__&lt;/STRONG&gt;&lt;SPAN style="font-size: small;"&gt;((used)) =&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;{ 0xFFU,0xFFU,0xFFU,0xFFU,0xFFU,0xFFU,0xFFU,0xFFU}&lt;/P&gt;&lt;P&gt;};&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #7f0055; font-size: small;"&gt;&lt;STRONG&gt;#pragma&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt; dataseg=&lt;/SPAN&gt;&lt;STRONG style=": ; color: #7f0055; font-size: small;"&gt;default&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;is it correct?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Problem 4:&lt;/P&gt;&lt;P&gt;what can I replace far and near&amp;nbsp;of &amp;nbsp;IAR in GCC compiler supportable format?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #005032; font-size: small;"&gt;T_U32&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt; __far *u32SegmentStartAddress;&lt;/SPAN&gt; (IAR format).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have gone through the gcc compiler reference manual and solved some of the compiler oriented directives errors,&lt;/P&gt;&lt;P&gt;the above directives are not getting how to solve.&lt;/P&gt;&lt;P&gt;kindly need your help in this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ambarish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Dec 2017 09:07:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-Design-Studio/Code-port-to-S32K-controller/m-p/780527#M3047</guid>
      <dc:creator>ambarishhundeka</dc:creator>
      <dc:date>2017-12-12T09:07:14Z</dc:date>
    </item>
    <item>
      <title>Re: Code port to S32K controller</title>
      <link>https://community.nxp.com/t5/S32-Design-Studio/Code-port-to-S32K-controller/m-p/780528#M3048</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ambarish,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;GCC does not support #pragma for section placement.&lt;/P&gt;&lt;P&gt;For placing a code/data/const into a custom section GCC uses:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="language-none" style="color: #000000; background: #f5f2f0; border: 0px; margin: 0.5em 0px; padding: 1em 1em 1em 3.8em;"&gt;&lt;CODE&gt;__attribute__ ((section(".MySection")))‍&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The __attribute__((section())) statement has to be present by each object (variable, const, function) in contrast to #pragma&lt;/P&gt;&lt;P&gt;GCC also do not distinguish between code/data/const sections.&lt;/P&gt;&lt;P&gt;The linker script file shall define a custom section e.g.:&lt;/P&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;.MySection : 
{
&amp;nbsp; &amp;nbsp;__MY_SECTION_START = .;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&amp;nbsp; &amp;nbsp;KEEP (*(.MySection))&amp;nbsp;&amp;nbsp;&amp;nbsp; /* KEEP: avoid dead stripping if an object is not referenced */ 
&amp;nbsp; &amp;nbsp;__MY_SECTION_END = .;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
} &amp;gt; m_section‍‍‍‍‍‍‍‍‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In your code you can use the linker script file symbols and use them to perform e.g. an initialization of the section:&lt;/P&gt;&lt;PRE class="" style="color: #000000; background: #f5f2f0; border: 0px; margin: 0.5em 0px; padding: 1em 1em 1em 3.8em;"&gt;&lt;CODE style="border: 0px; font-weight: inherit;"&gt;
&lt;/CODE&gt;&lt;CODE style="border: 0px; font-weight: inherit;"&gt;
&lt;/CODE&gt;&lt;CODE style="border: 0px; font-weight: inherit;"&gt;
&lt;/CODE&gt;&lt;CODE style="border: 0px; font-weight: inherit;"&gt;
&lt;/CODE&gt;&lt;CODE style="border: 0px; font-weight: inherit;"&gt;__MY_SECTION_START&lt;/CODE&gt;&lt;CODE style="border: 0px; font-weight: inherit;"&gt;);
&lt;/CODE&gt;&lt;CODE style="border: 0px; font-weight: inherit;"&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;* Regarding not initialized variable sections:&lt;/P&gt;&lt;P&gt;If you create a custom data section outside of ".data" section - the section is not initialized by the default startup routine. You should add the init sequence e.g. into init_data_bss() if you want to initialize your custom section.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;* Regarding near/far keyword. AFAIK this is not supported by GCC.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;see e.g. the document below for more info:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.nxp.com/docs/DOC-334030" rel="nofollow noopener noreferrer" target="_blank"&gt;HOWTO: Run a routine from RAM in S32 Design Studio &lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&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>Thu, 14 Dec 2017 16:55:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-Design-Studio/Code-port-to-S32K-controller/m-p/780528#M3048</guid>
      <dc:creator>stanish</dc:creator>
      <dc:date>2017-12-14T16:55:47Z</dc:date>
    </item>
  </channel>
</rss>

