ts-7000
[Top] [All Lists]

Re: [ts-7000] Re: pointer weirdness

To:
Subject: Re: [ts-7000] Re: pointer weirdness
From: David Hawkins <>
Date: Thu, 13 Sep 2007 11:27:09 -0700
Hi Eddie,

> The issue you are running into is that older ARM cores only had 
> strb/ldrb and str/ldr instructions. There was no strh/ldrh, as a result 
> gcc will emit two 8 bit reads/writes unless instructed otherwise. This 
> is why we provided the PEEK/POKE routines to abstract this away. If one 
> chooses to not use the PEEK/POKE routines they should pass gcc the 
> -mcpu=arm9 to ensure the strh/ldrh instructions are used. Below is an 
> example demonstrating the issue.

Thanks, that clarifies that two 8-bit reads are being used.

The example also points out that the TS-7300 FPGA interface
has a 'platform specific access requirement'; the FPGA
interface can not handle arbitrary width accesses.
There's probably a good reason for this, or if not, thats
just the way it is now, so you have to deal with it.

So Yan, as I mentioned earlier, when accessing hardware,
your driver code can not generally be written using
bare pointer accesses, since you want the compiler to
emit specific instructions independent of the compiler
settings.

Cheers,
Dave


 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/ts-7000/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/ts-7000/join
    (Yahoo! ID required)

<*> To change settings via email:
     
    

<*> To unsubscribe from this group, send an email to:
    

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 

<Prev in Thread] Current Thread [Next in Thread>
Admin

Disclaimer: Neither Andrew Taylor nor the University of NSW School of Computer and Engineering take any responsibility for the contents of this archive. It is purely a compilation of material sent by many people to the birding-aus mailing list. It has not been checked for accuracy nor its content verified in any way. If you wish to get material removed from the archive or have other queries about the archive e-mail Andrew Taylor at this address: andrewt@cse.unsw.EDU.AU