User`s guide

MPLAB
®
IDE User’s Guide
DS51519B-page 72 © 2006 Microchip Technology Inc.
4.8 USING A SINGLE PROJECT AND WORKSPACE
The most common configuration for application development in MPLAB IDE to is have
one project in one workspace. If you wish to use an MPLAB IDE v5.xx-style project (not
worry about workspaces), select Configure>Settings
, Projects tab and check “Use
one-to-one project-workspace model”.
1. Select the device you will use for development (Configure>Select Device
).
2. Create/open and set up a project in the current workspace.
3. Build the project.
To build the whole project, select either Project>Build All
or right click on the
project name in the Project window and select Build All.
To build only the files that have changed in a project, select either
Project>Make
or right click on the project name in the Project window and
select Make.
Your application is now ready to debug. When your debug session is complete:
Close the project and its associated workspace by selecting Project>Save Project
and then Project>Close
.
Reopen the project and its associated workspace by selecting Project>Open
.
4.9 USING MULTIPLE PROJECTS IN A SINGLE WORKSPACE
You may wish to have multiple projects in one workspace. This makes use of one
workspace setup (i.e., selected device, debug tool, window setups, etc.) for many
projects.
Some applications can benefit from using more than one project in a workspace.
Consider the following examples.
EXAMPLE 4-1: BOOTLOADER
A bootloader has its own source code and its only function is to download and program
a new version of an application in flash memory. The bootloader would always exist in
a fixed location in program memory, and would be executed by a special function of the
application. The bootloader would then download a program through a communica-
tions port and overwrite the existing application with an new version. Both the boot-
loader and the application share the same settings for the dsPIC30F device since they
will exist on the same part, but they are independent pieces of code. The application
knows only the entry address for executing the bootloader. The bootloader knows only
the start address for the upgrade code.
EXAMPLE 4-2: TESTS
Another use of multiple projects is when developing a series of tests for a single
application. These tests might exist in the same locations in program memory, but
never be loaded simultaneously.
EXAMPLE 4-3: APPLICATION CONFIGURATION
A third possibility is that the application has multiple configurations for the end product.
An application might be sold under multiple brands or with alternate languages. Each
project could contain the branding information or language strings for the application in
a separate resource file.