"section" and "org" capabilities of PIC linkers
CASTalk.com Forum Index CASTalk.com
Discussion of DSP, FPGA, storage and embedded system.
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web castalk.com
"section" and "org" capabilities of PIC linkers

 
Post new topic   Reply to topic    CASTalk.com Forum Index -> Embedded System
Author Message
2Penny
Guest





Posted: Sat Jan 01, 2005 4:42 am    Post subject: "section" and "org" capabilities of PIC linkers Reply with quote

Fellow CAE travelers:

I'm interested in finding out if the MPLAB linker has the
capability of using the "section" and "org" commands. I've
used "section" with a Borland x86, an HP 68000, and a
WindRiver 68000 type linker. I've used "org" only with the
HP and Windriver 68000 type linkers. I liked how they separated
out executable code from data and (with the "org" command)
place the code where I wanted it. I'm hoping someone here
has some experience with this and can tell me definitively
whether the PIC linker can do the same sort of things or not.

Now I'll just wait for input,

2Penny
Back to top
peterk
Guest





Posted: Sat Jan 01, 2005 5:15 am    Post subject: Re: "section" and "org" capabilities of PIC linkers Reply with quote

Thanks for the first laugh of 2005. Harvard architecture as used in a
PIC uses separate memory for program and data so you can't mix them.
You can still use org if you want to leave holes in your code. The
pedants might point out that there are some odd techniques for storing
data in the program memory if you really want to but you can't put
executable code in the data memory.
Peter
Back to top
Dennis
Guest





Posted: Sat Jan 01, 2005 6:10 am    Post subject: Re: "section" and "org" capabilities of PIC linkers Reply with quote

2Penny wrote:
Quote:
Fellow CAE travelers:

I'm interested in finding out if the MPLAB linker has the
capability of using the "section" and "org" commands. I've
used "section" with a Borland x86, an HP 68000, and a
WindRiver 68000 type linker. I've used "org" only with the
HP and Windriver 68000 type linkers. I liked how they separated
out executable code from data and (with the "org" command)
place the code where I wanted it. I'm hoping someone here
has some experience with this and can tell me definitively
whether the PIC linker can do the same sort of things or not.

Now I'll just wait for input,

2Penny


Since the PICs have separate code and data memory it is a bit more
complicated. You can do it with a combination of the assembler and
linker. I would suggest going to the Microchip site (www.microchip.com)
and getting the documentation for MPASM and MPLINK and reading through
them. Particularly the sections in MPASM about relocatable code and in
MPLINK about relocation processing.
Back to top
 
Post new topic   Reply to topic    CASTalk.com Forum Index -> Embedded System All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




VoIP Electronics Powered by phpBB