MPC5121 CodeWarrier relocatable output

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

MPC5121 CodeWarrier relocatable output

2,341 Views
martinw
Contributor III
Hi,


MPC5121 power pc, no OS (actually a port of an OS we wrote in-house for Coldfire)

I want to be able to read an application at boot time (from SD card) and relocate it to run at a memory address defined at run time.

My understanding of elf is that there is an option to produce a binary file that contains relocation tables etc.

Can anyone tell me if the CodeWarrier linker can produce the required elf format?

And where can I find the specification for the elf format that CodeWarrier generates?

Many thanks

Martin Wakely

Labels (1)
0 Kudos
Reply
4 Replies

683 Views
CrasyCat
Specialist III
Hello
 
This can probably be implemented using PIC code.
 
CrasyCat
0 Kudos
Reply

683 Views
martinw
Contributor III
Will you explain what you mean by PIC code please?


0 Kudos
Reply

683 Views
J2MEJediMaster
Specialist I
PIC = Position Independent Code. The branch and jump instructions use relative addresses, rather than absolute addresses. This allows the program to be loaded just about anywhere in memory. Check the Build Tools manual and the Power Architecture Targeting Maunal for PIC/PID support. Search for the string "PIC/PID" in the Acrobat files of these manuals to get started.

---Tom
0 Kudos
Reply

683 Views
martinw
Contributor III
Thanks - I'll look that up.  For one (horrible) moment I thought it might be a Microchip reference :smileywink:

Cheers
0 Kudos
Reply