[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-users] problems compiling lwIP
From: |
franz keuner |
Subject: |
[lwip-users] problems compiling lwIP |
Date: |
Thu, 16 Dec 2004 15:20:11 +0100 (MET) |
hi,
it seems that I was to optimistic after I was able to compile and link lwIP.
I flashed the created file on my board but the initialisation of lwIP wasn`t
successful.
In my main file I try:
mem_init();
printf("mem initialized.\n");
memp_init();
printf("memp initialized.\n");
pbuf_init();
printf("pbuf initialized.\n");
netif_init();ip_init(); etharp_init();udp_init(); tcp_init();
printf("lwIP initialized.\n");
But the output stopped after the memp_init command. I tried to find out
which part of the code was executed and found out that the following loop
wasn`t.
pbuf.c (line 112 et seqq)
/* Set up ->next pointers to link the pbufs of the pool together */
p = pbuf_pool;
for(i = 0; i < PBUF_POOL_SIZE; ++i) {
p->next = (struct pbuf *)((u8_t *)p + PBUF_POOL_BUFSIZE + sizeof(struct
pbuf));
p->len = p->tot_len = PBUF_POOL_BUFSIZE;
p->payload = MEM_ALIGN((void *)((u8_t *)p + sizeof(struct pbuf)));
p->flags = PBUF_FLAG_POOL;
q = p;
p = p->next;
}
The programm stops at line
p->next = (struct pbuf *)((u8_t *)p + PBUF_POOL_BUFSIZE + sizeof(struct
pbuf));
during the first loop circle.
The making and compiling process shows no warning regarding this problem.
And another question:
Can I set the MAC adress in the cs8900if.c file during cs8900if_init with
the commands?:
netif->hwaddr[0] = 0x00; etc.
Regards and thanks,
Franz
P.s.The error during compling didn`t result from the include path. I tried
an older version of my project and it still didn`t work. So probably my
lwipopts.h file was the reason.
--
NEU +++ DSL Komplett von GMX +++ http://www.gmx.net/de/go/dsl
GMX DSL-Netzanschluss + Tarif zum supergünstigen Komplett-Preis!