<?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>CodeWarrior for MCUのトピックSTRCPY Function.</title>
    <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/STRCPY-Function/m-p/127033#M449</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello Friends,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've been using the NE64 with a RAM external memory. Anybody could help me with the strcpy function? How can I copy or transfer some data from one page to another page. For example, 0x118000 to 0x108000. Does anybody know how I can use the strcpy function to do it? Or does anybody have any other idea?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Best regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Marco.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 20 Mar 2007 08:14:58 GMT</pubDate>
    <dc:creator>NeoSP</dc:creator>
    <dc:date>2007-03-20T08:14:58Z</dc:date>
    <item>
      <title>STRCPY Function.</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/STRCPY-Function/m-p/127033#M449</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello Friends,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've been using the NE64 with a RAM external memory. Anybody could help me with the strcpy function? How can I copy or transfer some data from one page to another page. For example, 0x118000 to 0x108000. Does anybody know how I can use the strcpy function to do it? Or does anybody have any other idea?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Best regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Marco.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Mar 2007 08:14:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/STRCPY-Function/m-p/127033#M449</guid>
      <dc:creator>NeoSP</dc:creator>
      <dc:date>2007-03-20T08:14:58Z</dc:date>
    </item>
    <item>
      <title>Re: STRCPY Function.</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/STRCPY-Function/m-p/127034#M450</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;(Assuming that NE64 = HCS12)&lt;BR /&gt;&lt;BR /&gt;No, it wouldn't be possible with strcpy(). The simple solution would be to write your own function that takes far pointers as parameters. Put this function in non-paged flash then save the page register in a temporary variable, set the page register manually, copy data and restore the page register.&lt;BR /&gt;&lt;BR /&gt;Perhaps CW contains a non-standard library function for this, but it is always better to write non-standard functions yourself, because then you will have the source code when/if you decide to port the code in the future.&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Mar 2007 22:24:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/STRCPY-Function/m-p/127034#M450</guid>
      <dc:creator>Lundin</dc:creator>
      <dc:date>2007-03-20T22:24:28Z</dc:date>
    </item>
    <item>
      <title>Re: STRCPY Function.</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/STRCPY-Function/m-p/127035#M451</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Hello&lt;/DIV&gt;&lt;DIV&gt;Just my 10 cents on that one.&lt;/DIV&gt;&lt;DIV&gt;When you are building in BANKED memory model, strcpy assumes per default, that all pointer are 16-bit wide.&lt;BR /&gt;If you need to pass 24-bit pointer to strcpy, you need to rebuild an ansi library supporting 24-bit pointer to char.&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;There should be an FAQ around that in the system.&lt;BR /&gt;BAsically:&lt;BR /&gt;- Open the project HC12Lib.mcp&lt;BR /&gt;-&amp;nbsp;Edit the file libdefs.h located in the installation directory "LIB\HC12C\include". In this file modify lines 74 and 78 as follows:&lt;BR /&gt;&amp;nbsp; &amp;nbsp;#define LIBDEF_FAR_CONST_STRINGS&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp; &amp;nbsp;#define LIBDEF_FAR_STRINGS&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&lt;BR /&gt;-&amp;nbsp;Generate the library again. This can be done using the project hc12 lib.mcp located in the installation LIB\HC12C directory. Technical note TN105 provide you information how to generate a new library.&lt;BR /&gt;If you are using HCS12 CPU, make sure to compile your application and the library with -CpPPAGE=RUNTIME to let compiler know banked constant must be accessed using runtime function.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I attached the referenced Technical note to this thread.&lt;/DIV&gt;&lt;DIV&gt;&lt;BR /&gt;CrasyCat&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Mar 2007 23:33:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/STRCPY-Function/m-p/127035#M451</guid>
      <dc:creator>CrasyCat</dc:creator>
      <dc:date>2007-03-20T23:33:40Z</dc:date>
    </item>
    <item>
      <title>Re: STRCPY Function.</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/STRCPY-Function/m-p/127036#M452</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;No, you don't want to do that. It may make the code portable between two compilers but not between two computers. The next person who picks up that project will have a hard time understanding why the code isn't working, since the libs are stored on a local computer.&lt;BR /&gt;&lt;BR /&gt;That will also force all calls to strcpy() to use far pointers even when it isn't needed, which may reduce the performance of the program in an unwanted way.&lt;BR /&gt;&lt;BR /&gt;The serious approach is to do as I suggested and write a separate routine yourself.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;As a sidenote, if you use CpPPAGE=RUNTIME, wouldn't you have to link that pesky datapage.c to the project as well? I'm pretty certain that the compiler ignores that particular compiler option unless you do.&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Mar 2007 14:52:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/STRCPY-Function/m-p/127036#M452</guid>
      <dc:creator>Lundin</dc:creator>
      <dc:date>2007-03-21T14:52:42Z</dc:date>
    </item>
    <item>
      <title>Re: STRCPY Function.</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/STRCPY-Function/m-p/127037#M453</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;I don't have any experience with CW for HCS12, but I used HC16 compiler(formerly Hiware technology) where far keywords could be used to specified 20bits pointer instead 16bits.&lt;BR /&gt;&lt;BR /&gt;Maybe CW HS12 compiler let you write things like this :&lt;BR /&gt;strcpy((char *far)destPtr, (char *far)srcPtr));&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Emmanuel&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Mar 2007 17:03:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/STRCPY-Function/m-p/127037#M453</guid>
      <dc:creator>Nouchi</dc:creator>
      <dc:date>2007-03-21T17:03:59Z</dc:date>
    </item>
  </channel>
</rss>

