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

No startup outside of debugger

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



Joined: 26 Jun 2006
Posts: 5
Location: Wertheim/Germany

View user's profile Send private message Visit poster's website

No startup outside of debugger
PostPosted: Thu Jul 27, 2006 5:47 am     Reply with quote

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

View user's profile Send private message

PostPosted: Thu Jul 27, 2006 6:21 am     Reply with quote

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

View user's profile Send private message

PostPosted: Thu Jul 27, 2006 7:06 am     Reply with quote

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

View user's profile Send private message Visit poster's website

Thanks, guys, for the hints.
PostPosted: Fri Jul 28, 2006 6:24 am     Reply with quote

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
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