startup embedded target
Vermeulen Jan
Jan.Vermeulen@siemens.atea.be
Tue Jul 24 23:28:00 GMT 2001
Bill, Geoff,
>I think that in addition to --nostartfiles, you also want --nodefaultlibs.
>LD=m68k-coff-ld
>LDFLAGS=-nodefaultlibs -nostdlib
>and
>CC=m68k-coff-gcc
>CCFLAGS=-nostartfiles
Thanks for the suggestions, I tried it but at 0x0 there are still things
that i do not want.
At 0x0 should be 0x0B40000, at 0x4 should be the adress of main (=0x400) and
at 0x400 should be main followed by the WritePortB routine.
Let me include my commandline and some extra information:
I hope that you can see where i go wrong. (I guess the collect2 does
something evil :)
[(08:07:36) jan@pco449 ~]$ cd ledtest/ledtest
[(08:07:46) jan@pco449 ~/ledtest/ledtest]$ m68k-coff-gcc -v -m68040 -g -O2
-nostartfiles -fverbose-asm -fpack-struct -Wall -Wl,-Tauc.ld
-Wl,-nodefaultlibs -Wl,-nostdlib -save-temps -o boot.ieee main.c
Reading specs from /usr/local/lib/gcc-lib/m68k-coff/2.95.3/specs
gcc version 2.95.3 20010315 (release)
/usr/local/lib/gcc-lib/m68k-coff/2.95.3/cpp0 -lang-c -v -D__GNUC__=2
-D__GNUC_MINOR__=95 -Dmc68000 -D__embedded__ -D__mc68000__ -D__embedded__
-D__mc68000 -Asystem(embedded) -Amachine(mc68000) -D__OPTIMIZE__ -g -Wall
-D__HAVE_68881__ -Dmc68040 -D__mc68040__ -D__mc68040 main.c main.i
GNU CPP version 2.95.3 20010315 (release) (68k, Motorola syntax)
#include "..." search starts here:
#include <...> search starts here:
/usr/local/lib/gcc-lib/m68k-coff/2.95.3/include
/usr/local/lib/gcc-lib/m68k-coff/2.95.3/../../../../m68k-coff/include
End of search list.
The following default directories have been omitted from the search path:
/usr/local/lib/gcc-lib/m68k-coff/2.95.3/../../../../include/g++-3
/usr/local/lib/gcc-lib/m68k-coff/2.95.3/../../../../m68k-coff/sys-include
End of omitted list.
/usr/local/lib/gcc-lib/m68k-coff/2.95.3/cc1 main.i -quiet -dumpbase main.c
-m68040 -g -O2 -Wall -version -fverbose-asm -fpack-struct -o main.s
GNU C version 2.95.3 20010315 (release) (m68k-coff) compiled by GNU C
version 2.96 20000731 (Linux-Mandrake 8.0 2.96-0.48mdk).
/usr/local/m68k-coff/bin/as -m68040 -o main.o main.s
/usr/local/lib/gcc-lib/m68k-coff/2.95.3/collect2 -m m68kcoff -T
/usr/local/m68k-coff/lib/bcc.ld -o boot.ieee
-L/usr/local/lib/gcc-lib/m68k-coff/2.95.3 -L/usr/local/m68k-coff/lib
-Tauc.ld -nodefaultlibs -nostdlib main.o -lgcc -lc -lbcc -lc -lgcc
[(08:09:48) jan@pco449 ~/ledtest/ledtest]$ m68k-coff-gdb boot.ieee
PS: m68k-coff-gdb = Insight 5.0
Kind regards,
Jan
On Tue, Jul 24, 2001 at 04:17:26PM +0200, Vermeulen Jan wrote:
>
> >Try the following :
> >
> > SECTIONS {
> > .vector0 :
> > {
> > LONG( __stack )
> > } > rom1
> > .vector1 :
> > {
> > LONG( ABSOLUTE( main ) ) /* or _main depending on the compiler */
> > } > rom1
> >.....
> >
> >Since these are the 2 first sections that go into rom1, the value for
stack
> >will be int the 4 first bytes and the value for main will be int the 4
next
> >ones.
> >
> >Giovanni Caterina
>
> Thanks for the wonderful suggestions, but unfortunatly it does not work.
:'(
> At 0x0 is the code with label 'startup'. Probably something that is in the
> startupcode.
> (I assume that it is in crt.0)
>
> I tried with "-nostartfiles" but it is the same thing. At 0x0, there is
code
> for some kind of routine that is not in my "main.c" file (only main and
> WritePortB to write the LED code).
>
> I only want my m68k-coff-gcc to compile those 2 routines : main() and
> WritePortB(unsigned char c) and nothing else.
>
> How can I find the error I made and how do I proceed ?
> Thanks,
> Jan
>
> ------
> Want more information? See the CrossGCC FAQ,
http://www.objsw.com/CrossGCC/
> Want to unsubscribe? Send a note to
crossgcc-unsubscribe@sourceware.cygnus.com
>
--
Bill Gatliff
bgat@billgatliff.com
------
Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com
More information about the crossgcc
mailing list