lwip-users
[Top][All Lists]
Advanced

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

RE: [lwip-users] Question on structure packing


From: Mountifield, Tony
Subject: RE: [lwip-users] Question on structure packing
Date: Wed, 21 Apr 2004 10:54:26 +0100

James,

> I believe I also have a similar problem. I am currently 
> porting LWIP to
> run under RTEMS on a SH2 7145F with a CS8900 etherenet chip. During a
> call to the init function for the cs8900if, the following 
> line is called
> which causes the whole app to bomb, currently running under 
> GDB (serial)
> via a stub:
> 
> cs8900if->ethaddr = (struct eth_addr *)&(netif->hwaddr[0]);
> 
> I have tried adding the padding words as you suggested but this line
> still seems to bomb. I am pretty stuck. Does anyone have any 
> suggestion?

It appears to me that that line could only bomb if the pointer cs8900if is not 
pointing somewhere sensible. The right-hand side is not dereferencing any 
pointers, just calculating an address

Structures allocated by the code should normally be ok, as the compiler should 
generate suitable alignment. The alignment problems come when trying to overlay 
an arbitrarily-aligned protocol structure on a packet of data.

Cheers,
Tony


***********************************************************************************
This email, its content and any attachments is PRIVATE AND
CONFIDENTIAL to TANDBERG Television. If received in error please
notify the sender and destroy the original message and attachments.

www.tandbergtv.com
***********************************************************************************





reply via email to

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