lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-users] initialisation of lwIP


From: franz keuner
Subject: [lwip-users] initialisation of lwIP
Date: Tue, 21 Dec 2004 17:30:20 +0100 (MET)

Hello,
I tried the pbuf.c which you sended to me. But still the programme stops
during my attempt to execute pbuf_init() with the following debug message:
mem_init()
mem initialized.
memp_init();
memp initialized.
pbuf_init();
Assertion "pbuf_init: pool aligned" failed at line 106 in
c:\scr_lwip\lwip\src\core\pbuf.c

The modified pbuf.c reports the same message but continues the execution.
The complete code of the original pbuf.c is part of the modified.
 
The following function is executed in the modified pbuf.c in the function
pbuf_init() before the problem occurs:
void pbuf_statistics_init(void)
{
  int i;

  LWIP_DEBUGF( PBUF_DEBUG | 2, ("*** pbuf statistics: initializing\n") );

        pbufstats_pbuf_counter = 0;

        for(i = 0; i < MAX_PTR; i++)
        {
                pbufstats_mempointers[i].ptr   = (void*) -1;
                pbufstats_mempointers[i].flags = -1;
        }
}

used definitons:
typedef struct memptr_struct {
 void *ptr;
 int  flags;
} pbufstats_memptr;
/* maximum number of pbuf pointers we want to track   */
#define MAX_PTR 50                              
pbufstats_memptr pbufstats_mempointers[MAX_PTR];/**< allocate memory for
tracking MAX_PTR pbuf pointers */

I also tried a lot of different values for the buffer sizes but all with the
same result.

But to make it even more confusing:
I get the following results executing the programme with the modified
pbuf.c:

mem initialized.
memp initialized.
*** pbuf statistics: initializing
Assertion "pbuf_init: pool aligned" failed at line 276 in
c:\progate\scr_lwip\lwip\src\core\pbuf.c
pbuf initialized.
netif initialized.
etharp initialized.
ip initialized.
udp initialized.
tcp initialized.
TCP/IP initialized.
 (netif_add(ethif, &ipaddr, &netmask, &gw, NULL,  cs8900if_init,
ip_input);netif_set_default(ethif); //that`s the next command)

?##†¥Z¬###   Assertion "mem_malloc: !lfree->used" failed at line 294 in
c:\scr_lwip\lwip\src\core\mem.c
Assertion "mem_malloc: allocated memory not above ram_end." failed at line
298 in c:\scr_lwip\lwip\src\core\mem.c
Assertion "mem_malloc: allocated memory properly aligned." failed at line
300 in c:\scr_lwip\lwip\src\core\mem.c
     netmask  gw
(en
Start Complete.

So it seems to me that in spite of a few warnings lwip is ready.

But if I press the reset button of the board the execution of the programme
--after one "successful" attempt--  stops after the message:
Assertion "mem_malloc: allocated memory properly aligned." failed at line
300 in c:\scr_lwip\lwip\src\core\mem.c

So I don`t know what`s exactly going on...

Thanks for your help, bye
Franz











-- 
Psssst! Mit GMX Handyrechnung senken: http://www.gmx.net/de/go/mail
100 FreeSMS/Monat (GMX TopMail), 50 (GMX ProMail), 10 (GMX FreeMail)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]