lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] initialisation of lwIP


From: Leon Woestenberg
Subject: Re: [lwip-users] initialisation of lwIP
Date: Tue, 21 Dec 2004 18:14:55 +0100
User-agent: Mozilla Thunderbird 0.7.1 (Windows/20040626)

Hello Franz,

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:

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

All assertions/warnings seem to tell you that you have memory alignment issues.

Please check that your lwipopts.h (options) override the default options (opts.h).

By default, the memory alignment is 1-byte granularity.
#define MEM_ALIGNMENT                   1

For your processor this should probably be 2. Did you already check this?

/* MEM_ALIGNMENT: should be set to the alignment of the CPU for which
  lwIP is compiled. 4 byte alignment -> define MEM_ALIGNMENT to 4, 2
  byte alignment -> define MEM_ALIGNMENT to 2. */

#ifndef MEM_ALIGNMENT
#define MEM_ALIGNMENT                   1
#endif

Regards,

Leon Woestenberg.





reply via email to

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