CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

sprintf for float
Goto page Previous  1, 2
 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
jmd02
Guest







PostPosted: Tue Nov 03, 2009 10:54 am     Reply with quote

I also tried different sizes of float with no result.
I noticed in the .lst file that no matter the size of the float you use, they convert it to 64 bit float before calling the printf or sprintf routine.
I contacted CCS and they sent me a new PCD.DLL, that didn't solve the problem either, so they are checking my .lst file. I'll keep you informed of the progress.

thanks
jmd02
Guest







PostPosted: Tue Nov 03, 2009 2:52 pm     Reply with quote

No answer from CCS yet, had to make the conversion from float to string myself, then print the string, works ok. Don't know the reason of the problem but I'm assuming is a bug in the PCD, I hope they can prove me wrong.
FvM



Joined: 27 Aug 2008
Posts: 2337
Location: Germany

View user's profile Send private message

PostPosted: Tue Nov 03, 2009 4:59 pm     Reply with quote

As I reported above, I can't confirm a general PCD problem with printing floats. As long as you can't provide an example, that shows the problem, I'll keep believing, that it's an unspecific problem in your application code, e.g. a stack overflow. Did you check RCON for the reset cause?

A stack overflow would be my favourite candidate, because it has been shown, that the default PCD stack setting is too small.
http://www.ccsinfo.com/forum/viewtopic.php?t=40083

I'm not saying, there can't be a PCD bug with float. But it's at least not general and obvious.
jmd02
Guest







stack error
PostPosted: Wed Nov 04, 2009 8:19 am     Reply with quote

FvM
thanks for your help,
The RCON register showed a Trap Error Reset.
Reading your post, I realized why my Stack Error Trap routine was not working.
I just set the stack size to 256 - #build (stack=256) and everything is working fine now.
FvM



Joined: 27 Aug 2008
Posts: 2337
Location: Germany

View user's profile Send private message

PostPosted: Wed Nov 04, 2009 8:40 am     Reply with quote

That's good!

I think, CCS may want to correct the misleading stack usage report in PCD list files and also set a larger default stack size.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group