View previous topic :: View next topic |
Author |
Message |
kuriken
Joined: 21 Oct 2006 Posts: 19
|
Unable to Debug |
Posted: Wed Aug 29, 2007 2:59 pm |
|
|
Hello,
I have the following setup:
target PIC: 18F4620
PCWH 4.053
ICD 2.81
When I enable debugger in PICC, I can load the program, but I get errors in the verification results. I initially suspected my hardware. So I swapped cables, ICD, PIC hardware and PC, to no avail. The ICD works fine if I load *.hex files from the ICD program. Is anybody else experiencing this? I'm starting to think its a problem with the IDE. Please advise. |
|
|
Ken Johnson
Joined: 23 Mar 2006 Posts: 197 Location: Lewisburg, WV
|
|
Posted: Thu Aug 30, 2007 6:37 am |
|
|
I have been able to use the 4.053 debugger ok for a few parts that we use (haven't tried yours). Not much help, but seems to me it should work.
Ken |
|
|
kuriken
Joined: 21 Oct 2006 Posts: 19
|
Figured out what was wrong |
Posted: Thu Aug 30, 2007 5:28 pm |
|
|
Ken,
Thanks for giving me some reassurance.
I figured out the cause of the consistent errors in verification results. It was my code size being too large, 99% the ROM limit. I made the code slightly smaller and now the debugger works.
My hypothesis is that the debugger uses some ROM, and as a result the code became too large to fit on the PIC. Can somebody knowledgeable about this let me know if my hypothesis is valid?
It was difficult to figure out, because my code compiled without errors while the debugger was enabled. Maybe the next release can fix this problem.
Cheers, |
|
|
davekelly
Joined: 04 Oct 2006 Posts: 53 Location: Berkshire, England
|
|
Posted: Fri Aug 31, 2007 12:51 am |
|
|
All ICD's use some resources for ROM (top end of memory), and a few bytes of RAM.
Refer to the manual/help file to find out how much.
It is a trap, however after falling into it and spending hours trying to figure out why your app doesn't work, you remember next time!
For debugging without using any resources you need a proper [costly] hardware emulator.
In my most recent project I had this same situation, I #ifdef'ed out some non-critical functions so I could debug other parts of the app. |
|
|
|