<?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: Linker command file in Classic/Legacy CodeWarrior</title>
    <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Linker-command-file/m-p/134294#M709</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Hi,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; I could finally create sections using #pragmas. I got this working after disabling the global level optimizations. However, I am still unable to move the buffers to the different sections using the configuration file. Also, Can anyone tell me the difference between the .cmd file and .lcf file. I find that in some examples .lcf files are used and in some others .cmd file is used. Why is this so?&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;Gene&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 27 Mar 2008 12:24:03 GMT</pubDate>
    <dc:creator>gene21</dc:creator>
    <dc:date>2008-03-27T12:24:03Z</dc:date>
    <item>
      <title>Linker command file</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Linker-command-file/m-p/134289#M704</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;SPAN style="font-size: 2;"&gt;Two questions:&lt;BR /&gt;1. How can I define the ".rom" section of an external lib as a seperated segment in the linker command file? (that will not include all the .rom section of the project)&lt;BR /&gt;2. I would like to locate two different buffers, that declared in same C file, in different memory addresses. How can I do it? (The relevant pragma does affect all the file "data" section)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 20 May 2007 12:58:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Linker-command-file/m-p/134289#M704</guid>
      <dc:creator>RanT</dc:creator>
      <dc:date>2007-05-20T12:58:41Z</dc:date>
    </item>
    <item>
      <title>Re: Linker command file</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Linker-command-file/m-p/134290#M705</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Hello&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;- Which CPU are you targeting (HC08, HC12, Coldfire, ..)&lt;BR /&gt;- Which version of CodeWarrior are you using?&lt;BR /&gt;&amp;nbsp; To retrieve that info:&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; - Start CodeWarrior&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; - Select Help -&amp;gt; About Freescale CodeWarrior&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; - Click on "Install Products"&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; - CodeWarrior version used is displayed on top in the Installed Products dialog.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;CrasyCat&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 20 May 2007 18:49:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Linker-command-file/m-p/134290#M705</guid>
      <dc:creator>CrasyCat</dc:creator>
      <dc:date>2007-05-20T18:49:13Z</dc:date>
    </item>
    <item>
      <title>Re: Linker command file</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Linker-command-file/m-p/134291#M706</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Please refer only to question #2 (two different buffers):&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;I&amp;nbsp;would like to locate two different buffers (.data), that declared in same C file, in different memory address spaces.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;How can I do it?&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;(The relevant pragma does affect all the file "data" section)&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;The target is Starcore SC140.&lt;/DIV&gt;&lt;DIV&gt;The CodeWarrior version is 1.0.3 build 6 (IDE 5.7.0) .&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 20 May 2007 19:03:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Linker-command-file/m-p/134291#M706</guid>
      <dc:creator>RanT</dc:creator>
      <dc:date>2007-05-20T19:03:39Z</dc:date>
    </item>
    <item>
      <title>Re: Linker command file</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Linker-command-file/m-p/134292#M707</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;Hello&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;So if it is for StarCore, you need to use an application configuration file.&lt;/DIV&gt;&lt;DIV&gt;Using #pragma rom_seg_name works too, but all constants within that module will be allocated in the same&amp;nbsp;user defined segment.&lt;/DIV&gt;&lt;DIV&gt;Not sure that this is what you are looking for.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;You define&amp;nbsp;one or several &amp;nbsp;rom segments there and then you place your variables in the different segments.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;configuration&lt;/DIV&gt;&lt;DIV&gt;view MyView&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; section&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; rom = [&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; myConst1: ".MY_CONST_1",&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; myConst2: ".MY_CONST_2",&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ]&lt;BR /&gt;&amp;nbsp; end section&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; place (_tab) in myConst1&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; place (_tab2) in myConst2&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;end view&lt;/DIV&gt;&lt;DIV&gt;end configuration&lt;/DIV&gt;&lt;DIV&gt;Then you place the two sections wherever you want in the linker control file.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Example below will place _tab at address 0x8007f000&amp;nbsp; and _tab2 at 0x80080000&lt;/DIV&gt;&lt;DIV&gt;.org 0x8007f000&lt;BR /&gt;.segment .myConst1, ".MY_CONST_1"&lt;BR /&gt;&lt;DIV&gt;.org 0x80080000&lt;BR /&gt;.segment .myConst2, ".MY_CONST_2"&lt;BR /&gt;&lt;/DIV&gt;&lt;DIV&gt;I am not sure where you have memory on your system, but this is the main idea.&lt;/DIV&gt;&lt;DIV&gt;Note that the constant are defined as tab and tab2 in the source code.&lt;/DIV&gt;&lt;DIV&gt;Compiler internally adds a _ prefix to symbol names.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I hope this helps.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;CrasyCat&lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;Message Edited by CrasyCat on &lt;SPAN class="date_text"&gt;2007-05-21&lt;/SPAN&gt; &lt;SPAN class="time_text"&gt;02:33 PM&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 May 2007 19:20:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Linker-command-file/m-p/134292#M707</guid>
      <dc:creator>CrasyCat</dc:creator>
      <dc:date>2007-05-21T19:20:43Z</dc:date>
    </item>
    <item>
      <title>Re: Linker command file</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Linker-command-file/m-p/134293#M708</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;Hi,&lt;BR /&gt;I am a newbie to starcore. I would like to know how to create memory sections and place various buffers in different sections. I tried various methods including the one described in the forum (using the .appli file @&amp;nbsp; &lt;A href="http://forums.freescale.com/freescale/board/message?board.id=CWCOMM&amp;amp;thread.id=4884" target="test_blank"&gt;http://forums.freescale.com/freescale/board/message?board.id=CWCOMM&amp;amp;thread.id=4884&lt;/A&gt;&lt;BR /&gt;). I am interested in placing different uninitialized buffers (bss) present in various files in different sections. I am using 8144 system and I use only one core.Also, I currently work only on the simulator.&lt;BR /&gt;When I tried the method given in the above link, different segments were created but the buffers were not placed in them. These segments read zero bytes and the buffers were present in the default bss section only.&lt;BR /&gt;Please find attached the linker command file (common.txt) and the configuration file.&lt;BR /&gt;I have created two data segments mydata1 and mydata2 and am trying to place the buffers in the DDR section (see the last few lines of the attached common.txt).&lt;BR /&gt;Any help is greatly appreciated.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Gene&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.freescale.com/files/community_files/CWCOMM/msg5713_overlay.appli.txt" rel="nofollow" target="_self"&gt;overlay.appli.txt&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.freescale.com/files/community_files/CWCOMM/msg5713_common1.txt" rel="nofollow" target="_self"&gt;common1.txt&lt;/A&gt;&lt;/P&gt;&lt;DIV class="message-edit-history"&gt;&lt;SPAN class="edit-author"&gt;Message Edited by t.dowe on&lt;/SPAN&gt; &lt;SPAN class="local-date"&gt;2009-09-04&lt;/SPAN&gt; &lt;SPAN class="local-time"&gt;11:09 AM&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Mar 2008 20:34:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Linker-command-file/m-p/134293#M708</guid>
      <dc:creator>gene21</dc:creator>
      <dc:date>2008-03-26T20:34:23Z</dc:date>
    </item>
    <item>
      <title>Re: Linker command file</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Linker-command-file/m-p/134294#M709</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Hi,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; I could finally create sections using #pragmas. I got this working after disabling the global level optimizations. However, I am still unable to move the buffers to the different sections using the configuration file. Also, Can anyone tell me the difference between the .cmd file and .lcf file. I find that in some examples .lcf files are used and in some others .cmd file is used. Why is this so?&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;Gene&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Mar 2008 12:24:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Linker-command-file/m-p/134294#M709</guid>
      <dc:creator>gene21</dc:creator>
      <dc:date>2008-03-27T12:24:03Z</dc:date>
    </item>
    <item>
      <title>Re: Linker command file</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Linker-command-file/m-p/134295#M710</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Hello&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;1- Using an application configuration file to place a variable in a user defined section&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Suppose you want to allocate a global variable called MyTable into a section called MyTableSec,&amp;nbsp;you can create an application configuration file looking as follows:&lt;/DIV&gt;&lt;DIV class="msg_source_code"&gt;&lt;DIV class="text_smallest"&gt;Code:&lt;/DIV&gt;&lt;PRE&gt;configuration view test     section      data = [data1:"MyTableSec"]     end section        place (_MyTable) in data1 end view&lt;/PRE&gt;&lt;PRE&gt;   use view test
end configuration&lt;/PRE&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;The compiler adds a _ prefix to the symbol name internally. So you need to write _MyTable to allocate symbol MyTable in a&amp;nbsp; specific section.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;2. .lcf or .cmd&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;lcf and cmd files are both used as linker command file. Extension associated with&amp;nbsp;the file actually depends on who did create the file initially.&lt;/DIV&gt;&lt;DIV&gt;Some people prefer .cmd. Other prefer .lcf.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;CrasyCat&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Mar 2008 19:41:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Linker-command-file/m-p/134295#M710</guid>
      <dc:creator>CrasyCat</dc:creator>
      <dc:date>2008-03-31T19:41:36Z</dc:date>
    </item>
  </channel>
</rss>

