<?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>ColdFire/68K Microcontrollers and ProcessorsのトピックUsing linker file labels in your other source files</title>
    <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/Using-linker-file-labels-in-your-other-source-files/m-p/173171#M6567</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello-&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've edited the internal flash linker file for the MCF52233 to have a section 'mymem' like so:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;MEMORY {&lt;BR /&gt;&amp;nbsp;&amp;nbsp; vectorram&amp;nbsp;&amp;nbsp; (RWX) : ORIGIN = 0x20000000, LENGTH = 0x00000500&lt;BR /&gt;&amp;nbsp;&amp;nbsp; code&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (RX)&amp;nbsp; : ORIGIN = 0x20000500, LENGTH = 0x00003B00&lt;BR /&gt;&amp;nbsp;&amp;nbsp; mymem &amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; (RWX): ORIGIN = 0x20004000, LENGTH = 0x00002000&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; userram&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (RWX) : ORIGIN = 0x20006000, LENGTH = 0x00002000&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The problem is that I have to hardcode the value 0x20004000 into my source files since I don't know how to get them to get the label 'mymem' out from the linker file.&amp;nbsp; Is there a way to get a source file to access 'mymem'?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This would help a lot since I could then use the 'mymem' label instead of hardcoding location values, as this makes my code not very portable between build targets.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 18 Apr 2009 14:06:09 GMT</pubDate>
    <dc:creator>Eqqman</dc:creator>
    <dc:date>2009-04-18T14:06:09Z</dc:date>
    <item>
      <title>Using linker file labels in your other source files</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/Using-linker-file-labels-in-your-other-source-files/m-p/173171#M6567</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello-&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've edited the internal flash linker file for the MCF52233 to have a section 'mymem' like so:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;MEMORY {&lt;BR /&gt;&amp;nbsp;&amp;nbsp; vectorram&amp;nbsp;&amp;nbsp; (RWX) : ORIGIN = 0x20000000, LENGTH = 0x00000500&lt;BR /&gt;&amp;nbsp;&amp;nbsp; code&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (RX)&amp;nbsp; : ORIGIN = 0x20000500, LENGTH = 0x00003B00&lt;BR /&gt;&amp;nbsp;&amp;nbsp; mymem &amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; (RWX): ORIGIN = 0x20004000, LENGTH = 0x00002000&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; userram&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (RWX) : ORIGIN = 0x20006000, LENGTH = 0x00002000&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The problem is that I have to hardcode the value 0x20004000 into my source files since I don't know how to get them to get the label 'mymem' out from the linker file.&amp;nbsp; Is there a way to get a source file to access 'mymem'?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This would help a lot since I could then use the 'mymem' label instead of hardcoding location values, as this makes my code not very portable between build targets.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 18 Apr 2009 14:06:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/Using-linker-file-labels-in-your-other-source-files/m-p/173171#M6567</guid>
      <dc:creator>Eqqman</dc:creator>
      <dc:date>2009-04-18T14:06:09Z</dc:date>
    </item>
    <item>
      <title>Re: Using linker file labels in your other source files</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/Using-linker-file-labels-in-your-other-source-files/m-p/173172#M6568</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Any compiler permits to assign any source entity (function, constant, etc) to the specified segment.&lt;/P&gt;&lt;P&gt;Thus, try to assign the related part of your source code to segment mymem.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 18 Apr 2009 14:30:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/Using-linker-file-labels-in-your-other-source-files/m-p/173172#M6568</guid>
      <dc:creator>admin</dc:creator>
      <dc:date>2009-04-18T14:30:03Z</dc:date>
    </item>
  </channel>
</rss>

