public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
From: Daniel Helgason <dhelgason@shaw.ca>
To: ecos-discuss@ecos.sourceware.org
Subject: Re: [ECOS] Question about CYG_HAL_TABLE usage
Date: Fri, 11 Oct 2013 23:16:00 -0000	[thread overview]
Message-ID: <1381533382.4474.15.camel@saturn> (raw)
In-Reply-To: <l39rn8$hu$1@ger.gmane.org>

On Fri, 2013-10-11 at 21:48 +0000, Grant Edwards wrote:
> I'm working with an app that uses the CYG_HAL_TABLE macros for seveal
> different purposes.  I've always thought that the "END" label was at
> the end of the "array" of objects, such that you can iterate a table
> like this:
> 
> 
>   for (p = __foo_TAB__; p < __foo_TAB_END__; ++p)
>     {
>       // process object pointed to by p    
>     }    
> 
> But this seems not to be the case.  At least for Cortex M3 targets The
> END label is aligned on an 8-byte boundary so that there may be up to
> 7 bytes of padding between the end of the table and the END label.
> ...

Yes, 8-byte alignment is the default alignment for entries in the
tables.

Check out hal/common/current/include/hal_tables.h and in particular
CYG_HAL_TABLE_TYPE macro. That should fix the problem.



-- 
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:[~2013-10-11 23:16 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-11 21:48 Grant Edwards
2013-10-11 23:16 ` Daniel Helgason [this message]
2013-10-12 15:19   ` [ECOS] " Grant Edwards

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=1381533382.4474.15.camel@saturn \
    --to=dhelgason@shaw.ca \
    --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).