I have the source which can be compiled if the option
LWIP_MISALIGNMENT is set to 1. If anyone interested and have the same
problem, I am more than willing to share and help. If you guys want
to incorporate it to lwip as alternative solution to structure
packing I am glad I can help. This lowers the stack performance a bit
though.
Not to offend you, but personally, I see this as a bug in the compiler
you are using and we don't support broken compilers: structure packing
_is_ a must for lwIP!
Hope you are still having fun with lwIP!
Simon
Actually, no. Structure packing is not necessarily a must for lwip.
In many cases lwip should work just fine without structure packing. I
know that Texas Instruments DSP compilers will work with lwip without
structure packing.
Patches made to lwip several years ago ensured that if ETH_PAD_SIZE is
set to 2, then no variable will ever be unaligned. This solves most of
the problems which would otherwise require structure packing.
There are two things a compiler may do which will still mess up the lwip
structs:
1: Some compilers pad the size of all structs so that the size of a
struct becomes a multiple of 4.
2: Some comiplers put all structs on an address boundary of 4,
regardless of the actual boundary requirements of the members of the struct.
Compilers which does any of the above would still require packed
structs. Compilers which does neither of the above should work without
packed structs, if ETH_PAD_SIZE is set to 2.
Regards,
Timmy Brolin
_______________________________________________
lwip-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/lwip-users