PsoC Creator 2.2 SP1

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

cross mob
Anonymous
Not applicable

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?

0 Likes
5 Replies
HeLi_263931
Level 8
Level 8
100 solutions authored 50 solutions authored 25 solutions authored

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

0 Likes
Anonymous
Not applicable

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.

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

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

0 Likes
HeLi_263931
Level 8
Level 8
100 solutions authored 50 solutions authored 25 solutions authored
        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.   
0 Likes
Anonymous
Not applicable

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

0 Likes