MPLAB 6.3 question

A

Active8

Jan 1, 1970
0
hi:

i posted this at comp.arch.embedded.piclist but there's just no activity
going on there. sorry.

i want to start using relocatable code and when i converted my org
directives to

RESTART_VECTOR CODE 0x00

or stuff like UDATA

style, i got one of those errors telling me the directive is only
available when building an object file. the help file says that i should
check the "Object File" checkbox.

i can't find the bugger anywhere. there's a map file box but that
doesn't do the job the

my build options for the project have this:

/m"$(BINDIR_)$(TARGETBASE).map" /o"$(TARGETBASE).cof"

in the linker section.

ok, i figured out how to right-click assemble the .asm file into a .o
module, but now i can't build the project because of those directives
causing an error when MPASM tries to assemble the thing.

what's the next step? do i have to use MPLINK on the command line?

thanks in advance,
mike
 
H

Howard Henry Schlunder

Jan 1, 1970
0
Using MPLINK on the command line is not necessary. Have you included the
appropriate Linking Script into your project? Linker scripts are located in
\Program Files\MPLAB IDE\MCHIP_Tools\LKR. You have to add the file under
the Project window (View menu -> Project) under the Linker Scripts group.

I normally don't play with any of the Project Build options except for the
paths under the General tab. When I start a new project, I setup all those
paths, include my linker file (I usually copy to the project directory so I
can change it if I want to), include my header file, include my source file,
and then select the appropriate device under the Configure -> Select
Device... menu.

Howard Henry Schlunder

in message
news:[email protected]...
 
A

Active8

Jan 1, 1970
0
Using MPLINK on the command line is not necessary. Have you included the
appropriate Linking Script into your project? Linker scripts are located in
\Program Files\MPLAB IDE\MCHIP_Tools\LKR. You have to add the file under
the Project window (View menu -> Project) under the Linker Scripts group.

thanks. i thought about and then forgot the script. i didn't even have
to modify it to match my labels. the build still worked (and failed when
i removed the file just to make sure.)

yay! reusable code.

brs,
mike
 
A

Anthony Fremont

Jan 1, 1970
0
Active8 said:
hi:

i posted this at comp.arch.embedded.piclist but there's just no
activity going on there. sorry.

comp.arch.embedded.piclist is not a real group. It used to receive
messages that were sent to the mailing list at www.piclist.com. This
has been stopped due to e-mail address harvesting. I suggest you sign
up for the mailing list as there is a wealth of good help available.
One poster even has a complete repository of macros, linker info and
etc. Sign up, you don't know what you're missing. BTW, it's more than
just PIC chips, though they are the primary discussion. Usually around
100 e-mails per day.

michael brown
 
Top