Andreas told me about the "newlib-lpc" and i have tried to write a
Tutorial.
So i have Compiled the newlib-lpc and wanted to create my own
prject-environment including a sample-Makefile.
Everything went very fine. I could build my own "Hello, World!" with
the
first time I called this Makefile.
This "Hello, World!" should use the first UART, and print - uhm, i
think you
can guess what :-)
But then, as I had downloaded the intel-hex-file to my LPC2106, nothing
seemed to happen.
I was wondering because all the samples delivered with newlib-lpc ran very
nice. So I copied my source file into the newlib-source-directory and added
it to the Makefile (example.mak, I think) like all the other example
sources.
Now my "Hello, World!" appeared after downloading to the
processor...
So I did some thoughts about the things that happen in this example
Makefile. I found out, that everyone of these testX examples is linked
directly to the objectfiles of the lib. I tried to link again these
objectfiles, too, in my Makefile and I was wondering that the resulting
hexfile ran this time!
Up to now, I have not been able to resolve the Problem...but I found out,
that if I link the file _write_r.o directly, my "Hello, World!"
string
appears on the serial port.
So, there is at least one problem with this objectfile.
I don't know if this is precise enough to solve our problem.
If you would need more information, I could give you access to my sample
project at
http://wiki.mikrocontroller.net/upload/f/f4/LPC2106-gcc-Demo_2.zip
Thanks in advance,
Patrick Dohmen...
"Robert Adsett" <> schrieb im Newsbeitrag
news:.
> At 09:48 AM 4/6/04 +0000, you wrote:
> >linking directly to the object files of newlib-lpc (as it is done in
the
> >example.mak) works perfectly, but linking to libnewlib-lpc.a
doesn't
> >(the elf file size differs by a few bytes and the program does not
run
> >correctly).
> >
> >My linker command line:
> >arm-elf-ld -o myexample.elf crt0.o myexample.o -lnewlib-lpc
-Tlpc210x.ld
>
> Might be link order. I added the following to my load file when I
started
> using the library.
>
> /* Libraries to link against.
*/
> INPUT( -lc -lnewlib-lpc -lc -lgcc )
> Try having ld dump a map file for the two links and compare, that should
> narrow down the possibilities as well.
>
> Robert
>
> " 'Freedom' has no meaning of itself. There are always
restrictions,
> be they legal, genetic, or physical. If you don't believe me, try
to
> chew a radio signal. "
>
> Kelvin Throop, III
|