RE: Using libraries with GNU C for MPC555

"Dan Fowell" <[email protected]>
Newsgroups gmane.comp.hardware.motorola.microcontrollers
Message-ID <000001c58889$6685d0b0$ae0a010a@RED>
I don't use stdio or printf, but I do link in a library called libc.a (which
has sprintf, atoi, and many others).  My link command looks as follows:
powerpc-elf-ld.exe -g -t --verbose -Trom.lnk -o main.elf startup.o serial.o
main.o hdw.o -L../lib -lc

It's been a few years, but I think the -L tells it to link in the libraries,
I specify the location of the library "../lib" and then I specify which
library "-lc" which tells it to link in the c library (there is a libm.a and
a libg.a as well).  So from where I compile, my libc.a file is back a
directory and then in a "lib" folder I created.
Hope that helps.

Dan


-----Original Message-----
From: [email protected] [mailto:[email protected]]On Behalf Of
David Eicher
Sent: Thursday, July 14, 2005 8:08 AM
To: [email protected]
Subject: [MPC500] Using libraries with GNU C for MPC555


Hello,



Does anyone have any experience with the linker in the subject environment?
I am having trouble getting ld to find the libraries GNU C is suppose to be
using for Stdio. I can't figure out how to set the path so the linker will
find the library, and I haven't been able to figure out what the name of the
library is that I need to resolve a reference to printf( ).



Thanks for any insight you might be able to offer.



Dave





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