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

DEBUG HEX VS RELEASE HEX

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



Joined: 12 Dec 2011
Posts: 8
Location: USA

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

DEBUG HEX VS RELEASE HEX
PostPosted: Wed Sep 16, 2015 11:40 am     Reply with quote

Should the debug hex and release hex files be radically different even those the listing files are almost identical. when comparing the hex files using the file compare tool, there are minor differences in code scattered all thru the code. Is this normal?
temtronic



Joined: 01 Jul 2010
Posts: 9226
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Wed Sep 16, 2015 2:45 pm     Reply with quote

yes it is 'normal' and shows why a program compiled in 'debug' mode will NOT function correctly when burned into a PIC and run 'in the real World'.
It's also why my default is 'release' mode as I've never needed the 'debug' function in 25+ years since I've always tested 'in the real World'.

Jay
rwalborn



Joined: 12 Dec 2011
Posts: 8
Location: USA

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

DEBUG HEX VS RELEASE HEX
PostPosted: Wed Sep 16, 2015 3:36 pm     Reply with quote

Thanks for the reply. the reason I asked , is that I have a program that runs connects to usb in debug mode but not in release mode.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Wed Sep 16, 2015 4:25 pm     Reply with quote

The fuses change between debug and release modes. Compile for both
modes and compare the fuses listed at the end of the .LST file in each
case. See if you can find a problem.
temtronic



Joined: 01 Jul 2010
Posts: 9226
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Wed Sep 16, 2015 4:30 pm     Reply with quote

Without seeing the code or context I have to assume the program is using some of the 'features' of the debugger which of course are not available in the 'release' version.
Using the 'debug' version in the 'real World' could lead to a lot of trouble as someone could 'press a key' and invoke a debugging feature...altering variables, sending bad data or at the very least crashing the PIC.

Those that have used the 'debugger' for years may know about 'hidden commands', memory usage, errors in timing, etc. Things were a LOT simpler 30-40 years ago !

Jay
Ttelmah



Joined: 11 Mar 2010
Posts: 19512

View user's profile Send private message

PostPosted: Thu Sep 17, 2015 7:38 am     Reply with quote

The other thing, is if he is running in debug mode, he presumably has the debugger connected?. If so, there is an extra power connection, and ground, and also the MCLR pin is being controlled by the debugger.....
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