This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
RE: Question about system bus
- To: "HuangQiang" <jameshq at liverpool dot ac dot uk>, "eCos" <ecos-discuss at sources dot redhat dot com>, <harri dot siirtola at vtt dot fi>
- Subject: RE: [ECOS] Question about system bus
- From: harri dot siirtola at vtt dot fi
- Date: Tue, 19 Jun 2001 19:36:58 +0300
At 17:11 19.6.2001 +0100, HuangQiang wrote:
>...
>#define EXTIOBANK 0x02100000
>// define a test address in IO bank 0
>#define EXTIOTEST ((unsigned long *)(EXTIOBANK + 0x0010))
>...
>// read from the ext io
>
>unsigned long k = 0;
>
>while(1)
>{
> k = *EXTIOTEST;
>} // now no CS signal.
Do you have compiler optimization enabled? If yes, you should use
'((volatile unsigned long *)(EXTIOBANK + 0x0010))', otherwise your
assignment gets optimized away. Check the generated assembly code.
Harri