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

I need help with this unknown build problem

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



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Sun Apr 01, 2007 2:38 pm     Reply with quote

Read this thread about trying different optimization levels (with #opt):
http://www.ccsinfo.com/forum/viewtopic.php?t=23991

This is a two-page thread. Read it and my post at the end
about "don't do anything weird":
http://www.ccsinfo.com/forum/viewtopic.php?t=24548

Read the links in this thread, which are about "random resets".
Some of the solutions may help with your problem.
http://www.ccsinfo.com/forum/viewtopic.php?t=27638&start=4

Another thread about trouble-shooting strange problems:
http://www.ccsinfo.com/forum/viewtopic.php?t=19721
JimmyNg
Guest







PostPosted: Mon Apr 02, 2007 4:31 pm     Reply with quote

PCM programmer,
Thank you so much for the links. I read them and tried some of the sugesstions, but the problem won't go away. I have not tried the #opt level yet, I will try it soon. By the way, I use the 18F8720 PIC

The problem is so unexpected, just adding in some more dummy codes or printf statements, might make the problem disappeared.

Even with the problem, runing in debug mode seems OK. In the Non debugger mode, It seems that the build can be loaded on the target, but during the power resets, it can't start unless I hold the MCLR pin to gound for a second( I do have a 47 Kohm pullup at the MCLR pin)...

I really want to undersand the root cause of this problem, but in case if i can't find out. I wonder if I add some dummy code to make the problem goes away, then how reliable the build is and can i trust the build to use it for release????

Jim
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Mon Apr 02, 2007 5:23 pm     Reply with quote

Are you sure that you're programming the PIC for "standalone" mode ?

Here is a thread that describes how to do that.
http://www.ccsinfo.com/forum/viewtopic.php?t=28356&highlight=standalone+icd

Also, look for anything that's strange in your hardware connections.
For example, sometimes a board will only work if the ICD-U40 is
connected to it. That's because the ICD-U40 was providing the
ground connection (it was left off the design by accident).
http://www.ccsinfo.com/forum/viewtopic.php?t=28072&highlight=icd+ground
JimmyNg
Guest







PostPosted: Tue Apr 03, 2007 4:10 pm     Reply with quote

hi,
I tried with the #opt 7....The code size jumps up from 39% to 47%. The problem goes away. I wonder if later on, I add more code into the build, then the problem will be appreare again.

With higher level 8->11. It won't work.

I like to know more about the #opt. Choosing the higher OPT, will make the compiler procudes smaller the code side at the expense of execution time?
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Wed Apr 04, 2007 12:02 am     Reply with quote

Compile it with #opt 7 and #opt 8. Compare the differences between
the .LST files. Look for something that could cause the problem.
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