This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Still on ethernet configuration


On Thu, 2002-10-10 at 17:44, Cristiano Pereira wrote:
> Hi all,
> 
> Simple question regarding ethernet initialization. I've been trying to 
> configure
> everyting using the ecos.ecc file but haven't been sucessfull. Seems like my 
> init_net function never returns.
> 
> Now I'm trying to initialize everything manually and the problem seems to 
> persist. Perhaps I'm over simplifying the problem but that's what I'm trying 
> so far (all
> the variables are of course defined and the code compiles and run):
> 
> int main(void)
> {
>     cyg_thread_create(20,                // Priority - just a number
>                       net_test,          // entry
>                       0,                 // entry parameter
>                       "Network test",    // Name
>                       &stack[0],         // Stack
>                       STACK_SIZE,        // Size
>                       &thread_handle[0], // Handle
>                       &thread_s[0]       // Thread data structure
>             );
>     cyg_thread_resume(thread_handle[0]);  // Start it
> }
> 
> void
> net_test(cyg_addrword_t p)
> {
>   struct bootp bootp_info;
> 
>   cyg_net_init();
> 
>   build_bootp_record(&bootp_info,
>     "128.195.11.220",
>     "255.255.255.0",
>     "128.195.11.255",
>     "128.195.11.1",
>     "");
> 
>   init_net("eth0", &bootp_info);
> 
>   // just loops infinitely
>   for ( ; ; ) ;
> }
> 
> 
> but never returns from the init_net function. What am I missing? Should this 
> get the ethernet interface up and working?

How do you know that it never returned?
How are your starting/debugging this code?

-- 
------------------------------------------------------------
Gary Thomas                  |
eCosCentric, Ltd.            |  
+1 (970) 229-1963            |  eCos & RedBoot experts
gthomas@ecoscentric.com      |
http://www.ecoscentric.com/  |
------------------------------------------------------------


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


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