User`s guide

MPLAB
®
IDE User’s Guide
DS51519B-page 64 © 2006 Microchip Technology Inc.
5. Enter files in the project by selecting Project>Add Files to Project, by right click-
ing on the project name in the Project window and selecting Add Files to Project,
or by right clicking on the type of file in the Project window and selecting Add
Files to enter that specific type of file.
6. Delete files in the project by selecting Project>Remove File From Project
or by
right clicking on the file in the Project window and selecting Remove.
7. If you want language tool properties for individual files to differ from those set for
the project, select Project>Build Options>filename
, where filename is the name
of the individual file, or right click on the file name in the Project window and
select Build Options. These settings will apply only to the individual file.
4.4 SETTING UP A PROJECT STRUCTURE – RELATIVE PATHS
The following is an example of recommended project directory structure for using
relative paths on the Build Options General tab. Keeping all project subfolders parallel
allows for ease of grouping intermediates, include, library and linker script files.
FIGURE 4-1: RECOMMENDED PROJECT STRUCTURE
Project>Build Options>Project, General Tab
Output Directory: C:\project
Intermediates Directory: ..\tmp
Assembler Include Path: ..\include
Include Path: ..\include
Libraries Path: ..\lib
Linker Script Path: ..\lkr
Note: You can add a file to a project, even if the file does not yet exist. This is
useful for structuring a project before you actually developed the files. Just
remember to create the files before you build the project or, obviously, the
build will fail.
Note: Make sure you use unique names for your source code, or object files will
be overwritten. E.g., file.asm is assembled producing file.o, and then
file.c is compiled producing file.o which overwrites the first file.o.
project.mcp
project.mcw
project.hex
csrc.c
asmsrc.asm
project
source1
src2.c
source2
src3.c
source3
csrc.o
tmp
asmsrc.o
src2.o
src3.o
header.h
header.inc
include
clib.lib
lib
device.lkr
lkr