public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
From: "Tianjun-zdk" <Tianjun@zcom.unimis.com>
To: "Andrew Lunn" <andrew@lunn.ch>
Cc: "ecos-discuss@sources.redhat.com" <ecos-discuss@sources.redhat.com>
Subject: Re: Re: Re: [ECOS] how to build a driver to a single library
Date: Tue, 19 Jul 2005 07:30:00 -0000	[thread overview]
Message-ID: <NETWEB05z5Z0TPXj7dM0000d402@netweb05.net.unimis> (raw)

Hi, Andrew Lunn

I have do that following your advice.
but it seems the driver is nerver be loaded to run.

i do these in my ethernet driver:

	NETDEVTAB_ENTRY (if_dtest_netdev,
		 "if_dtest",
 		if_dtest_init,
 		&if_dtest_sc);

	extern cyg_netdevtab_entry_t *if_dtest_netdev_ex = &if_dtest_netdev;

and linked as:

	i386-elf-gcc -nostartfiles -L..../ecos_install/lib -Llibdtest.a -Ttarget.ld -g -
nostdlib -Wl,--gc-sections -Wl,-static -o app app.o

should a modify something in the file target.ld?

what's the trouble?


Sincerely yours,
Tian-Jun

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 > On Tue, Jul 19, 2005 at 09:01:28AM +0800, Tianjun - zdk wrote:
> >  Hi,Andrew 
> >  
> >    so i should not to linked the library to extras.o?
> >  and just to generate a libarery mylib.a use my favourite name?
> >  and then use this command to link it in my Application
> >  
> >   compile  -lmylib mylib.a application.c
> >  
> >    can this working?
> 
> There is no need to link your library to extras.o. Just link your
> application with the library as normal, eg something like
> 
>     arm-elf-gcc -o foobar application.o -lmylib -nostartfiles  -Ttarget.ld
> 
>         Andrew


-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

             reply	other threads:[~2005-07-19  7:30 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-19  7:30 Tianjun-zdk [this message]
2005-07-19  9:56 ` Andrew Lunn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=NETWEB05z5Z0TPXj7dM0000d402@netweb05.net.unimis \
    --to=tianjun@zcom.unimis.com \
    --cc=andrew@lunn.ch \
    --cc=ecos-discuss@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).