Here is what I did to allow compatibility between years, and between IDEs. I have a "core" directory, a "modules" directory, a "2005" directory and a "visual studio" directory. I put all c/h files I personally make (or get from Kevin's website) into the modules directory, and I put all of the files supplied by IFI's 2006 default code into the "core" directory. I copied the 2006 default code's
workspace files to the "2005" directory, followed the instructions to ensure compatibility with '05 controllers, and then included all my modules from the "modules" directory, and the relevant IFI code from the "core" directory into that project. I didn't trust the pic's being #define'd, so I edited the project settings in the "2005" directory to include the definition of VERSION_2005_CODE (-D_VERSION_2005_CODE), and then I test for the presence of this macro where relevant. For example, in Kevin's EEPROM code:
Code:
// Need to include a different file in the event of a compilation for the
// '04-'05 controller.
#ifdef VERSION_2005_CODE
#include "ifi_picdefs.h"
#else
#include <p18f8722.h>
#endif
#include "rkw_eeprom.h"
So now, for me, switching between the two platforms is a matter of opening the right workspace, and rebuilding
all files.
I also created a visual studio solution, and stored it to the "Visual Studio" directory. I include all the c/h files into this solution, and do all my coding there. When its time to compile, I alt+tab to the MPLab editor (it senses that the files have changed at this point), and pretend as though I had been coding there all along.
c:\2006 Robot Code\
c:\2006 Robot Code\modules\
c:\2006 Robot Code\2005 Workspace\
c:\2006 Robot Code\Visual Studio\
c:\2006 Robot Code\documentation\
That might help you in the long run, though it doesnt solve your current problem.