cancel
Showing results for 
Search instead for 
Did you mean: 

using functions from string.h

will2
Associate II
Posted on March 22, 2010 at 19:56

using functions from string.h

3 REPLIES 3
luca239955_stm1_st
Senior II
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)

will2
Associate II
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!

Andrew Neil
Evangelist III
Posted on May 17, 2011 at 15:07

Are you sure that your strings are correctly terminated?