![]() | ![]() | ![]() |
| | |||||||
| Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc. |
| | LinkBack | Thread Tools | Display Modes |
| | (permalink) |
| 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 | |
| |
| | (permalink) |
| 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. | |
| |
| | (permalink) |
| 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. | |
| |
| | (permalink) |
| 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.
__________________ Agustín Tomás In theory, there is no difference between theory and practice. In practice, however, there is. | |
| |
| | (permalink) |
| 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 | |
| |
| | (permalink) | |
| Quote:
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.
__________________ Eric "Good enough is Perfect" PIC tutorials: Gramo's: www.digital-diy.net/ Bill's: www.blueroomelectronics.com/ | ||
| |
| | (permalink) |
| From the open asm. file you can select Project-Quickbuild(your filename) and that's it, i always only use Quickbuild. | |
| |
| | (permalink) |
| 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"
__________________ Len | |
| |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
| |
| | ||||
| Title | Starter | Forum | Replies | Latest |
| Inchworm Problem | mouse9911 | Micro Controllers | 9 | 19th May 2007 01:01 AM |
| Debugging 877A with MPLAB | williB | Micro Controllers | 10 | 7th May 2007 04:53 PM |
| Need help badly on Inchworm and MPLAB | thushy | Micro Controllers | 14 | 11th March 2007 07:05 PM |
| Some Question About Inchworm | Ayne | Micro Controllers | 29 | 7th March 2007 04:08 AM |
| Inchworm project started | williB | Micro Controllers | 69 | 5th March 2007 07:56 PM |