|
From: | ake . forslund |
Subject: | [lwip-users] Ang: Re: Bare Metal / Memory Alignment |
Date: | Wed, 7 Sep 2011 17:59:01 +0200 |
Till: Mailing list for lwIP users <address@hidden>
Från: Jens Breuer
Sänt av: address@hidden
Datum: 2011-09-07 16:16
Ärende: Re: [lwip-users] Bare Metal / Memory Alignment
Hi Ake,
> My Target cpu is an Atmel AT91SAM9261 (ARM9), and I haven't seen any problems like the one you described. I'm not sure I had exactly the same problems but when I started to work with lwip it discarded packages due to missing settings for packing structs.
The target device I am using is STM32F107VC.
As explained there are no other errors so far. At least none that I am
aware of at this time. However I am still quite at the beginning.
Next I'm going to get TCP and UDP included and test that.
> Are you using packed structs or ETH_PAD_SIZE set to some value? Just guesses from the top of my head.
Yes, I use packed structs. I thought, that it would be mandatory.
These are the related defines in cc.h:
===3<===
#define PACK_STRUCT_USE_INCLUDES
#define PACK_STRUCT_FIELD(x) x
#define PACK_STRUCT_STRUCT
#define PACK_STRUCT_BEGIN
#define PACK_STRUCT_END
===3<===
This is the content of bpstruct.h:
===3<===
#pragma push
#pragma pack(1)
===3<===
This is the content of epstruct.h:
===3<===
#pragma pop
===3<===
ETH_PAD_SIZE is not defined in my case. It is using the default from opt.h of 0.
I set it to 2 some time, but I realized quickly that lwIP then uses
the wrong data as the type field value (misalign by 2, surprise).
However, I still have the feeling that I am just doing something wrong...
@Kieran & Ake: Thanks for your replies and interest in the problem.
Kind regards
Jens
_______________________________________________
lwip-users mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/lwip-users
[Prev in Thread] | Current Thread | [Next in Thread] |