Position-independent code for 5211/5212/5213

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Position-independent code for 5211/5212/5213

980 Views
EricT
Contributor I
Hi -

I had another thread going here a while ago about a bootloader and we had some discussion about position-independent code going.  I thought I'd start a new thread focusing on that to see if anyone has input.

I want to generate position-independent code so I can have multiple images in the flash that can run independently and not have to compile for a particular position within the flash.  To do this, I apparently have to add .picdynrel and .piddynrel sections to my LCF (I assume that I'll also need to have the position-independent data as well) and I need to define the start, end and size of the pictable and pidtable.  I can't find any information that would tell me what these values should be.

Also, according to the help, I may need to make changes to library code and recompile it.  I tried to follow the directions given, but when I try to compile the existing code even without making any changes I get far more errors than I want to try to track down.  First of all, do I actually need to make a change to the library to support the simple case of wanting the code to only use relative addressing?  If I do, what kind of changes need to be made?

Has anyone successfully used CodeWarrior to compile and use position-indepenent code?  Thanks!
Labels (1)
0 Kudos
1 Reply

325 Views
Ainslie
Contributor II
I too need to write a position-independent app for Coldfire, and have found the documentation poor and lacking. Did you have any success and what steps did you take? Thanks.
0 Kudos