4 Replies Latest reply on Nov 18, 2012 5:16 PM by user_14586677

    Difference in hex files

    srihari.s

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

        • 1. Re: Difference in hex files
          user_1377889

          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

          • 2. Re: Difference in hex files
            srihari.s

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

            • 3. Re: Difference in hex files
              user_1377889

              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

              • 4. Re: Difference in hex files
                user_14586677

                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.