TCPmaker : Visual Tour    Changing Your Layout and Regenerating Code  

At this point, we are done with our changes to the layout, so we follow the usual steps to save our layout and generate code, making sure to save the project file as we exit TCPmaker.

The Windows Explorer screen shot below shows the contents of the subdirectory

  PIC\MCHP_C18\TCPmaker\

subdirectory, under our project directory C:\Trace\TCPmakerPro\Projects\Partial\. This subdirectory is where the generated code goes, and where the generated MPLAB project file is found.

The red arrows are pointing to the only two new file names in this subdirectory: mtGen.h0 and mtGen.c0.  These are the previous versions of the files mtGen.h and mtGen.c, which contain the "real I/O" code that you added to these files.  These files were renamed from mtGen.c to mtGen.c0, and from mtGen.h to mtGen.h0, just before the code generator generated new files.

The files mtGen.h and mtGen.c that we see now are the newly regenerated versions, which do not contain your "real I/O" code snippets, until you copy those snippets from the .c0 and .h0 files into the new .c and .h files.

If you re-generate code a second time, then the new version of mtGen.c will be copied to a new file mtGen.c1, just before a new file mtGen.c is generated.  A similar process of renaming occurs with mtGen.h as well.

If you keep re-generating code again and again, this process will continue until you have created mtGen.c9 and mtGen.h9.  If at this point you try to regenerate code one more time, TCPmaker will warn you, and give you a chance to move or rename mtGen.c0 and mtGen.h0, before it renames the previous mtGen.c to mtGen.c0, and renames the previous mtGen.h to mtGen.h0.

As long as you understand what is happening, you should never be in danger of losing your "real I/O" code additions.  You have plenty of opportunity to save and transfer your "real I/O" code snippets to your newly re-generated files.

   

 

open full sized image

26 of 39
Copyright Notice and Author Information