Re: Load an MPC555 register with address

"marausch01" <[email protected]>
Newsgroups gmane.comp.hardware.motorola.microcontrollers
Message-ID <[email protected]>

--- 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]

<*> 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.