<?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>S12 / MagniV Microcontrollers中的主题 cx6812 can not link code correctly</title>
    <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/cx6812-can-not-link-code-correctly/m-p/206417#M8384</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,All,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I use cosmic cx6812 compiler which version is V4.6.8.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I found a&amp;nbsp; problem in linker.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The configuration in .lkf is this：&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;+def __FLASH_PAGED_31_START_PHY=0xC4000&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;+def __FLASH_PAGED_31_START_LOG=0x8000&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;## PPAGE = 0x31&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;+seg .ftext -b __FLASH_PAGED_31_START_PHY -o __FLASH_PAGED_31_START_LOG -w __PAGE_SIZE -m __SIZE_OF_FLASH -n .program_31 -sCODE&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;+seg .const -a .program_31&amp;nbsp; -n .const_31&amp;nbsp; -sCODE&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;#code here&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; D:\control_code\CANBoot_DP512_cosmic\canloader.o&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;+def __END_OF_FLASH_PAGED_31_ACTUAL=pend(.const_31)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;After linking, the map file is following:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;D:\control_code\CANBoot_DP512_cosmic\canloader.o:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;start 00000000 end 000006c3 length&amp;nbsp; 1731 section .text&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;start 00003e62 end 0000808c length 16938 section .debug&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The linking result is different from my lkf configuration.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;What is wrong with my project?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Can anyone help me?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 01 Dec 2008 11:35:51 GMT</pubDate>
    <dc:creator>hbch</dc:creator>
    <dc:date>2008-12-01T11:35:51Z</dc:date>
    <item>
      <title>cx6812 can not link code correctly</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/cx6812-can-not-link-code-correctly/m-p/206417#M8384</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,All,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I use cosmic cx6812 compiler which version is V4.6.8.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I found a&amp;nbsp; problem in linker.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The configuration in .lkf is this：&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;+def __FLASH_PAGED_31_START_PHY=0xC4000&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;+def __FLASH_PAGED_31_START_LOG=0x8000&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;## PPAGE = 0x31&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;+seg .ftext -b __FLASH_PAGED_31_START_PHY -o __FLASH_PAGED_31_START_LOG -w __PAGE_SIZE -m __SIZE_OF_FLASH -n .program_31 -sCODE&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;+seg .const -a .program_31&amp;nbsp; -n .const_31&amp;nbsp; -sCODE&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;#code here&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; D:\control_code\CANBoot_DP512_cosmic\canloader.o&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;+def __END_OF_FLASH_PAGED_31_ACTUAL=pend(.const_31)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;After linking, the map file is following:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;D:\control_code\CANBoot_DP512_cosmic\canloader.o:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;start 00000000 end 000006c3 length&amp;nbsp; 1731 section .text&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;start 00003e62 end 0000808c length 16938 section .debug&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The linking result is different from my lkf configuration.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;What is wrong with my project?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Can anyone help me?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Dec 2008 11:35:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/cx6812-can-not-link-code-correctly/m-p/206417#M8384</guid>
      <dc:creator>hbch</dc:creator>
      <dc:date>2008-12-01T11:35:51Z</dc:date>
    </item>
    <item>
      <title>Re: cx6812 can not link code correctly</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/cx6812-can-not-link-code-correctly/m-p/206418#M8385</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;In your linker file, you have define an .ftext area where functions declared as @far would be placed, however, your functions must have been declared as @near (default).&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Make sure to add @far or to compile using the modf switch.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;example:&lt;/DIV&gt;&lt;DIV&gt;@far void myFunction (void);&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;@far void myFunction (void)&lt;/DIV&gt;&lt;DIV&gt;{&lt;/DIV&gt;&lt;DIV&gt;}&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Dec 2008 23:50:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/cx6812-can-not-link-code-correctly/m-p/206418#M8385</guid>
      <dc:creator>Pedro_</dc:creator>
      <dc:date>2008-12-02T23:50:43Z</dc:date>
    </item>
  </channel>
</rss>

