cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC 5, 3 & 1 MCU

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
JoMe_264151
Expert II

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
JoMe_264151
Expert II

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

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