<?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: CW 10.1 (Kinetis) - How to place functions and variables in .data section? in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/CW-10-1-Kinetis-How-to-place-functions-and-variables-in-data/m-p/149216#M156</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Further study at the infocenter and MCU_Kinetis_Compiler.pdf let me com to this solution:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P align="left"&gt;#pragma &lt;FONT size="2"&gt;define_section FUNCRAM&lt;/FONT&gt; &lt;FONT color="#2A00FF" size="2"&gt;&lt;FONT color="#2A00FF" size="2"&gt;".data"&lt;/FONT&gt;&lt;/FONT&gt; &lt;FONT size="2"&gt;&lt;FONT size="2"&gt;far_abs RX&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P align="left"&gt;&amp;nbsp;&lt;/P&gt;&lt;P align="left"&gt;#pragma &lt;FONT size="2"&gt;section FUNCRAM begin&lt;/FONT&gt;&lt;/P&gt;&lt;P align="left"&gt;void&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;STRONG&gt;FuncInRam&lt;/STRONG&gt;(&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#7F0055" size="2"&gt;&lt;FONT color="#7F0055" size="2"&gt;void&lt;/FONT&gt;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT size="2"&gt;&lt;FONT size="2"&gt;)&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P align="left"&gt;{&lt;/P&gt;&lt;P align="left"&gt;&amp;nbsp;&amp;nbsp; ...&lt;/P&gt;&lt;P align="left"&gt;}&lt;/P&gt;&lt;P align="left"&gt;#pragma &lt;FONT size="2"&gt;&lt;FONT size="2"&gt;section FUNCRAM end&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P align="left"&gt;&amp;nbsp;&lt;/P&gt;&lt;P align="left"&gt;　&lt;/P&gt;&lt;P align="left"&gt;int&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;FONT size="2"&gt;&lt;STRONG&gt;user_main&lt;/STRONG&gt;()&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P align="left"&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; FuncInRam();&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 13 Jul 2011 20:56:40 GMT</pubDate>
    <dc:creator>Focon</dc:creator>
    <dc:date>2011-07-13T20:56:40Z</dc:date>
    <item>
      <title>CW 10.1 (Kinetis) - How to place functions and variables in .data section?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/CW-10-1-Kinetis-How-to-place-functions-and-variables-in-data/m-p/149214#M154</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Since CW 10.1 should be GCC based, i thought that this should work:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P align="left"&gt;void&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;STRONG&gt;FuncInRam&lt;/STRONG&gt;(&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#7F0055" size="2"&gt;&lt;FONT color="#7F0055" size="2"&gt;void&lt;/FONT&gt;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT size="2"&gt;)&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#7F0055" size="2"&gt;&lt;FONT color="#7F0055" size="2"&gt;__attribute__&lt;/FONT&gt;&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT size="2"&gt;((section(&lt;/FONT&gt;&lt;FONT color="#2A00FF" size="2"&gt;&lt;FONT color="#2A00FF" size="2"&gt;".data"&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt;&lt;FONT size="2"&gt;)));&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P align="left"&gt;&amp;nbsp;&lt;/P&gt;&lt;P align="left"&gt;　&lt;/P&gt;&lt;P align="left"&gt;　&lt;/P&gt;&lt;P align="left"&gt;int&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;FONT size="2"&gt;&lt;STRONG&gt;main&lt;/STRONG&gt;()&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P align="left"&gt;{&lt;/P&gt;&lt;P align="left"&gt;&amp;nbsp;&amp;nbsp; FuncInRam();&lt;/P&gt;&lt;P align="left"&gt;}&lt;/P&gt;&lt;P align="left"&gt;&amp;nbsp;&lt;/P&gt;&lt;P align="left"&gt;void&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;STRONG&gt;FuncInRam&lt;/STRONG&gt;(&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#7F0055" size="2"&gt;&lt;FONT color="#7F0055" size="2"&gt;void&lt;/FONT&gt;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT size="2"&gt;)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT color="#7F0055" size="2"&gt;&lt;FONT color="#7F0055" size="2"&gt;...&lt;/FONT&gt;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But it doesn't. First of all, i wonder why the compiler complains about __attribute__ line. Secondly both going through the MAP-file and a debug session, shows me that the function is actually placed in .text section.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried what was surgested in this thread:&lt;/P&gt;&lt;P&gt;&lt;A __default_attr="89042" class="jive_macro jive_macro_thread default_title" href="https://community.freescale.com/thread/89042" jivemacro="thread" title="https://community.freescale.com/thread/89042"&gt;https://community.freescale.com/thread/89042&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;With the same result, but this time the compiler complains about the #pragma line.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using CW 10.1 for microcontrollers (windows hosted) Standard Edition.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also, I am unable to activate the GCC extensions, through the compiler settings. It says it doesn't know the -gcc flag.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help is appreciated, thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Jul 2011 18:27:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/CW-10-1-Kinetis-How-to-place-functions-and-variables-in-data/m-p/149214#M154</guid>
      <dc:creator>Focon</dc:creator>
      <dc:date>2011-07-13T18:27:08Z</dc:date>
    </item>
    <item>
      <title>Re: CW 10.1 (Kinetis) - How to place functions and variables in .data section?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/CW-10-1-Kinetis-How-to-place-functions-and-variables-in-data/m-p/149215#M155</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For the variables part, I ofcourse mean, how to place variables in custom defined sections.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Jul 2011 18:45:05 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/CW-10-1-Kinetis-How-to-place-functions-and-variables-in-data/m-p/149215#M155</guid>
      <dc:creator>Focon</dc:creator>
      <dc:date>2011-07-13T18:45:05Z</dc:date>
    </item>
    <item>
      <title>Re: CW 10.1 (Kinetis) - How to place functions and variables in .data section?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/CW-10-1-Kinetis-How-to-place-functions-and-variables-in-data/m-p/149216#M156</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Further study at the infocenter and MCU_Kinetis_Compiler.pdf let me com to this solution:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P align="left"&gt;#pragma &lt;FONT size="2"&gt;define_section FUNCRAM&lt;/FONT&gt; &lt;FONT color="#2A00FF" size="2"&gt;&lt;FONT color="#2A00FF" size="2"&gt;".data"&lt;/FONT&gt;&lt;/FONT&gt; &lt;FONT size="2"&gt;&lt;FONT size="2"&gt;far_abs RX&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P align="left"&gt;&amp;nbsp;&lt;/P&gt;&lt;P align="left"&gt;#pragma &lt;FONT size="2"&gt;section FUNCRAM begin&lt;/FONT&gt;&lt;/P&gt;&lt;P align="left"&gt;void&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;STRONG&gt;FuncInRam&lt;/STRONG&gt;(&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#7F0055" size="2"&gt;&lt;FONT color="#7F0055" size="2"&gt;void&lt;/FONT&gt;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT size="2"&gt;&lt;FONT size="2"&gt;)&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P align="left"&gt;{&lt;/P&gt;&lt;P align="left"&gt;&amp;nbsp;&amp;nbsp; ...&lt;/P&gt;&lt;P align="left"&gt;}&lt;/P&gt;&lt;P align="left"&gt;#pragma &lt;FONT size="2"&gt;&lt;FONT size="2"&gt;section FUNCRAM end&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P align="left"&gt;&amp;nbsp;&lt;/P&gt;&lt;P align="left"&gt;　&lt;/P&gt;&lt;P align="left"&gt;int&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;FONT size="2"&gt;&lt;STRONG&gt;user_main&lt;/STRONG&gt;()&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P align="left"&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; FuncInRam();&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Jul 2011 20:56:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/CW-10-1-Kinetis-How-to-place-functions-and-variables-in-data/m-p/149216#M156</guid>
      <dc:creator>Focon</dc:creator>
      <dc:date>2011-07-13T20:56:40Z</dc:date>
    </item>
  </channel>
</rss>

