<?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: How can I access linker file keywords in my C code? in S32 Design Studio</title>
    <link>https://community.nxp.com/t5/S32-Design-Studio/How-can-I-access-linker-file-keywords-in-my-C-code/m-p/849579#M4211</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Erich,&lt;/P&gt;&lt;P&gt;Thank you very much. This is now clear.&lt;/P&gt;&lt;P&gt;Julius&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 12 Dec 2018 07:38:50 GMT</pubDate>
    <dc:creator>juliusjai</dc:creator>
    <dc:date>2018-12-12T07:38:50Z</dc:date>
    <item>
      <title>How can I access linker file keywords in my C code?</title>
      <link>https://community.nxp.com/t5/S32-Design-Studio/How-can-I-access-linker-file-keywords-in-my-C-code/m-p/849575#M4207</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'm using MPC5744P MCU and S32DS IDE.&lt;/P&gt;&lt;P&gt;I need to access the range of allocated Stack memory after compilation.&lt;/P&gt;&lt;P&gt;My linker file includes the keywords:&lt;/P&gt;&lt;P&gt;.stack (NOLOAD) : ALIGN(16)&lt;BR /&gt; {&lt;BR /&gt;&lt;STRONG&gt;_stack_end&lt;/STRONG&gt; = . ;&lt;BR /&gt; . += __STACK_SIZE ;&lt;BR /&gt; &lt;STRONG&gt;_stack_addr&lt;/STRONG&gt; = . ;&lt;BR /&gt; __SP_INIT = . ;&lt;BR /&gt; . += 4;&lt;BR /&gt; } &amp;gt; m_data&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I access &lt;STRONG&gt;_stack_end&lt;/STRONG&gt; and &lt;STRONG&gt;_stack_addr&lt;/STRONG&gt; in my C source code?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I will be using these addresses to monitor stack overflow/underflow during runtime.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;Julius&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Dec 2018 04:35:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-Design-Studio/How-can-I-access-linker-file-keywords-in-my-C-code/m-p/849575#M4207</guid>
      <dc:creator>juliusjai</dc:creator>
      <dc:date>2018-12-10T04:35:42Z</dc:date>
    </item>
    <item>
      <title>Re: How can I access linker file keywords in my C code?</title>
      <link>https://community.nxp.com/t5/S32-Design-Studio/How-can-I-access-linker-file-keywords-in-my-C-code/m-p/849576#M4208</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Julius,&lt;/P&gt;&lt;P&gt;see &lt;A class="link-titled" href="https://mcuoneclipse.com/2016/11/01/getting-the-memory-range-of-sections-with-gnu-linker-files/" title="https://mcuoneclipse.com/2016/11/01/getting-the-memory-range-of-sections-with-gnu-linker-files/"&gt;Accessing GNU Linker Script Symbols from C/C++ | MCU on Eclipse&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this helps,&lt;/P&gt;&lt;P&gt;Erich&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Dec 2018 19:06:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-Design-Studio/How-can-I-access-linker-file-keywords-in-my-C-code/m-p/849576#M4208</guid>
      <dc:creator>BlackNight</dc:creator>
      <dc:date>2018-12-10T19:06:04Z</dc:date>
    </item>
    <item>
      <title>Re: How can I access linker file keywords in my C code?</title>
      <link>https://community.nxp.com/t5/S32-Design-Studio/How-can-I-access-linker-file-keywords-in-my-C-code/m-p/849577#M4209</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Erich,&lt;/P&gt;&lt;P&gt;Thank you very much. This is very helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;By the way, I'm using a 32-bit &lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;MPC5744P MCU.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;Which should be the correct type of extern?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;extern unsigned int&amp;nbsp;_stack_end?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;Or&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;extern unsigned long&amp;nbsp;_stack_end?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;Thanks again!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;Julius&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Dec 2018 01:50:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-Design-Studio/How-can-I-access-linker-file-keywords-in-my-C-code/m-p/849577#M4209</guid>
      <dc:creator>juliusjai</dc:creator>
      <dc:date>2018-12-11T01:50:02Z</dc:date>
    </item>
    <item>
      <title>Re: How can I access linker file keywords in my C code?</title>
      <link>https://community.nxp.com/t5/S32-Design-Studio/How-can-I-access-linker-file-keywords-in-my-C-code/m-p/849578#M4210</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Julius,&lt;/P&gt;&lt;P&gt;the type really does not matter, because the linker does not know about types. All what the linker knows and provides you is an address (or to the essence a number). So you can use whatever makes sense in your application.&lt;/P&gt;&lt;P&gt;Because your stack entries are 32bit, you probably want to use uint32_t as you don't know how many bits int or long can have.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this helps,&lt;/P&gt;&lt;P&gt;Erich&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Dec 2018 06:57:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-Design-Studio/How-can-I-access-linker-file-keywords-in-my-C-code/m-p/849578#M4210</guid>
      <dc:creator>BlackNight</dc:creator>
      <dc:date>2018-12-12T06:57:58Z</dc:date>
    </item>
    <item>
      <title>Re: How can I access linker file keywords in my C code?</title>
      <link>https://community.nxp.com/t5/S32-Design-Studio/How-can-I-access-linker-file-keywords-in-my-C-code/m-p/849579#M4211</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Erich,&lt;/P&gt;&lt;P&gt;Thank you very much. This is now clear.&lt;/P&gt;&lt;P&gt;Julius&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Dec 2018 07:38:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-Design-Studio/How-can-I-access-linker-file-keywords-in-my-C-code/m-p/849579#M4211</guid>
      <dc:creator>juliusjai</dc:creator>
      <dc:date>2018-12-12T07:38:50Z</dc:date>
    </item>
  </channel>
</rss>

