Advice on MPLAB v7.40 please

Status
Not open for further replies.

ljcox

Well-Known Member
I have MPLAB v7.40 and have written many successful programmes, but I would like to know if there is an easier way to create a new project than the following:-

Select Project/New

Enter project name eg. "test"

Click on "Browse" and select a folder.

A small window "test.mcw" appears with a folder "test.mcp" and several sub folders such as "Source files".

So far so good.

But how do I start a source code file?

I've tried various methods to achieve this end, but the only one that works is as follows:-

Click on the "New file" icon in the Toolbar.

A window appears "MPLAB IDE Editor" with "Untitled" in the top left corner.

I then type in the code.

But if I press button F10 to assemble, a "Save as" window appears, so I type in the file name, eg. "test" and click on

"Save".

The following message appears:-

"Build aborted. The project contains no source files"

However, the "Untitled" tag changes to "test.asm".

Now if I right click on the "Source file" folder in the "test.mcw" window and add the "test.asm" file, I can press F10

and then the code will assemble successfully.

This seems to be a clumsy procedure, is there a simpler method?

Any advice will be appreciated.
 
Len,

Try Projects/Add new file to project... and type filename.asm in the box.
This is in version 7.6 but I think it was the same in 7.4

Mike.
 
I find it easier to create a new folder for my project, copy a template asm file for my microcontroller to there and rename it to suit my new project.

Then open mplab, create a new project, browse to my new folder and add my asm file to the project.

That ensures that my new asm files will have a standard header etc. at the start.
 
Add, that simple!

Add file to project, as Pommie says.

Just in case, I still work in absolute mode (no flaming please!).

In my case, I have another 15 to 20 files INCLUDEd in that one.
 
I prefer using the Project Wizard as it presets the processor type, language toolsuite, file/folder locations, etc. Then I "open" an existing template 'asm' file, do a "save as" to the new project folder, and "add file to project". The whole process takes less than a minute.

Good luck. Mike
 

hi,
This is way I also start a new project, then open the source window and add a suitable header file.
I know that the templates for each PIC can be found in the MPLAB folders, but I prefer to use my own header file as it has my include files and other details.
 
From the open asm. file you can select Project-Quickbuild(your filename) and that's it, i always only use Quickbuild.
 
Thanks for the advice.
I decided to use the method posted by Mike and Eric, ie. use the Wizard.

I discovered that at Step 4, I can copy the template and then change its filename, which is what I expect Mike meant by "save as"
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…