public inbox for crossgcc@sourceware.org
 help / color / mirror / Atom feed
From: jens.ohlund@secrc.abb.se
To: crossgcc@sourceware.cygnus.com
Subject: ARM and padding
Date: Tue, 18 Jul 2000 01:01:00 -0000	[thread overview]
Message-ID: <OF8C34C8B1.FD7B6B3C-ONC1256920.002B9939@secrc.abb.se> (raw)

Hi !

My problem is the following:
I have an ARM Evaluation Board-1. Rev B. I receive data from a serial line.
this data is placed in a linear buffer, and then i typecast to a struct of some kind.

This data which i receive I cannot control, and have therefore to work with it as is.

The structs contains other structs and so on and in the end it's only 16 or 8 bits values a extract.
BUT these values are not aligned, and when I typecast I get the wrong values, since the buffer is "packed".

How do I tell the compiler that the structs are to be packed ?

I'm developing on NT4, using cygwin and gcc-2.95.2 (arm-elf-gcc).

yours
Jens Ohlund


------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com

             reply	other threads:[~2000-07-18  1:01 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-07-18  1:01 jens.ohlund [this message]
2000-07-18  1:36 ` Philip Blundell
2000-07-18  2:38 ` Luke Diamand
2000-07-18  2:14 jens.ohlund
2000-07-18  2:28 ` Ola Liljedahl
2000-07-19  2:12 Ilya Vershkov

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=OF8C34C8B1.FD7B6B3C-ONC1256920.002B9939@secrc.abb.se \
    --to=jens.ohlund@secrc.abb.se \
    --cc=crossgcc@sourceware.cygnus.com \
    /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).