Difference in hex files

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

I have seen in some of the projects, in the result section I have 2 categories of generated files

   

1) Debug

   

2)Release

   

Both of these have a hex file. But these hex files are not the same and are different . I have no clue what are thses files for.

   

Any idea?????

0 Likes
4 Replies
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

You may specify for "Debug" and for "Release" version of your project different settings for compiler-options, linker, optimizer etc which WILL result in different hex-files.

   

 

   

Bob

0 Likes
Anonymous
Not applicable

Any Major difference between the two....and also If I am to program my device for the last time is it the release version which has to be programmed??? What if there comes a problem later and need to debug my device then does my relese code support debugging??

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

The relese built is usually programmed into devices that are shipped to production -> customer. Any reverse engeneering as reading the code, debugging and other things are unwanted to protect your design from beeing copied etc.

   

So there are some features for us designers built into the PSoCs to help us. If you do not need protections like that, do not use them.

   

Compiler's optimizing of code may disturb debugging. While the value of a variable is hold within a register to save code space and MIPs, any changes to its value will not be displayed  during debugging until the register is written back to memory.

   

Complete lines of code may be taken out of a loop when the optimizer decides to do so (we can trust to the rightfulness of such deep intrusion, it will work correctly) but the debugging will look awfull and when not prepared for it may look like an error in code but it isn't.

   

So usually the debug settings allow just for a minimal optimization, while the release settings are much stronger and even may prevent any debugging at all.

   

 

   

Bob

0 Likes
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

Usually I do not guess, but Hex files have specific formats, and device programmers in

   

turn have their "layout" when perfroming chip programming. Like the Motorola S record

   

hex file option in so many tools.

   

 

   

I suspect (guess) GNU has a doc that calls out their specifics in the release vs debug

   

file generation that you can consult.

   

 

   

Regards, Dana.

0 Likes