[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lwip-users] Bare Metal / Memory Alignment
From: |
Jens Breuer |
Subject: |
Re: [lwip-users] Bare Metal / Memory Alignment |
Date: |
Wed, 7 Sep 2011 16:16:41 +0200 |
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] Bare Metal / Memory Alignment, Jens Breuer, 2011/09/08
- [lwip-users] Bare Metal / Memory Alignment, Jens Breuer, 2011/09/06
- Re: [lwip-users] Bare Metal / Memory Alignment, Kieran Mansley, 2011/09/07
- Re: [lwip-users] Bare Metal / Memory Alignment, ake . forslund, 2011/09/07
- Re: [lwip-users] Bare Metal / Memory Alignment,
Jens Breuer <=
- [lwip-users] Ang: Re: Bare Metal / Memory Alignment, ake . forslund, 2011/09/07
- Re: [lwip-users] Ang: Re: Bare Metal / Memory Alignment, Kieran Mansley, 2011/09/07
- Re: [lwip-users] Ang: Re: Bare Metal / Memory Alignment, Simon Goldschmidt, 2011/09/07
- Re: [lwip-users] Ang: Re: Bare Metal / Memory Alignment, Bill Auerbach, 2011/09/07
- Re: [lwip-users] Ang: Re: Bare Metal / Memory Alignment, vincent cui, 2011/09/07
- [lwip-users] max server number of chargen, vincent cui, 2011/09/07
- [lwip-users] how to tell client that your connection request is reject ?, vincent cui, 2011/09/08
- Re: [lwip-users] how to tell client that your connection request is reject ?, Kieran Mansley, 2011/09/09
- [lwip-users] Ang: Re: Ang: Re: Bare Metal / Memory Alignment, ake . forslund, 2011/09/07
- Re: [lwip-users] Bare Metal / Memory Alignment, Jens Breuer, 2011/09/08