EmbeddedRelated.com
Forums
Memfault Beyond the Launch

LPC2148.ld and ctr0.s files Problems

Started by ricardo_silva_marinheiro November 3, 2006
Hi everybody

I have a header board from Embedded artists, with an LPC2148,
and i've tried to compile a little experimental program to blink a
LED, with GNUARM tools and with i've faild to compile it because my
lpc2148.ld and
crt0.s files give errors on compiling. both are in the same folder as
the program files.

In a windows shell i put this:

c:\LPC>arm-elf-gcc -T lpc2148.ld -nostartfiles -s crt0.s -g blink.c
main.c -lm

is anything missing in here?

If anyone knows where can i get a functional lpc2148.ld and crt0.s
files, or a solution, possible mistakes, etc please give same help in
here.
regards
Ricardo Marinheiro

An Engineer's Guide to the LPC2100 Series

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

ricardo_silva_marinheiro wrote:
> Hi everybody
>
> I have a header board from Embedded artists, with an LPC2148,
> and i've tried to compile a little experimental program to blink a
> LED, with GNUARM tools and with i've faild to compile it because my
> lpc2148.ld and
> crt0.s files give errors on compiling. both are in the same folder as
> the program files.
> In a windows shell i put this:
>
> c:\LPC>arm-elf-gcc -T lpc2148.ld -nostartfiles -s crt0.s -g blink.c
> main.c -lm
>
> is anything missing in here?
>
> If anyone knows where can i get a functional lpc2148.ld and crt0.s
> files, or a solution, possible mistakes, etc please give same help in
> here.

What errors do you get?

Bertrik
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFSzVrETD6mlrWxPURAoQaAJ9GnnVnx1Sqj2UuvqXYeYLSwShJjACdGsYH
DGe6Kbibmy1cOKbCsT9b5Vo=Tv2S
-----END PGP SIGNATURE-----
--- In l..., Bertrik Sikken wrote:
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> ricardo_silva_marinheiro wrote:
> >
> >
> > Hi everybody
> >
> > I have a header board from Embedded artists, with an LPC2148,
> > and i've tried to compile a little experimental program to blink a
> > LED, with GNUARM tools and with i've faild to compile it because my
> > lpc2148.ld and
> > crt0.s files give errors on compiling. both are in the same folder as
> > the program files.
> >
> >
> > In a windows shell i put this:
> >
> > c:\LPC>arm-elf-gcc -T lpc2148.ld -nostartfiles -s crt0.s -g blink.c
> > main.c -lm
> >
> > is anything missing in here?
> >
> > If anyone knows where can i get a functional lpc2148.ld and crt0.s
> > files, or a solution, possible mistakes, etc please give same help in
> > here.
>
> What errors do you get?
>
> Bertrik
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.2 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iD8DBQFFSzVrETD6mlrWxPURAoQaAJ9GnnVnx1Sqj2UuvqXYeYLSwShJjACdGsYH
> DGe6Kbibmy1cOKbCsT9b5Vo> =Tv2S
> -----END PGP SIGNATURE-----
>

some of the errors, because they are many, are:

c:\LPC> crt0.s:138:undifined reference to '__bss_beg__'
c:\LPC> crt0.s:138:undifined reference to '__data_beg__'
c:\LPC> crt0.s:138:undifined reference to '__data_beg_src__'
...
c:\LPC> \DOCUM~1\...\DEFEN~1\Temp/ccMxaaaa.o:c:\LPC/crt0.s:166:
undifined reference to 'undifined_instruction_exception'
c:\LPC> \DOCUM~1\...\DEFEN~1\Temp/ccMxaaaa.o:c:\LPC/crt0.s:166:
undifined reference to 'software_interrupt_exception'
....

this both kind of errors.

thanks :)
I don't know that the files you are using were intended to be used
with plain GNU C. That is, I don't know where them came from and for
which tool chain they are intended. I am also suspicious of the
command line but I have never tried the -nostartfiles option.

To get started with the LPC2106 and the LPC2148, James Lynch has
written an excellent tutorial. I followed the yellow brick road when
I intalled the tools under WinXP and everything worked out perfectly.
See
http://www.olimex.com/dev/pdf/ARM%20Cross%20Development%20with%20Eclipse%20version%203.pdf

Since then I have migrated to Linux using exactly the same tool chain
and essentially following the same installation instructions.

It would also seem to me that you need a 'makefile' that defines all
of the compile options. Once you have a decent makefile, you can use
it for other projects with minimal changes.

Try the tutorial, I think it will be a great help.

Richard
--- In l..., "rtstofer" wrote:
>
> I don't know that the files you are using were intended to be used
> with plain GNU C. That is, I don't know where them came from and for
> which tool chain they are intended. I am also suspicious of the
> command line but I have never tried the -nostartfiles option.
>
> To get started with the LPC2106 and the LPC2148, James Lynch has
> written an excellent tutorial. I followed the yellow brick road when
> I intalled the tools under WinXP and everything worked out perfectly.
> See
>
http://www.olimex.com/dev/pdf/ARM%20Cross%20Development%20with%20Eclipse%20version%203.pdf
>
> Since then I have migrated to Linux using exactly the same tool chain
> and essentially following the same installation instructions.
>
> It would also seem to me that you need a 'makefile' that defines all
> of the compile options. Once you have a decent makefile, you can use
> it for other projects with minimal changes.
>
> Try the tutorial, I think it will be a great help.
>
> Richard
>

THANKS Richard =) i'll try it and see if it really works. till now
only keil's demo software workout with this.
> I have a header board from Embedded artists, with an LPC2148,
> and i've tried to compile a little experimental program to blink a
> LED, with GNUARM tools and with i've faild to compile it because my
> lpc2148.ld and
> crt0.s files give errors on compiling. both are in the same folder as
> the program files.

Get
http://gandalf.arubi.uni-kl.de/avr_projects/arm_projects/#lpc_example_gnu

It has lots of example for LPC213X/4X for gcc.

Warm Regards,
Mukund Deshmukh,
Beta Computronics Pvt Ltd,
10/1 IT Park, Nagpur.
Cell 9422113746

Memfault Beyond the Launch