lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] Problem With dns.c Using 32-Bit Compilers


From: Nicolas Pinault
Subject: Re: [lwip-users] Problem With dns.c Using 32-Bit Compilers
Date: Fri, 18 Jan 2008 15:00:50 +0100
User-agent: Thunderbird 2.0.0.9 (Windows/20071031)



John Keil a écrit :
Jifl wrote:
  
This implies to me that your compiler is not packing the structure. Are
the structure packing macros (PACK_STRUCT_BEGIN/STRUCT/END) implemented in
your cc.h? And correct for your compiler? Or you may need to provide
arch/bpstruct.h and arch/epstruct.h and define PACK_STRUCT_USE_INCLUDES,
depending on how structure packing is implemented in your compiler.
    

Unfortunately, TI's compiler does not support any kind of structure packing
for their C6000 DSP's (no #pragma pack, or anything similar).  This is
always a bit of a headache when interfacing to other devices, but
fortunately hasn't caused us too many problems with lwIP.  In fact, the
dns.c file is one of the few we have to modify (there are also overlays of
32-bit structures made on non-32-bit aligned arrays in dns.c, which don't
work for us).

I didn't realize the "sizeof" reporting 12 bytes instead of 10 was unique to
our environment, so I thought I'd bring it up.  Thanks for the input!

John Keil


  
The problem with these DSP is that whatever the size of the operand, (8, 16 or 32 bits), the compiler allways use 32bit "accesses". This is due to the fact that these DSPs can manipulate only 32bit registers. Memory accesses are also only 32bit accesses.

Nicolas

reply via email to

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