>-----Original Message----- >From: Jinx [mailto:joecolquitt@CLEAR.NET.NZ] >Sent: 19 April 2004 13:07 >To: PICLIST@MITVMA.MIT.EDU >Subject: Re: [PIC:] Moving around in MPLAB > > >Thanks Alan and Jon re: linker > >I've never written a program that way. I've seen the threads >about the linker but, not being familiar with it, tended to go >a little glassy-eyed. Those threads should still be in my >folder. This current project is quite close to finishing so >I'll leave it alone, but I'll be looking into the linker >tutorials for next time > >Tell me - if a program is written in a modular style, can you >selectively write a particular module's assembly to the chip ? > >IOW, when the modules are compiled, do they always compile >into a single .hex file ? Usually under Programmer/Settings >I'd enter the Start and End address for the whole .hex file >that is produced from a single .asm file. If only a small >piece of the code, eg a single number or data value, is >changed, to re- program just that value in the chip you'd need >to find it in program memory and set the Start/End addresses >accordingly. Does each module in the linker style of >programming have its own Start/End addresses ? > >(BTW, to program an 18F452 you need to "Erase Flash Device" >first, which might screw things up) You end up with just one hex file. Each module is assembled into an object file, and once all modules have been assembled, all the object files are linked together to produce the final hex file. The beauty of this approach is code reuse, you can put all your favorite functions into separate modules and just link them into you project as and when you need them. It also make maintaining the code much easier, as you are dealing with several small files rather that one massive one. Regards Mike ======================================================================= This e-mail is intended for the person it is addressed to only. The information contained in it may be confidential and/or protected by law. If you are not the intended recipient of this message, you must not make any use of this information, or copy or show it to any person. Please contact us immediately to tell us that you have received this e-mail, and return the original to us. Any use, forwarding, printing or copying of this message is strictly prohibited. No part of this message can be considered a request for goods or services. ======================================================================= Any questions about Bookham's E-Mail service should be directed to postmaster@bookham.com. -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body