Re: MPLAB IDE 6.53
From: Ed (ed_at_NOSPAMmicra.org.uk)
Date: 07/02/04
- Next message: John Fields: "Re: Can anybody suggest any good tool used to estimate power consumption for memory?"
- Previous message: Don Pearce: "Re: square wave amplifier."
- In reply to: Tim Wescott: "Re: MPLAB IDE 6.53"
- Next in thread: Activ8: "Re: MPLAB IDE 6.53"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 02 Jul 2004 23:58:35 GMT
Tim Wescott wrote:
> Ed wrote:
>
>> Hi all,
>> Please excuse me if this seems a daft question, but I am writing a
>> program in ASM using MPLAB. That is going fine, I have no probs here,
>> but what I would like to know is (and I'm not that experienced in this
>> kind of thing) is there a way I can simply break my subroutines into
>> smaller seperate files and call them on request, or something away
>> from the main program, since its getting pretty big and it could make
>> things alot neater to have various completed objects to the program
>> seperate from the core of it.
>>
>> Any pointers or advice would be great :)
>>
>> Thanks,
>>
>> Ed
>>
> According to Microchip, the MPLAB 6.6 includes a linker. Assuming that
> it's there on 6.53 you want to assemble and link separately.
>
> Usually your assembly files will be run through the linker to produce
> object files. An object file is a strange intermediate step where the
> assembly (or C code) has been turned into machine language, but which
> can still have a few locations defined by name instead of number. Then
> you run the batch of assembly files through the linker, which looks for
> all of the names that you've asked for, and links it all up into an
> executable file. MPLAB probably links directly to a hex file, but it may
> go through a "loader" as well.
>
> You need to tell the assembler what you're planning with assembler
> directives. There will be something like ".export" to tell the
> assembler that you want to make a symbol available, and ".import" to
> tell the assembler to assume that a symbol is available at link time.
> Every assembler has a different syntax, so you'll have to look in your
> documentation to see what you have to do.
>
> Expect to dink with this a bit -- I'm a paid professional, and whenever
> I use a new toolchain I always have to mess with it some before I get
> all my i's dotted and t's crossed just exactly the way the tools want
> them to be. A batch file to invoke the assembler and linker is helpful,
> when you get frustrated with everything assembling every time you build
> you'll want to learn how to use make, but do that on another day.
>
Hi Tim,
Thanks for the quick reply, I'm having a look at it now. Ive never gone
this far with mplab before, and so its as much learning the program as
finding if what I want to do is possible!
It looks like I have to use an intergrated application called MPLINK to
do this. It seems to be the program that handles all the external files.
I think what I shall do is make a backup of all I have done now (which I
should have by now done anyway) and cut a subroutiene out and try making
this work as a seperate linker file. This should be Fun...! I dont yet
know how this will work :)
Ed
- Next message: John Fields: "Re: Can anybody suggest any good tool used to estimate power consumption for memory?"
- Previous message: Don Pearce: "Re: square wave amplifier."
- In reply to: Tim Wescott: "Re: MPLAB IDE 6.53"
- Next in thread: Activ8: "Re: MPLAB IDE 6.53"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|