Skip to main content
Visitor II
March 22, 2010
Question

using functions from string.h

  • March 22, 2010
  • 3 replies
  • 885 views
Posted on March 22, 2010 at 19:56

using functions from string.h

    This topic has been closed for replies.

    3 replies

    Visitor II
    May 17, 2011
    Posted on May 17, 2011 at 15:07

    Hi,

    if you have the problem with several functions there's probably something wrong in your program: please post more details.

    However, we recently fixed a small problem with the header of memcpy (in string.h): if you use the free version you can get the latest (fixed) here: http://www.cosmicsoftware.com/download_stm8_32k.php

    If it's a full version, please contact us and we'll set up a private download for you.

    Regards,

    Luca (Cosmic)

    will2Author
    Visitor II
    May 17, 2011
    Posted on May 17, 2011 at 15:07

    Hi Luca,

    I spent some more time working on this and I had taken out every function call but one (strcat()....just appending a short string to the end of a UART buffer).  During debug, I found that my program would still hang on this function call.

    I ended up changing my memory model to ''Long Stack (+modsl)'' and it seems to work now.  Now I have many calls to strcpy() and strcat() in place with no problems.

    How recent was the fix made to the memcpy header?  I'm using the free version....I downloaded it on 3/4/2010.

    Thanks!

    Super User
    May 17, 2011
    Posted on May 17, 2011 at 15:07

    Are you sure that your strings are correctly terminated?