lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] Bare Metal / Memory Alignment


From: Jens Breuer
Subject: Re: [lwip-users] Bare Metal / Memory Alignment
Date: Thu, 8 Sep 2011 11:53:28 +0200

Hi Ake,

> My compiler hints for structure packing should however be functional for the
> compiler shipped with Keil uVision 3.x (and probably for the 4.x aswell) as
> long as there are no partially packed structs...

I ran into trouble when trying packing with "__packed". The compiler
was then claiming about nested packed structs which he dislikes. So I
dropped "__packed" in favor of the pragmas which works as expected.

However, I think that neither packing nor ETH_PAD_SIZE are in any way
related to the problems explained in my first post.

The fault resulting from the unaligned WORD access isn't really
thought-provoking to me as the reason why this happens is pretty
clear.

What really puzzles me is the problem related to fragmentation as I
don't have a clue why this happens. A simple Ping works as expected,
but a fragmented one is missing two bytes at the begining of the ICMP
header? And the fact that I can circumvent that problem by setting the
alignment to 1 just adds to my confusion.

@All: Thanks for your replies.

Kind regards
Jens



reply via email to

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