lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] LwIP and IAR Workbench


From: Jonathan Larmour
Subject: Re: [lwip-users] LwIP and IAR Workbench
Date: Tue, 19 Aug 2008 18:47:06 +0100
User-agent: Mozilla Thunderbird 1.0.8-1.1.fc3.4.legacy (X11/20060515)

FreeRTOS.org Info wrote:
Everywhere there is a macro that aligns a struct you have to add in:

#pragma data_alignment=4

Everywhere there is a macro that packs a struct you have to add in:

#pragma pack(1)

Because they use a # you cannot simply define the macro PACK_STRUCT_STRUCT
to do this for you.

This is why lwIP also provides PACK_STRUCT_USE_INCLUDES and provide two files: arch/bpstruct.h and arch/epstruct.h (begin packed struct and end packed struct).

You can then put the #pragma pack(1) in bpstruct.h and #pragma data_alignment=4 in epstruct.h.

Jifl
--
eCosCentric Limited      http://www.eCosCentric.com/     The eCos experts
Barnwell House, Barnwell Drive, Cambridge, UK.       Tel: +44 1223 245571
Registered in England and Wales: Reg No 4422071.
------["The best things in life aren't things."]------      Opinions==mine




reply via email to

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