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/
|