View previous topic :: View next topic |
Author |
Message |
mschmelz
Joined: 26 Jun 2006 Posts: 5 Location: Wertheim/Germany
|
No startup outside of debugger |
Posted: Thu Jul 27, 2006 5:47 am |
|
|
I wrote a nice opiece of software for the PIC18F2550, which behaves perfectly in the debugger under ICD40.
You would expect that if I pull the debug plug and reapply power, the
thing should start up all by itself.
Silly - It doesnt.
I am almost sure I missed an Important, but widely undocumented point -
Is there anybody out there in the CCS universe who already came across this ? |
|
|
rberek
Joined: 10 Jan 2005 Posts: 207 Location: Ottawa, Canada
|
|
Posted: Thu Jul 27, 2006 6:21 am |
|
|
When the ICD is used for debugging, it does not actually program the device.
If you want it to run stand-alone, you have to fire up the separate ICD program (outside of the CCS compiler) and load the HEX file into the device. |
|
|
ckielstra
Joined: 18 Mar 2004 Posts: 3680 Location: The Netherlands
|
|
Posted: Thu Jul 27, 2006 7:06 am |
|
|
rberek wrote: | When the ICD is used for debugging, it does not actually program the device. | This is not true, the device is programmed. Besides your program also the #debug fuse will be set and some debugging program code is added at the end of memory and that's why it doesn't want to run standalone.
In MPLAB you explicitely have to select if you want to use the ICD as a debugger or as a programmer. I have no experience with the CCS IDE, but my guess is there is a similar option. Have you tried programming with the Debug/Disable menu option set?
Also under the Options/Debugger-Programmer menu item set your ICD unit for the programmer. |
|
|
mschmelz
Joined: 26 Jun 2006 Posts: 5 Location: Wertheim/Germany
|
Thanks, guys, for the hints. |
Posted: Fri Jul 28, 2006 6:24 am |
|
|
I used the ICD control program to downlaod the COF file, and it really works - Although there is no different setting, downloading the file to the target makes it work standalone.
I assume there is a difference in the startup code that is being downloaded when you use the ICD debugger, so the debugger can attach at the program head.
Anyway, thanks to both of you !
I have been messing with this for 2 days now, and this really helped.
Let me know if I can help you guys another time !!!
Michael |
|
|
|