[ECOS] Is cyg_net_init necessary on application ?
ariga masahiro
ariga@link-lab.co.jp
Wed Aug 22 04:45:00 GMT 2007
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
More information about the Ecos-discuss
mailing list