5 Replies Latest reply on Jul 2, 2013 7:40 AM by ki.leung

    PsoC Creator 2.2  SP1

    anton.ruban

      Hello. I got the newest  version of PSOC Creator. 

         

      I have a strange bug,:  After opening,editing and  saving my project it randomly  returns to its previous version.

         

      I push "Build" and suddenly the part of code dissappear and it looks like my  2 days old version.All changes are gone..

         

       

         

      Anyone confronted this  problem?

        • 1. Re: PsoC Creator 2.2  SP1
          user_78878863

          Which files get changed? Only the .c / .h files in the generated source code folder? They might be changed when your schematic changed, and then changes in there can get lost.

             

          Changes in any other files (e.g. your main.c) would warrant opening a support case with Cypress...

          • 2. Re: PsoC Creator 2.2  SP1
            anton.ruban

            thank you for reply. I figured it out.

               

            My changes in  generated  code were not in

               

            /* `#START isr_1_intc` */

            /* `#END` */

               

            part.

               

            I though it is only a comment, but seems it also prevents this code from over writting.

            • 3. Re: PsoC Creator 2.2  SP1
              user_1377889

              Yes, you are right: those areas for inserting your code preserve what you have written into while the whole other area could be generated anew. This not only allows for re-naming a component but for updating to a newer version (when availlable) as well AND still preserving your code.

                 

              In my opinion altering generated files may carry a small risk an mainly are not portable to a different PSoC(3/4/5) model. This is the reason why I prefer the method of using

                 

              CY_ISR_PROTO(MyHandler);

                 

              CY_ISR(MyHandler) {...}

                 

              and

                 

              Isr_1_StartEx(MyHandler);

                 

              To keep everything in my own source-files.

                 

               

                 

              Bob

              • 4. Re: PsoC Creator 2.2  SP1
                user_78878863
                        I second Bob. Having own code in the generated source files seems to be OK, but there are still cases where it might get lost (e.g. renaming a component instance). Also, having it in your own files make source control easier.   
                • 5. Re: PsoC Creator 2.2  SP1
                  ki.leung

                   that is a very common mistake when one wants to do it quick. One they learn the lesson, people won't do it again.