This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: startup embedded target


I'm using:

LD=m68k-coff-ld
LDFLAGS=-nodefaultlibs -nostdlib
and
CC=m68k-coff-gcc
CCFLAGS=-nostartfiles

I'm also using a linker script (such as you are) so that I can tell it where
to place code & data.

--Geoff
gwyche@datum.com

-----Original Message-----
From: Vermeulen Jan [mailto:Jan.Vermeulen@siemens.atea.be]
Sent: Tuesday, July 24, 2001 9:17 AM
To: 'Giovanni Caterina'; 'CrossGCC'
Subject: RE: startup embedded target



>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

------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]