public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] Is cyg_net_init necessary on application ?
@ 2007-08-22  4:45 ariga masahiro
  0 siblings, 0 replies; only message in thread
From: ariga masahiro @ 2007-08-22  4:45 UTC (permalink / raw)
  To: ecos-discuss

Hi everyone,

Please help me next problem.

My target-board uses SMSC-LAN91C111 LAN chip.

On executing RedBoot,I learned that
LAN chip initializing routine cyg_net_init() was called.
When cyg_net_init() was executed,
I checked LAN-connector's LINK-LED correctly lighted.

I checked ping executed correctly.
So far so good.

Problem occurred when I tried to run net test program
(nc_test_slave).
When I build ecos-lib I used "net" package.
I made application by linking ecos-lib and nc_test_slave,
and named test_s.

I run test_s using next commands,
RedBoot> fis load -b 0x8c010000 test_s
RedBoot> go 0x8c010000

I discovered after "go" command ,cyg_net_init() is executed again.

And I discovered that
when next parts of cyg_net_init() are executed,
LINK-LED lighted out.

cyg_net_init()'s 813-817 lines
--
// Run through dynamic initializers
for (init_entry = __NET_INIT_TAB__; init_entry != &__NET_INIT_TAB_END__; 
init_entry++) {
   log(LOG_INIT, "[%s] Init: %s(%p)\n", __FUNCTION__, init_entry->name, 
init_entry->data);
   (*init_entry->fun)(init_entry->data);
}
--

After that I cannot transmit data on Ethernet.

Now,apart from why LINK-LED lighted out on second time,

(I mostly welcom if someone know the reason.)
I am confronted with several questions.

To begin with,is it necessary to run cyg_net_init()
at executing application time by "go",
since RedBoot running time,first-time called cyg_net_init()
succeeded LAN chip initialization ?

Is there any problem passing cyg_net_init()
when running application on condition
first-time succeeded LAN initialization ?

Concerning how to pass cyg_net_init(),
I noticed static _init variable is not available
in application program boundary,so I am thinking
utilizing target board implemented LED.

But that is not smart solution,
(e.g. in case LED not available)
so I like to ask you, is there any way passing cyg_net_init(),
on application execution time.

Please enlighten me.

Masahiro Ariga


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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-08-22  4:45 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-08-22  4:45 [ECOS] Is cyg_net_init necessary on application ? ariga masahiro

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).