Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

How to copy project in MPLAB X???

Status
Not open for further replies.

Pommie

Well-Known Member
Most Helpful Member
I have a project that I want to use as the basis for a new project. I use copy in MPLABX to get a new project.

Try to compile the new project and get an error
"newProject.X.debug.elf does not exist or is not executable"
So, I go find said file and find that all debug and production files still have the old project name.

I rename them to the new project name.

It now compiles.

After a little while any changes I make are not being effected.

I check the files again, I now have two sets of files, the ones I renamed and a new set with the old project name.

Checking the file times, I notice the old project named files have the current time.

I think it's compiling to the old named files and loading the new named files. Hence, no changes are being made!!

HOW is such a buggy piece of software even allowed to exist.

Anyone know how to get around this?

Mike.
 
OK, tried again.
Created a new project.
Can't copy the .c and .h files as it then doesn't add them to the various compile time files and it won't compile.
So, I add all the required files, exit the IDE and copy over the files with the old project files that contain what I need.

When I open the IDE again and try to compile, it complains that main is redefined in ALL .c files.
I don't know what or where the files are that it's compiling but they're not the ones in my project.

This is what it shows me,
mplabx.png

In the error window it says _main is redefined in adc.c but when I click on adc.c in my project it shows the file in the source window.

I HATE MPLAX. It is the buggiest piece of software I've ever encountered.

Anyone know of an alternative?

Mike.
 
I've just tried it.
Copy with a new name, close original project & compile the new version - it gives an error that the output file does not exist.

All I had to do to make it work again was rename the "main" source file to match the new project name. I was guessing that was what set the names for the output files & it seems to work.
 
My main source file is always called main in all my projects - maybe that's the problem. I found that if I edited each file so it forced a save then all was OK. It, MPLABX (spit, spit), seems to keep a separate copy of your source files (no idea where). I'll give it another try tomorrow. Actually, you may have done the same thing as me, renaming may force a save and if that's the only file then all will be OK. After two hours of trying to just start a project from another project I need a rest.

Mike.
 
Came across this 'bug' some time ago, 'X' also hangs on to pervious project 'watch' settings. I should say my 'C' structure is not 'tidy' or well commented and devoid of libraries. ( but fun)
 
I've had so many bugs with this software. Breakpoints that don't exist, compiling files that have been deleted, the list is endless. Whoever made the decisions to adopt MPLABX at Microchip should be sacked. But of course, they'll get a bonus for a job well done.

Mike.
 
Oddly enough, I've never had any real problem with it & I use it all the time, though with the CCS compiler.
Must just be lucky!
 
Having used MC MPLAB since ver 6( ish) then X I don't have many 'X' issues these day , perhaps i have got used to its , 'obstacle course' of bugs. Starting a fresh project is one of them. ( Said here many times , works better for me on linux.mint )
 
I just load a project the saveas another name / folder... Seems to work for me.
How? SaveAs (project) isn't on my menu! I can save one source file but not a project. The only option seems to be copy which doesn't work.

Mike.
 
How? SaveAs (project) isn't on my menu! I can save one source file but not a project. The only option seems to be copy which doesn't work.

Mike.

I just clicked on the source file in the editor, then the 'save as' option appeared.

Personally I've never been as clever as the suggestions in this thread - I simply create a new project with the name I want, then copy the source code files only over.
 
How? SaveAs (project) isn't on my menu! I can save one source file but not a project. The only option seems to be copy which doesn't work.

Mike.
You may be on a newer build..... BUT!! just copy the directory.. reload and rename... Its just as simple..
 
Hola Pommie

This is what I always do.

Found hard to compose my post thus I went the Word + .pdf way (doing that for 20++ years for my job).
 

Attachments

  • Post for Pommie.pdf
    319.8 KB · Views: 246
Last edited:
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top