<?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のトピックRe: Problem in code move</title>
    <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Problem-in-code-move/m-p/738771#M14985</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;Thanks for your apply.&lt;/P&gt;&lt;P&gt;Do you have any document about this? I want to know about this detailed. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I also donnot understand what about you say.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 20 Apr 2018 01:14:47 GMT</pubDate>
    <dc:creator>wangzhongyuan</dc:creator>
    <dc:date>2018-04-20T01:14:47Z</dc:date>
    <item>
      <title>Problem in code move</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Problem-in-code-move/m-p/738767#M14981</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi eveyone&lt;/P&gt;&lt;P&gt;I have some question in Flash Program. I segemented non-paged FLASHs named BOOT_MEM and relocated this segement to RAM (in .prm file). So i need to copy my function code in RAM. But something wrong in this step. When run my program, it was paused in move code function and reminder me that "&lt;STRONG&gt;No source available for "0x000001 (0x000001)()&lt;/STRONG&gt; "&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;this is main function&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;void main(void)&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;word sector = 0;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;dword addr = 0xFD8000;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;word databuffer[4] = {0x1234, 0x2344, 0x4562, 0x4525};&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;DrSys_Cpu_Lock();&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;INIT_PLL_64M();&amp;nbsp;&amp;nbsp;&amp;nbsp; //&amp;nbsp; &lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;Flash_Init();&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;DrSys_Cpu_Unlock();&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;Code_Move((dword*)0x00FD6400, (dword*)0x00003c00,0x400);&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;PFlash_Write(addr, databuffer);&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;while(1)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;Dalay();&lt;BR /&gt;&amp;nbsp; &lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;}&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this is Code_Move function&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;void Code_Move(dword *source, dword *desk, dword size)&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;while (size--)&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;*desk++ = *source++;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&amp;nbsp; &amp;nbsp; &lt;BR /&gt;}&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Apr 2018 05:36:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Problem-in-code-move/m-p/738767#M14981</guid>
      <dc:creator>wangzhongyuan</dc:creator>
      <dc:date>2018-04-17T05:36:23Z</dc:date>
    </item>
    <item>
      <title>Re: Problem in code move</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Problem-in-code-move/m-p/738768#M14982</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;What MCU are you using?&lt;/P&gt;&lt;P&gt;Can you attach the whole .prm linker file?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Daniel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Apr 2018 08:07:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Problem-in-code-move/m-p/738768#M14982</guid>
      <dc:creator>danielmartynek</dc:creator>
      <dc:date>2018-04-18T08:07:20Z</dc:date>
    </item>
    <item>
      <title>Re: Problem in code move</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Problem-in-code-move/m-p/738769#M14983</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My MCU is MC9S12ZVCA192.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="1524039172(1).jpg"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/20377i70BBAE30622BB0BA/image-size/large?v=v2&amp;amp;px=999" role="button" title="1524039172(1).jpg" alt="1524039172(1).jpg" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="1524039243(1).jpg"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/20242iFC705ADA28444907/image-size/large?v=v2&amp;amp;px=999" role="button" title="1524039243(1).jpg" alt="1524039243(1).jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Apr 2018 08:14:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Problem-in-code-move/m-p/738769#M14983</guid>
      <dc:creator>wangzhongyuan</dc:creator>
      <dc:date>2018-04-18T08:14:38Z</dc:date>
    </item>
    <item>
      <title>Re: Problem in code move</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Problem-in-code-move/m-p/738770#M14984</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Please step the code and watch size, source and desk variables.&lt;/P&gt;&lt;P&gt;The size variable decrements by 1 whereas desk and source by 4.&lt;/P&gt;&lt;P&gt;So after 100 iterations, you reach address&amp;nbsp;RAM_BOOT 0x4000.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Daniel&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Apr 2018 12:11:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Problem-in-code-move/m-p/738770#M14984</guid>
      <dc:creator>danielmartynek</dc:creator>
      <dc:date>2018-04-19T12:11:13Z</dc:date>
    </item>
    <item>
      <title>Re: Problem in code move</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Problem-in-code-move/m-p/738771#M14985</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;Thanks for your apply.&lt;/P&gt;&lt;P&gt;Do you have any document about this? I want to know about this detailed. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I also donnot understand what about you say.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Apr 2018 01:14:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Problem-in-code-move/m-p/738771#M14985</guid>
      <dc:creator>wangzhongyuan</dc:creator>
      <dc:date>2018-04-20T01:14:47Z</dc:date>
    </item>
    <item>
      <title>Re: Problem in code move</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Problem-in-code-move/m-p/738772#M14986</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;BR /&gt;You want to copy from segment &lt;BR /&gt;BOOT_MEM = READ_ONLY 0xFD6400 TO 0xFD67FF; &lt;BR /&gt;which is 0x400 wide&lt;BR /&gt;to &lt;BR /&gt;RAM_BOOT = READ_WRITE 0x003C00 TO 0x003FFF;&lt;BR /&gt;which is also 0x400 wide.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But the code you are using copies 0x1000 of data, because both the pointers desk and source increment by 4 bytes while the size variable decrements by 1.&lt;BR /&gt;So, if you change the size&amp;nbsp;argument&amp;nbsp;to 0x100, it should work.&lt;BR /&gt;Code_Move((dword*)0x00FD6400, (dword*)0x00003c00, 0x100);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;BR /&gt;Daniel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Apr 2018 13:17:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Problem-in-code-move/m-p/738772#M14986</guid>
      <dc:creator>danielmartynek</dc:creator>
      <dc:date>2018-04-23T13:17:19Z</dc:date>
    </item>
  </channel>
</rss>

