public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
From: "Siegmund, Thomas" <thomas.siegmund@hach-lange.de>
To: <ecos-discuss@ecos.sourceware.org>
Subject: [ECOS] __attribute__ ((packed)) doesn't work
Date: Wed, 22 Feb 2006 11:18:00 -0000	[thread overview]
Message-ID: <211AD5A0EF29B84B9B2736BAF71657B7759E40@dhreinsvxb02.messaging.danaherad.com> (raw)

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

             reply	other threads:[~2006-02-22 11:18 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-22 11:18 Siegmund, Thomas [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=211AD5A0EF29B84B9B2736BAF71657B7759E40@dhreinsvxb02.messaging.danaherad.com \
    --to=thomas.siegmund@hach-lange.de \
    --cc=ecos-discuss@ecos.sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).