|
|
View previous topic :: View next topic |
Author |
Message |
JimmyNg Guest
|
I need help with this unknown build problem |
Posted: Sun Apr 01, 2007 10:34 am |
|
|
hi,
I have a build. It works fine when it in ICD debug mode. I can start/stop and run, but when i burn the code in the hardware using the ICD option in the CCS IDE, the hardware won't start up. Power down, then up again, the HW still show the same problem. In such case, if i use the volt metter to measure the 47K resistor to the MCLR, or using the stick to "poke" or touch that resister few times, then the HW starts come up and works fine.
If i insert few more lines of code in the build ( just some dummy array or harmless printf statements) and re-compile the build, then the problem goes away. I can burn it in the hardware and it can start up when powerup.
This problem comes and goes...I just wonder if anyone in the forrum experiences similar problem like mine.
Here is the compiler and the build usage:
CCS PCH C Compiler, Version 3.228, 28569 01-Apr-07 08:47
Filename: C:\Program Files\PICC\projects\newdesign\development\base\main.LST
ROM used: 50390 bytes (39%)
Largest free fragment is 64704
RAM used: 2183 (57%) at main() level
2392 (62%) worst case
Stack: 13 worst case (11 in main + 2 for interrupts)
Thank,
Jimmy |
|
|
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. |
|
|
|
|
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
|