RE: Re: Load an MPC555 register with address

"David Eicher" <[email protected]>
Newsgroups gmane.comp.hardware.motorola.microcontrollers
Message-ID <[email protected]>
Thanks Mch! That works fine.

 

For some reason the lis/ori doesn't work, but these addi instructions work
great. There must be some limitation on the lis/ori that I'm not aware of,
need to read the manual more.

 

I tried it with the % sign (%r1) and without it. It seems to work either
way. What is the significance of them?

 

Thanks again for your help,

 

Dave

 

 

  _____  

From: [email protected] [mailto:[email protected]] On Behalf Of
marausch01
Sent: Sunday, April 17, 2005 10:35 PM
To: [email protected]
Subject: [MPC500] Re: Load an MPC555 register with address

 


--- In [email protected], "David Eicher" <sailors3@c...> wrote:
> Hello list,
> 
> New thought on this,  I tried the following assembly code for
> the MPC555, it gave me an error that reads something like:
> 
> Error: Unsupported relocation against __SP_INIT.
> 
>             lis                     r1,__SP_INIT@ha
>             ori                     r1, r1,__SP_INIT
> 

Here is an example of working code:

# Initialize stack pointer r1 to value in linker command file
   addis %r11,%r0,__stack_base@ha
   addi  %r1,%r11,__stack_base@l

# Initialize r13 to sdata base (provided by linker)
   addis %r13,%r0,_SDA_BASE_@ha
   addi  %r13,%r13,_SDA_BASE_@l

# Initialize r2 to sdata2 base (provided by linker)
   addis %r2,%r0,_SDA2_BASE_@ha
   addi  %r2,%r2,_SDA2_BASE_@l

-- 
Mch






-----------------------------------------------------------
To learn more about Freescale Microcontrollers, please visit
http://www.freescale.com/mcu







  _____  

Yahoo! Groups Links

*	To visit your group on the web, go to:
http://groups.yahoo.com/group/MPC500/
  
*	To unsubscribe from this group, send an email to:
[email protected]
<mailto:[email protected]?subject=Unsubscribe> 
  
*	Your use of Yahoo! Groups is subject to the Yahoo!
<http://docs.yahoo.com/info/terms/>  Terms of Service. 



[Non-text portions of this message have been removed]



-----------------------------------------------------------
To learn more about Freescale Microcontrollers, please visit
http://www.freescale.com/mcu


 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/MPC500/

<*> To unsubscribe from this group, send an email to:
    [email protected]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.