Instead references are updated such that copied project will find files where they still are. MysilIt does copy what is in the project directory and subdirectories. Am I missing something obvious here? Any help greatly appreciated! But it seems to ALWAYS require lots of tweaking and tuning just to get the copy to behave like the original, despite having made ZERO changes to any of the files. I would think MPLAB X's own Project Copy operation would "work". Back, forth, back, forth, 100% repeatable. Switch back to the original and everything works. Switch to the copy, you get errors everywhere. Keep in mind that this is the same target PCB (from Microchip), same PICkit3, same USB cable, even the same session of MPLAB X. I can switch back to the original project and it will compile, program, debug, and run perfectly. This is often caused by configuration errors in the oscillator or PGC/PGD." This despite the fact that the copied project has the exact same, verbatim CONFIG data as the original project.
![mplab xc8 copy and rename project mplab xc8 copy and rename project](https://i.ytimg.com/vi/YGDT99z6HjU/maxresdefault.jpg)
(This is the same physical board that the original project programs perfectly without complaint!) * "Target is not ready for debugging. * "Destination device will not program", which can be fixed each time by manually erasing the device. Copy-and-paste doesn't solve it, you have to manually retype each character and then comment out the original line. Sometimes a line like this can be fixed simply by retyping it literally the same characters, but one line works and the other doesn't. I have tried associating source and header files with the new project both as absolute and relative paths, doesn't make a difference.
![mplab xc8 copy and rename project mplab xc8 copy and rename project](https://a.pololu-files.com/picture/0J5695.600.png)
But removing it from the original breaks the original, despite them both having identical directory structures. #include "include\usb.h"., it can be fixed by removing the "include\" path data. Sometimes this can only be fixed by editing every #include statement to add(?) or remove(?) the path content. (I've tried this last step both with relative and absolute paths, it doesn't make a difference.) At this point, the new (copied) project generally has one or more of the following errors (the exact wording may be off a bit, I'm typing from memory): * "Source file not found" type errors, often for header files, even though they are in exactly the same place in the directory structure. I remove them from the Project (in the Project window) and re-associate them. * This process inevitably refers to the source files of the *original* project in the *original* folder, so I manually copy the source files over so the originals aren't altered. I click that, give the copy a different name and destination folder, and let the dialog box work its magic. * With the project open in MPLAB X, I highlight the name of the project in the Project window and right click to bring up the menu. It compiles without error, programs for either debug or production, can be debugged with breakpoints, etc.
MPLAB XC8 COPY AND RENAME PROJECT CODE
Here's today's scenario (using MPLAB X V3.40): * I have a perfectly running set of source code that runs on a Microchip demo board. It happened again today and I wasted several hours getting things to work. This problem comes up every time I copy a project. So I don't know what is happening and why the cg- files aren't being patched.What's the trick to successfully copying a project in MPLAB X? They look the same, at least they have the same hash. This is the xclm i was using, but I also used the xclm in, after some search. I'm curious if I'd get the same results than you using the same xlcm (just in case mine is not the same). only 2 files patched.Ĭould you point to the exact post/link of the xclm you are using? or upload yours to some site to download. Update: Installed 1.45 in default path, same result. Update: I also tried with 1.44, installed in custom path, same result with only those 2 files patched. As I said I had no problem with previous versions. I'm using W7 Home Premium 64b, admin rights, etc. The only difference with your image is I'm not using the default path for installing. I uninstalled and reinstalled, and used the last xclm i found in the thread, just in case mine is not updated.
![mplab xc8 copy and rename project mplab xc8 copy and rename project](http://www.metrocast.net/~sbeau1/mplabx_project_properties.jpg)
The result is in the picture below which shows that all 4 files are patched.
![mplab xc8 copy and rename project mplab xc8 copy and rename project](https://microchipdeveloper.com/local--files/mplabx:set-main-project/MainProject.png)
Just from habit, I don't know if it's needed anymore. In my case the only thing that is not showed here is that I overwritten also the xclm.exe from MPIDE/BIN folder with the fixed file. You made me curious and I uninstalled the XC8 1.45 compiler and reinstalled it.