View previous topic :: View next topic |
Author |
Message |
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
|
JimmyNg Guest
|
|
Posted: Mon Apr 02, 2007 4:31 pm |
|
|
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
|
|
|
JimmyNg Guest
|
|
Posted: Tue Apr 03, 2007 4:10 pm |
|
|
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
|
|
Posted: Wed Apr 04, 2007 12:02 am |
|
|
Compile it with #opt 7 and #opt 8. Compare the differences between
the .LST files. Look for something that could cause the problem. |
|
|
|