<?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: Calling all LCF Experts... in CodeWarrior for QorIQ</title>
    <link>https://community.nxp.com/t5/CodeWarrior-for-QorIQ/Calling-all-LCF-Experts/m-p/124388#M47</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;FONT size="2"&gt;Hello&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;Not sure I get it right here.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;Is CF_boot_ROM.elf an object library or an executable file? I am confused here as usually extension .elf is associated with executable files?&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;Additionally an object library does not have a formal .text section. It is just a collection of object files, each of them having their own .text section.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;So &lt;FONT face="Courier New"&gt;CF_boot_ROM.elf(.text)&lt;/FONT&gt; &lt;FONT face="Arial"&gt;is not returning any code here.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;Finally are you using the functions from CF_boot_ROM.elf within your main application?&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;The linker is performing dead stripping and is not linking any objects, which is not used to the application.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;To tell the linker you want to link some non-referenced object you have to use the linker command FORCEACTIVE.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;I hope this helps.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;CrasyCat&lt;/FONT&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 21 Jul 2006 16:24:29 GMT</pubDate>
    <dc:creator>CrasyCat</dc:creator>
    <dc:date>2006-07-21T16:24:29Z</dc:date>
    <item>
      <title>Calling all LCF Experts...</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-QorIQ/Calling-all-LCF-Experts/m-p/124387#M46</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;I am using CW 6.2 for coldfire and am compiling for the MCF5407.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I am trying to link in a custom library (CF_boot_ROM.elf) and I want it to link starting at a specific address while the rest of my application is to link to another address.&amp;nbsp; I've tried the following to no avail:&lt;/DIV&gt;&lt;DIV&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'Courier New'; font-size: 2;"&gt;MEMORY {&lt;BR /&gt;&amp;nbsp;TEXT_BOOT (RX) : ORIGIN = 0x7E000000, LENGTH = 0x0&lt;BR /&gt;&amp;nbsp;TEXT (RX) : ORIGIN = 0x7E400000, LENGTH = 0x0&lt;BR /&gt;&amp;nbsp;DATA (RW) : ORIGIN = 0x00040000, LENGTH = 0x0&lt;BR /&gt;}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="font-family: 'Courier New'; font-size: 2;"&gt;SECTIONS {&lt;BR /&gt;&amp;nbsp;.boot_app :&lt;BR /&gt;&amp;nbsp;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp;CF_boot_ROM.elf(.text)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;.= ALIGN(0x8);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;CF_boot_ROM.elf(.rodata)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;.= ALIGN(0x8);&lt;BR /&gt;&amp;nbsp;} &amp;gt; TEXT_BOOT&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="font-family: 'Courier New'; font-size: 2;"&gt;&amp;nbsp;.main_application :&lt;BR /&gt;&amp;nbsp;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp;vectors.s(.text)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .= ALIGN(0x8);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mcf5407_lo.s(.text)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .= ALIGN(0x8);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;*(.text)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;.= ALIGN(0x8);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;*(.rodata)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;.= ALIGN(0x8);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;__end_of_text = .;&lt;BR /&gt;&amp;nbsp;} &amp;gt; TEXT&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;All I get is the main application in my .S19 file.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Thanks,&lt;/DIV&gt;&lt;DIV&gt;Joe&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Jul 2006 01:20:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-QorIQ/Calling-all-LCF-Experts/m-p/124387#M46</guid>
      <dc:creator>nanoGeek</dc:creator>
      <dc:date>2006-07-19T01:20:09Z</dc:date>
    </item>
    <item>
      <title>Re: Calling all LCF Experts...</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-QorIQ/Calling-all-LCF-Experts/m-p/124388#M47</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;FONT size="2"&gt;Hello&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;Not sure I get it right here.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;Is CF_boot_ROM.elf an object library or an executable file? I am confused here as usually extension .elf is associated with executable files?&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;Additionally an object library does not have a formal .text section. It is just a collection of object files, each of them having their own .text section.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;So &lt;FONT face="Courier New"&gt;CF_boot_ROM.elf(.text)&lt;/FONT&gt; &lt;FONT face="Arial"&gt;is not returning any code here.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;Finally are you using the functions from CF_boot_ROM.elf within your main application?&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;The linker is performing dead stripping and is not linking any objects, which is not used to the application.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;To tell the linker you want to link some non-referenced object you have to use the linker command FORCEACTIVE.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;I hope this helps.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;CrasyCat&lt;/FONT&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Jul 2006 16:24:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-QorIQ/Calling-all-LCF-Experts/m-p/124388#M47</guid>
      <dc:creator>CrasyCat</dc:creator>
      <dc:date>2006-07-21T16:24:29Z</dc:date>
    </item>
    <item>
      <title>Re: Calling all LCF Experts...</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-QorIQ/Calling-all-LCF-Experts/m-p/124389#M48</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;CrasyCat, thank you for your reply&lt;BR /&gt;&lt;BR /&gt;The *.elf file is compiled library. At least, that is what CW generated when I selected "Library" from one of the target menus. BTW, can you tell what the difference is between a Library and a Shared Library?&lt;BR /&gt;&lt;BR /&gt;The boot_ROM library is intended to handle power up boot, so it gets executed out of reset (supposedly). It then calls the target application. No other portions of the boot_ROM lib are used by the application.&lt;BR /&gt;&lt;BR /&gt;As for FORCEACTIVE, whould I just list the .elf file as a parameter to FORCEACTIVE? What syntax does it use here? How do I locate the code that is linked from the boot_ROM lib? It needs to link to address 0x7E000000 while the rest of the application needs to link to address 0x7E400000. I can provide some of the pertinent files if that would help.&lt;BR /&gt;&lt;BR /&gt;Again, thank you for your assistance&lt;BR /&gt;&lt;BR /&gt;Joe&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Jul 2006 19:10:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-QorIQ/Calling-all-LCF-Experts/m-p/124389#M48</guid>
      <dc:creator>nanoGeek</dc:creator>
      <dc:date>2006-07-21T19:10:06Z</dc:date>
    </item>
    <item>
      <title>Re: Calling all LCF Experts...</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-QorIQ/Calling-all-LCF-Experts/m-p/124390#M49</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;I have performed some additional tests here.&lt;/P&gt;&lt;P&gt;Basically FORCEACTIVE is good to add individual object (functions, variables) to the application.&lt;BR /&gt;If you wish to add all objects defined (implemented) in a file you rather use FORCEFILES.&lt;BR /&gt;FORCEFILES works with object files not with archives. So you have to specify all the object files inside of your library file to get them all linked.&lt;/P&gt;&lt;P&gt;Syntax is as follows (I took ANSIC library as a test, just replace the library name with your own library name).&lt;/P&gt;&lt;P&gt;FORCEFILES {C_TRK_4i_CF_MSL.a(string.o) C_TRK_4i_CF_MSL.a(s_fabs.o)}&lt;/P&gt;&lt;P&gt;Place that command at the end of the .lcf file (After the SECTIONS block).&lt;/P&gt;&lt;P&gt;In order to place whole code &amp;amp; constant from your library in a separate memory area, just use following notation in your .lcf file:&lt;/P&gt;&lt;P&gt;SECTIONS {&lt;BR /&gt;&amp;nbsp;.boot_app :&lt;BR /&gt;&amp;nbsp; {&lt;BR /&gt;&amp;nbsp;&amp;nbsp; C_TRK_4i_CF_MSL.a(.text)&lt;BR /&gt;&amp;nbsp;&amp;nbsp; .= ALIGN(0x8);&lt;BR /&gt;&amp;nbsp;&amp;nbsp; C_TRK_4i_CF_MSL.a(.rodata)&lt;BR /&gt;&amp;nbsp;&amp;nbsp; .= ALIGN(0x8);&lt;BR /&gt;&amp;nbsp; } &amp;gt; TEXT_BOOT&lt;BR /&gt;&amp;nbsp;.main_application :&lt;BR /&gt;&amp;nbsp;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp;*(.text)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;.= ALIGN(0x8);&lt;BR /&gt;.....&lt;/P&gt;&lt;P&gt;Make sure to specify the C_TRK_4i_CF_MSL.a(.text) prior to *(.text) in the.lcf file.&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;I hope this helps.&lt;/P&gt;&lt;P&gt;Note I did all the tests with CodeWarrior for Coldfire V6.3.&lt;/P&gt;&lt;P&gt;CrasyCat&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Jul 2006 17:23:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-QorIQ/Calling-all-LCF-Experts/m-p/124390#M49</guid>
      <dc:creator>CrasyCat</dc:creator>
      <dc:date>2006-07-24T17:23:07Z</dc:date>
    </item>
  </channel>
</rss>

