public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] __attribute__ ((packed)) doesn't work
@ 2006-02-22 11:18 Siegmund, Thomas
  2006-02-22 11:25 ` Dirk Husemann
  0 siblings, 1 reply; 8+ messages in thread
From: Siegmund, Thomas @ 2006-02-22 11:18 UTC (permalink / raw)
  To: ecos-discuss

Hello,

I use an ARM9 development board, GCC 3.3.3 and the eCos Version 2.0. I'm
developing an USB driver. 
I got some trouble with the descriptor structures declared in "USB.h".
After the compilation these 
structs show the size of an alignment of 4 bytes boundary and not the
real size.

typedef struct usb_configuration_descriptor {
...
} usb_configuration_descriptor __attribute__((packed));

I moved the position of "__attribute__((packed))" to -> 

typedef struct usb_configuration_descriptor {
...
} __attribute__((packed)) usb_configuration_descriptor; 

and it works. So what did I wrong respectively what do I have to do it
works without changes?

The 2nd question why the does the "usb_endpoint_descriptor" own this
attribute though it has 
a size of 7 bytes and doesn't fit at 4 bytes boundary? Without this
attribute described above
the same misalignment is occured. 

Any ideas or hints? 

Thanks in advance Thomas  

This message (including any attachments) contains confidential
and/or proprietary information intended only for the addressee.
Any unauthorized disclosure, copying, distribution or reliance on
the contents of this information is strictly prohibited and may
constitute a violation of law.  If you are not the intended
recipient, please notify the sender immediately by responding to
this e-mail, and delete the message from your system.  If you
have any questions about this e-mail please notify the sender
immediately.

Ce message (ainsi que les eventuelles pieces jointes) est
exclusivement adresse au destinataire et contient des
informations confidentielles. La copie, la communication ou la
distribution du contenu de ce message sans l'accord prealable de
l'expediteur sont strictement interdits et peuvent constituer un
delit. Si vous n'etes pas destinataire de ce message, merci de le
detruire et d'avertir l'expediteur. Si vous avez des questions se
rapportant a ce courrier electronique, merci de bien vouloir
notifier
l'expediteur immediatement.

--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [ECOS] __attribute__ ((packed)) doesn't work
  2006-02-22 11:18 [ECOS] __attribute__ ((packed)) doesn't work Siegmund, Thomas
@ 2006-02-22 11:25 ` Dirk Husemann
  2006-02-22 11:32   ` Peter Seebach
  0 siblings, 1 reply; 8+ messages in thread
From: Dirk Husemann @ 2006-02-22 11:25 UTC (permalink / raw)
  To: Siegmund, Thomas; +Cc: ecos-discuss

[-- Attachment #1: Type: text/plain, Size: 1345 bytes --]

Siegmund, Thomas wrote:
[...]

> 
>
>This message (including any attachments) contains confidential
>and/or proprietary information intended only for the addressee.
>Any unauthorized disclosure, copying, distribution or reliance on
>the contents of this information is strictly prohibited and may
>constitute a violation of law.  If you are not the intended
>recipient, please notify the sender immediately by responding to
>this e-mail, and delete the message from your system.  If you
>have any questions about this e-mail please notify the sender
>immediately.
>  
>
could you leave this part of the signature out? sending something to a 
public mailing list cannot be considered confidential and some companies 
have rather strict rules about receiving unsolicited confidential 
material...

-- 
Dr Dirk Husemann, Pervasive Computing, IBM Research, Zurich Research Lab
	hud@zurich.ibm.com --- http://www.zurich.ibm.com/~hud/
       PGP key: http://www.zurich.ibm.com/~hud/contact/PGP
  PGP Fingerprint: 983C 48E7 0A78 A313 401C  C4AD 3C0A 278E 6431 A149
	     Email only authentic if signed with PGP key.

Appended to this email is an electronic signature attachment. You can
ignore it if your email program does not know how to verify such a
signature. If you'd like to learn more about this topic, www.gnupg.org
is a good starting point.


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 258 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [ECOS] __attribute__ ((packed)) doesn't work
  2006-02-22 11:25 ` Dirk Husemann
@ 2006-02-22 11:32   ` Peter Seebach
  2006-02-22 12:04     ` Andrew Lunn
  0 siblings, 1 reply; 8+ messages in thread
From: Peter Seebach @ 2006-02-22 11:32 UTC (permalink / raw)
  To: ecos-discuss

In message <43FC4A07.3070704@zurich.ibm.com>, Dirk Husemann writes:
>could you leave this part of the signature out? sending something to a 
>public mailing list cannot be considered confidential and some companies 
>have rather strict rules about receiving unsolicited confidential 
>material...

The problem here is conflicting legal standards.  There are sound legal
reasons to absolutely require that ALL outgoing mail have that disclaimer
in some countries.  I know, it sounds dumb.  "The law is an ass."
Both companies are making rational decisions given the variety of atrociously
stupid laws and court decisions on such issues.

-s

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [ECOS] __attribute__ ((packed)) doesn't work
  2006-02-22 11:32   ` Peter Seebach
@ 2006-02-22 12:04     ` Andrew Lunn
  2006-02-22 23:25       ` [ECOS] My petty complaint about your signature Brett Delmage
  0 siblings, 1 reply; 8+ messages in thread
From: Andrew Lunn @ 2006-02-22 12:04 UTC (permalink / raw)
  To: Peter Seebach; +Cc: ecos-discuss

On Wed, Feb 22, 2006 at 05:29:06AM -0600, Peter Seebach wrote:
> In message <43FC4A07.3070704@zurich.ibm.com>, Dirk Husemann writes:
> >could you leave this part of the signature out? sending something to a 
> >public mailing list cannot be considered confidential and some companies 
> >have rather strict rules about receiving unsolicited confidential 
> >material...
> 
> The problem here is conflicting legal standards.  There are sound legal
> reasons to absolutely require that ALL outgoing mail have that disclaimer
> in some countries.  I know, it sounds dumb.  "The law is an ass."
> Both companies are making rational decisions given the variety of atrociously
> stupid laws and court decisions on such issues.

Yes, this is stupid. It is a shame i have to delete the email, since i
probablyu know what is wrong....

        Andrew


-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [ECOS] My petty complaint about your signature
  2006-02-22 12:04     ` Andrew Lunn
@ 2006-02-22 23:25       ` Brett Delmage
  0 siblings, 0 replies; 8+ messages in thread
From: Brett Delmage @ 2006-02-22 23:25 UTC (permalink / raw)
  To: ecos-discuss

> Yes, this is stupid. It is a shame i have to delete the email, since i
> probablyu know what is wrong....

How about all of you take this silly complaint offline, please. Or at 
least change the topic to "My petty complaint about your signature", if 
you wish to bother list members with it anymore? That way we can ignore 
this thread, instead of thinking it is something important about ecos that 
we should read.

Thanks.

On Wed, 22 Feb 2006, Andrew Lunn wrote:

> On Wed, Feb 22, 2006 at 05:29:06AM -0600, Peter Seebach wrote:
> > In message <43FC4A07.3070704@zurich.ibm.com>, Dirk Husemann writes:
> > >could you leave this part of the signature out? sending something to a 
> > >public mailing list cannot be considered confidential and some companies 
> > >have rather strict rules about receiving unsolicited confidential 
> > >material...
> > 
> > The problem here is conflicting legal standards.  There are sound legal
> > reasons to absolutely require that ALL outgoing mail have that disclaimer
> > in some countries.  I know, it sounds dumb.  "The law is an ass."
> > Both companies are making rational decisions given the variety of atrociously
> > stupid laws and court decisions on such issues.
> 
> Yes, this is stupid. It is a shame i have to delete the email, since i
> probablyu know what is wrong....
> 
>         Andrew
> 
> 
> -- 
> Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
> and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
> 

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [ECOS] __attribute__ ((packed)) doesn't work
  2006-02-23 15:27 AW: " Siegmund, Thomas
@ 2006-03-02 18:41 ` Andrew Lunn
  0 siblings, 0 replies; 8+ messages in thread
From: Andrew Lunn @ 2006-03-02 18:41 UTC (permalink / raw)
  To: Siegmund, Thomas; +Cc: ecos-discuss

On Thu, Feb 23, 2006 at 12:31:45PM +0100, Siegmund, Thomas wrote:
> Hello,
> 
> the "usb.h" was edited and the "usb.diff" was created. I hope it's correct.

It looks OK and compiles. I don't have any hardware to test it with.

By the way, the ChangeLog is the other way around. New entries go at
the top. I fixed this for you when i committed the patch.

        Andrew

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [ECOS] __attribute__ ((packed)) doesn't work
  2006-02-22 15:05 AW: " Siegmund, Thomas
@ 2006-02-22 15:37 ` Andrew Lunn
  0 siblings, 0 replies; 8+ messages in thread
From: Andrew Lunn @ 2006-02-22 15:37 UTC (permalink / raw)
  To: Siegmund, Thomas; +Cc: ecos-discuss

On Wed, Feb 22, 2006 at 04:04:56PM +0100, Siegmund, Thomas wrote:
> Thanks for your answer about the court ;-))...
> Hopefully this attachment won't appear now.
> 

> Well, and what about the "usb_endpoint_descriptor" which doesn't own
> this attribute?  My assumption is it is missing, isn't it?

It is probably missing it, but Bart should decide.

> Concerning a patch I'm not familiar to create this one because I'm a
> newbie. Can you tell me where some documentation about it are
> placed?

You are using the old code 2.0 i think? 

You should really update to anoncvs, the latest source code.

http://ecos.sourceware.org/anoncvs.html

Edit the file to how you think it should be. Add an entry to the
ChangeLog file in the package. Just follow the format of the other
entries. Test the code works.

Then do

cvs diff -u packages/io/usb > usb.diff

and send us the file usb.diff

        Andrew

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [ECOS] __attribute__ ((packed)) doesn't work
  2006-02-22 12:42 AW: [ECOS] __attribute__ ((packed)) doesn't work Siegmund, Thomas
@ 2006-02-22 14:49 ` Andrew Lunn
  0 siblings, 0 replies; 8+ messages in thread
From: Andrew Lunn @ 2006-02-22 14:49 UTC (permalink / raw)
  To: Siegmund, Thomas; +Cc: ecos-discuss

On Wed, Feb 22, 2006 at 01:42:26PM +0100, Siegmund, Thomas wrote:
> Sorry for that but I don't have an influence to discard this attachment. 
> I only can apologize myself but I really would appreciate to get 
> a technical hint. 

OK, so long as you agree not to take me to court!

The USB stack was tested on ARM with gcc 3.2.1. GCC is getting more
picky about where the attributes are placed. I think that the version
you are using is simply ignoring them. You change is correct. If you
submit a proper patch i will see about comitting it.

        Andrew

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2006-03-02 18:41 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-02-22 11:18 [ECOS] __attribute__ ((packed)) doesn't work Siegmund, Thomas
2006-02-22 11:25 ` Dirk Husemann
2006-02-22 11:32   ` Peter Seebach
2006-02-22 12:04     ` Andrew Lunn
2006-02-22 23:25       ` [ECOS] My petty complaint about your signature Brett Delmage
2006-02-22 12:42 AW: [ECOS] __attribute__ ((packed)) doesn't work Siegmund, Thomas
2006-02-22 14:49 ` Andrew Lunn
2006-02-22 15:05 AW: " Siegmund, Thomas
2006-02-22 15:37 ` Andrew Lunn
2006-02-23 15:27 AW: " Siegmund, Thomas
2006-03-02 18:41 ` Andrew Lunn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).