daniel herve

pb with sprinf since use of const string in banked mem

Discussion created by daniel herve on Jul 26, 2007
Latest reply on Jul 31, 2007 by daniel herve
hello,

I create a new post (too far away from the begining)

My program was running but i had to move the string in banked memory.

I use the FAQ "FAQ-27439". (thx crasycat for the tip)

But now i have a problem with sprintf.

a simply example:

char stH[10]=" --- ";
char stO[30];
nInd = sprintf(stO,stH); // => good result
nInd = sprintf(stO,"%s",stH); // => bad one
why ?

I search on post and found this :
tim_milliken
Problem with CW12 4.5
http://forums.freescale.com/freescale/board/message?board.id=CW816COMM&message.id=87&query.id=11133#M87

I think tim_milliken had the same problem.
he wrote in the message 5:
"I made a compltely new project and that is the only thing I did, and it did not work. I sometime step into sprintf and notice that the format that gets passed in is messed up."

I have the same problem with the format.

someone have an idea?

thx,

Outcomes