Searching \ for '[PIC]: Relocatable code' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/microchip/devices.htm?key=pic
Search entire site for: 'Relocatable code'.

Exact match. Not showing close matches.
PICList Thread
'[PIC]: Relocatable code'
2002\08\14@130713 by Brendan Moran

flavicon
face
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Are there any good tutorials on writing relocatable code around?  I
had a look on http://www.piclist.com, but didn't find any.

- --Brendan

-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 6.5.8 for non-commercial use <http://www.pgp.com>

iQA/AwUBPVqOEAVk8xtQuK+BEQK68QCg5JaONxsQ1v4pLUQ6Seb8IS9WfUoAnRU0
mAeJwTArCtfEd0DJtwSz057m
=0tMM
-----END PGP SIGNATURE-----

--
http://www.piclist.com hint: To leave the PICList
spam_OUTpiclist-unsubscribe-requestTakeThisOuTspammitvma.mit.edu


2002\08\14@132357 by Olin Lathrop

face picon face
> Are there any good tutorials on writing relocatable code around?  I
> had a look on http://www.piclist.com, but didn't find any.

I don't have any tutorial, but lots of code template and examples at
http://www.embedinc.com/pic.


*****************************************************************
Embed Inc, embedded system specialists in Littleton Massachusetts
(978) 742-9014, http://www.embedinc.com

--
http://www.piclist.com hint: To leave the PICList
.....piclist-unsubscribe-requestKILLspamspam@spam@mitvma.mit.edu


2002\08\15@042505 by Vasile Surducan

flavicon
face
On Wed, 14 Aug 2002, Olin Lathrop wrote:

> > Are there any good tutorials on writing relocatable code around?  I
> > had a look on http://www.piclist.com, but didn't find any.
>
> I don't have any tutorial, but lots of code template and examples at
> http://www.embedinc.com/pic.

 Pretty bad Olin. Such a great specialist like you are, may waste 8 hours
from one weekend to write a trully tutorial. Or at least to document better the
examples you have there...

best regards,
Vasile

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2002\08\15@043912 by Kieren Johnstone

picon face
I think that's pretty rude of you actually, anyone who takes their time to
write code for the PIC community, share their source, or even make a helpful
post on PIClist has my vote - it's what it's all about.  Critisising
someone, saying they should do (/should have done) more is a bit nasty
really..

-Kieren

{Original Message removed}

2002\08\15@045208 by Vasile Surducan

flavicon
face
I'm very sorry about this way of understanding my message. It wasn't at
all a criticism but a way of recognize someone's exceptional work and a
sugestion for improving the way in which is presented.
Ok, maybe I'm wrong.

regards,
Vasile


On Thu, 15 Aug 2002, Kieren Johnstone wrote:

> I think that's pretty rude of you actually, anyone who takes their time to
> write code for the PIC community, share their source, or even make a helpful
> post on PIClist has my vote - it's what it's all about.  Critisising
> someone, saying they should do (/should have done) more is a bit nasty
> really..
>
> -Kieren
>
> {Original Message removed}

2002\08\15@050247 by Sean Alcorn (SYD)

flavicon
face
> I'm very sorry about this way of understanding my message. It wasn't at
> all a criticism but a way of recognize someone's exceptional work and a
> sugestion for improving the way in which is presented.
> Ok, maybe I'm wrong.

I have to agree with Kieren, it did come across as quite rude. Olin has
published material for people to use. It does not matter how it is
presented. The expression "beggars can't be choosers" comes to mind.

Maybe you have a good relationship with Olin, Vasile - I'm not sure. Your
explanation that it was meant to be a bit of  a joke is fine - but that's
not how your post read. Probably just the language barrier.

Regards,

Sean

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2002\08\15@050505 by Bond, Peter

flavicon
face
> I'm very sorry about this way of understanding my message.

I think this probably boils down to English not being a first language
again.  Combine that with the lack of context in email, and you have all
sorts of problems that can arise.

Peter
This email, its content and any attachments is PRIVATE AND CONFIDENTIAL to
TANDBERG Television. If received in error please notify the sender and
destroy the original message and attachments.

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2002\08\15@051610 by Michael Rigby-Jones

flavicon
face
{Quote hidden}

Peronsaly I read it as a joke.  Olin opinions on code readability and
commenting are legendary on the piclist, I thought Vasile was simply making
a good natured jibe highlighting this.

Regards

Mike

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2002\08\15@052222 by Vasile Surducan

flavicon
face
To be well understood: I have a great respect for all people from this
list which are making efforts to keep the list at high standards.
( even to respond at question like: how to connect an ammeter into the
circuit ? )
And Olin is one of them. I'm trying to do the same with the jallist
( as much my ideeas and my ( language & technicall ) acknowledges are
allowing me )
It seems we have different ideeas about democracy and what does it means.
I'll never be angry on someone who will criticize me if he/she had right.

Sorry for bothering you with my point of wiev.
It will not be happening anymore for sure !

best regards and success with pic-ing,
Vasile



On Thu, 15 Aug 2002, Bond, Peter wrote:

{Quote hidden}

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2002\08\15@061834 by Mike Singer

picon face
Vasile,

templates and examples are better then tutorial.
If someone has some experience he'll grasp the idea
quickly without wasting time for reading trivial
thoughts.
If someone hasn't any experience a tutorial on separate
advanced topic wouldn't be of any help for him,
I think. He at first should get a book on programming
basics or better take appropriate courses at educational
institutions.
Lack of documenting - for whom how; rather subjective
thing. Anyway, what do you want for free?

Mike.

Kieren Johnstone wrote:
>  I think that's pretty rude of you actually, anyone
> who takes their time to write code for the PIC
> community, share their source, or even make a helpful
> post on PIClist has my vote - it's what it's all about.
>  Critisising someone, saying they should do
> (/should have done) more is a bit nasty really..

Olin Lathrop wrote:
.
>>> I don't have any tutorial, but lots of code template
>>> and examples at http://www.embedinc.com/pic.

Vasile wrote:
>>   Pretty bad Olin. Such a great specialist like you
>> are, may waste 8 hours from one weekend to write a
>> trully tutorial. Or at least to document better the
>> examples you have there...

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2002\08\15@065442 by Mike Singer

picon face
Bond, Peter wrote:

> Vasile Surducan wrote:
> > I'm very sorry about this way of understanding my message.
>
> I think this probably boils down to English not being a first
> language again. Combine that with the lack of context in email,
> and you have all sorts of problems that can arise.

Olin Lathrop wrote some days ago:

> Also, I don't think broken English is the barrier you make it
> out to be. For example see posts from Vasily.  He obviously
> struggles with English, but in the end you can usually get the
> general idea of what he is trying to say. He also comes across
> quite clearly as a nice guy who is trying to help rather than
> an arrogant ingrate who wants someone else to do all the work
> for him.

Personally, I see Vasile's posting as a joke.

Mike.

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2002\08\15@070328 by Dmitriy A. Kiryashov

picon face
Good joke Vasile ;)))

WBR Dmitry.


Vasile Surducan wrote:
{Quote hidden}

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2002\08\15@072247 by Alan B. Pearce

face picon face
>>> I don't have any tutorial, but lots of code template and examples at
>>> http://www.embedinc.com/pic.
>>
>>   Pretty bad Olin. Such a great specialist like you are, may waste 8
hours
>> from one weekend to write a trully tutorial. Or at least to document
>> better the examples you have there...

Well actually the HAL project available through the same pages makes a
pretty good tutorial. The odd queries I had I looked through the HAL files
for an example, and found out what I needed.

It is surprising just how many different aspects of the PIC the HAL project
uses. About the only things missing from it are serial and I2C/SPI
interfacing, and the serial is now covered by a module supplied by Olin. I
did not have any real problem leaping into relocatable PIC code using these.

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2002\08\15@073925 by Alan B. Pearce

face picon face
>Are there any good tutorials on writing relocatable code around?  I
>had a look on http://www.piclist.com, but didn't find any.

Just get the application example from Olin's website, and go for it. There
really is minimal difference between coding for relocatable code, and coding
for absolute addresses.

The major difference is using the "res" statement for ram addresses.

The other nice thing about Olin's development environment is that he has a
number of nice macros to take care of the bank and page switching
requirements for the PIC. These greatly simplify getting rid of this as a
hassle, but don't stop you making silly mistakes :))

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2002\08\15@083849 by Olin Lathrop

face picon face
> > I don't have any tutorial, but lots of code template and examples at
> > http://www.embedinc.com/pic.
>
>   Pretty bad Olin. Such a great specialist like you are, may waste 8 hours
> from one weekend to write a trully tutorial. Or at least to document
better the
> examples you have there...

I have other things I'd rather do than write a linker tutorial.  Unless of
course you want to pay me $110/hour, in which case I'd be happy to write
one.  I learned the linker by reading the manual.  It's not that hard and
not that long.  I don't see much point in a document that just repeats what
Microchip says.  I wouldn't have much to add.

However, I do want my examples to be well documented.  It's not the
documentation's job to teach you about PICs, but it should describe what the
examples are doing assuming you already know about PICs and my development
environment in general.  I thought that I did document the code reasonably
well, in my opinion far better than other code I've seen cross the PIClist.
General statements like "pretty bad" and that it should be "documented
better" aren't very useful and I think quite unfair (I don't HAVE to provide
any information for free).  What specifically do you find "pretty bad"?
What documentation exactly is missing from which file?


*****************************************************************
Embed Inc, embedded system specialists in Littleton Massachusetts
(978) 742-9014, http://www.embedinc.com

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2002\08\15@172748 by Dave Dilatush

picon face
Brendan wrote...

>Are there any good tutorials on writing relocatable code around?  I
>had a look on http://www.piclist.com, but didn't find any.

I won't claim that this rises to the level of a "tutorial", but
I've put up a small linker project at

http://mywebpages.comcast.net/dilatush/lnkrdemo.zip

which at least touches on some of the rudiments of doing
relocatable code in MPLAB.  (It's actually a project I fiddled
with while I was starting to learn MPLINK- a task still very much
in progress- with a lot of comments added for clarity.)

To use it, create a project directory and unzip lnkrdemo.zip into
it; then edit the lnkrdemo.pjt file with a text editor to correct
the pathnames in the [windows] and [mru-list] fields so they
reflect the right paths on your machine; then open the project in
MPLAB and MAKE it.

It's a very brain-dead program, but it goes through the mechanics
of declaring RAM and ROM sections and assigning variables/code to
them as well as making inter-module calls.

I'm just beginning to learn to use the linker, and the biggest
advantage I can see at this point is that it'll allow me to
escape the "namespace clutter" I always seem to get with absolute
code, where every gosh-darn symbol is global in scope.  Sweet!

Hope this helps a bit...

Dave D.

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2002\08\15@180139 by Olin Lathrop

face picon face
> I won't claim that this rises to the level of a "tutorial", but
> I've put up a small linker project at
>
> http://mywebpages.comcast.net/dilatush/lnkrdemo.zip

That a lot closer to a tutorial than anything I have.

I looked at your stuff and have a few comments:

1  -  The linker control file creates a separate section for the first 256
program memory locations, which include the reset and interrupt vectors.  I
don't see any point to this and there is a down side.  You can force the
reset and interrupt code to their specific addresses by supply a value after
the CODE directive as you did.  That will cause the interrupt code to get
loaded starting at location 4.  The separate section will only cause
additional fragmentation of program memory, and will cause linker failure if
the interrupt routine grows past 252 locations.

2  -  Each of your modules includes the Microchip file for the target
processor separately.  I strongly recommend having one master project
include file that does this once.  Among other things, it will make it
easier to reuse code between project and move one project between
processors.  I actually use two include files per project, details at
http://www.embedinc.com/pic.


*****************************************************************
Embed Inc, embedded system specialists in Littleton Massachusetts
(978) 742-9014, http://www.embedinc.com

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2002\08\15@184754 by Dave Dilatush

picon face
Olin wrote...

>That a lot closer to a tutorial than anything I have.

Thanks.  But your stuff is a PROJECT, while mine is just a
"project".  :)

{Quote hidden}

Good point; the extra section I created is superfluous, the
result of some earlier fooling around I did.

>2  -  Each of your modules includes the Microchip file for the target
>processor separately.  I strongly recommend having one master project
>include file that does this once.  Among other things, it will make it
>easier to reuse code between project and move one project between
>processors.  I actually use two include files per project, details at
>http://www.embedinc.com/pic.

Good point, I didn't think of that.  I've made a revision, at

http://mywebpages.comcast.net/dilatush/lnkdemo2.zip

in which a single file, mydecls.inc, is #included by each .asm
source file in the project; this file, in turn, #includes the
Microchip target processor definitions file.  And my own global
definitions, I assume, would also go into mydecls.inc.

Am I heading in the right direction?

Thanks for the comments,

Dave D.

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2002\08\15@215651 by Olin Lathrop

face picon face
> in which a single file, mydecls.inc, is #included by each .asm
> source file in the project; this file, in turn, #includes the
> Microchip target processor definitions file.  And my own global
> definitions, I assume, would also go into mydecls.inc.
>
> Am I heading in the right direction?

I think so.  You could use my templates if you want to take a jump in the
direction I think is right ;-)  (Other opinions may vary)


*****************************************************************
Embed Inc, embedded system specialists in Littleton Massachusetts
(978) 742-9014, http://www.embedinc.com

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2002\08\16@041022 by Michael Rigby-Jones

flavicon
face
{Quote hidden}

Peronsaly I read it as a joke.  Olin opinions on code readability and
commenting are legendary on the piclist, I thought Vasile was simply making
a good natured jibe highlighting this.

Regards

Mike

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


More... (looser matching)
- Last day of these posts
- In 2002 , 2003 only
- Today
- New search...