I have notice that PEx (10.4) sometimes updates generated source code files (.h and/or .c) when I "Generate Processor Expert Code" even though the actual content of the file hasn't changed. However, when it does this, it does modify the code generation comment as shown here:
Original:
** Date/Time : 2014-07-08, 13:35, # CodeGen: 132
New Version:
** Date/Time : 2014-07-15, 18:42, # CodeGen: 136
This does not happen all the time nor to all the files. It IS, however, very annoying when you are storing your code in a revision control system. Then, you have to decide between checking in changes that aren't changes (adding noise to RCS metadata/statistics) and spending time and/or effort to "undo" these changes prior to checking in the real changes.
It would be nice if a future version of PEx could fix this problem but in the mean time, if anyone has any ideas about what causes PEx to decide to do this update, I'd appreciate hearing it since this might give a clue about how to prevent this.
Thanks,
James
Hi James,
in principle, no derived/generated files should be stored in a version control system:
Version Control with Processor Expert Projects | MCU on Eclipse
It's like not storing object files in a version control system too.
The above article outlines the aspects. But I agree that the .pe file itself is very problematic to be used in a VCS.
In case you really want to store the generated sources: you could disable code generation of modules, see Disable my Code Generation | MCU on Eclipse.
The other thing are the *.g_x and *.g_c files: they store information about the code generation. Not sure if you store them in your VCS or not (I do not).
Otherwise, if you do any change of the .pe file, this can trigger a code generation. There is as well a global preference to prevent automatic code generation (see above article).
As a last note: the next version 10.5 has scheduled improvements in this area, so things should be improved.
In any case, if you get a code generation like you describe without having touched the .pe file, the *.g_x or the *.g_c, then I consider this as a bug. If this is the case, I would appreciate if we can submit that to the engineers as having Processor Expert working with a VCS is a big topic for me: I run classes with students and they all share their sources in GIT, so everything which makes this easier for us will help everyone else :-)
Erich