From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27243 invoked by alias); 11 Oct 2013 23:16:26 -0000 Mailing-List: contact ecos-discuss-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: ecos-discuss-owner@ecos.sourceware.org Received: (qmail 27229 invoked by uid 89); 11 Oct 2013 23:16:25 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.2 required=5.0 tests=AWL,BAYES_20,RCVD_IN_DNSWL_NONE,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 X-HELO: smtp-out-02.shaw.ca Received: from smtp-out-03.shaw.ca (HELO smtp-out-02.shaw.ca) (64.59.136.139) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 11 Oct 2013 23:16:25 +0000 X-Cloudmark-SP-Filtered: true X-Cloudmark-SP-Result: v=1.1 cv=tLeJwtg1FCvAouMblIYY1Z5/U6XdMrtw4y2B9g+QINc= c=1 sm=1 a=y0XI5BBzRJUA:10 a=BLceEmwcHowA:10 a=IkcTkHD0fZMA:10 a=bUu1WEaiSRmbQ71NH5XPZg==:17 a=pUQz74tmFev0Z-S97qkA:9 a=QEXdDO2ut3YA:10 a=HpAAvcLHHh0Zw7uRqdWCyQ==:117 Received: from unknown (HELO [192.168.1.126]) ([24.84.226.90]) by smtp-out-02.shaw.ca with ESMTP; 11 Oct 2013 17:16:22 -0600 From: Daniel Helgason To: ecos-discuss@ecos.sourceware.org In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Date: Fri, 11 Oct 2013 23:16:00 -0000 Message-ID: <1381533382.4474.15.camel@saturn> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Subject: Re: [ECOS] Question about CYG_HAL_TABLE usage X-SW-Source: 2013-10/txt/msg00007.txt.bz2 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