[ECOS] Some simple questitions
Andrew Lunn
andrew@lunn.ch
Mon Sep 4 08:18:00 GMT 2006
On Mon, Sep 04, 2006 at 07:22:46AM +0000, bob.koninckx@o-3s.com wrote:
> >2. Can I have direct access to processor's registers from my user
> >application? Linux has "mmap()" function for that purpose.
>
> eCos does not make the distinction between user and kernel space. Since everything runs in the same address space, you can do something like
>
> volatile cyg_uint32 * some_register = 0x12345678;
>
> Or use the HAL_WRITE and HAL_READ macros.
Using the HAL macros is the correcet way to do it. It ensures all the
volatiles are in the right place and any compiler reordering barriers
which are needed do get inserted.
Andrew
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
More information about the Ecos-discuss
mailing list