lwip-users
[Top][All Lists]
Advanced

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

[lwip-users] alignment problems


From: Bartlomiej Wicher
Subject: [lwip-users] alignment problems
Date: Thu, 08 Nov 2007 11:29:20 +0100
User-agent: Opera Mail/9.24 (Win32)

Hello

I am a newbie in LWIP and it's my first post to this list. I'm trying to use LWIP with Freescale DSP568366. I have some problems with value of MEM_ALIGNMENT. Normally microprocessor are 8-bit addressable, but the DSP568366 is word-addressable (16-bits). It means that each address of memory stores dwo bytes. Moreover:

+ Size of char is 1 byte - it is stored in one word (one address used)
+ Size of int is 2 bytes - it is also stored in one word
+ Size of long is 4 bytes - it is stored in two words (two addresses involved) + An array of chars is "packed" automatically by the microcontroller, so that 2 consecutive chars are stored in one word.

What value of MEM_ALIGNMENT should I use? Can I use LWIP memory functinos (mem_malloc() etc) without any changes in their original source code, or should I use the stdio mem functions (malloc() etc)? Finally - do I have to make any changes in the original LWIP source code due to my my architecture?

Thanks in advance for help

--
Bartlomiej Wicher
University of Southern Denmark
Odense, Denmark




reply via email to

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