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

reset angst!!!!

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
ftsame
Guest







reset angst!!!!
PostPosted: Wed Jul 27, 2005 12:02 am     Reply with quote

hi everyone. the problem with my program is that it works only when it is reseted. theoratically it should work continously, but in reality it only works every time i clear the memory. can any body help me with my problem. i am dynamically allocating and freeing memory, could this have anything to do with this. would a watchdog timer be a suitable solution. in my program i am doing the string parsing of a gps, and then using a formula to calculate the truecourse between two points. this program works only once (and that upon a reset), even though i have a while(1) in the code. can any body suggest a solution

thank you
ft
mwildbolz



Joined: 26 Jul 2005
Posts: 16

View user's profile Send private message

PostPosted: Wed Jul 27, 2005 1:29 am     Reply with quote

Can you post your code??
This would be very helpful Very Happy
MikeValencia



Joined: 04 Aug 2004
Posts: 238
Location: Chicago

View user's profile Send private message Send e-mail Yahoo Messenger

PostPosted: Wed Jul 27, 2005 5:15 am     Reply with quote

Your first step should be to use ICE2000/4000 or an ICD to step thru your code and see where you are freezing or looping. Or use simple rs232 statements to show your progress thru your state machine.
ckielstra



Joined: 18 Mar 2004
Posts: 3680
Location: The Netherlands

View user's profile Send private message

PostPosted: Wed Jul 27, 2005 5:58 am     Reply with quote

In addition to all the above:
Always mention your processor type and compiler version. I can remember there was a malloc error solved in one of the older releases.

The use of malloc/free should not be a problem, but do you really need them? Problem with the use of these functions in embedded systems with limited memory is that they will create memory fragmentation resulting in running out of memory in the long term (but not after running the program 1 time).
mwildbolz



Joined: 26 Jul 2005
Posts: 16

View user's profile Send private message

PostPosted: Wed Jul 27, 2005 6:19 am     Reply with quote

Like MikeValencia said, i'd say, that i would be the best to implement some messages into your program to see, in which state the �C is (and the easiest way is to do this via the RS232 interface).

Greetings, Markus
ftsame4
Guest







cheers guyz!!!
PostPosted: Fri Jul 29, 2005 3:50 am     Reply with quote

thankyou to everyone for their useful suggestion, i am greatly indebted to you all

cheers
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
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