This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
RE: Question about system bus
- To: "eCos" <ecos-discuss at sources dot redhat dot com>,<harri dot siirtola at vtt dot fi>
- Subject: RE: [ECOS] Question about system bus
- From: "HuangQiang" <jameshq at liverpool dot ac dot uk>
- Date: Tue, 19 Jun 2001 17:43:50 +0100
still no luck with "volatile unsigned long *". Is the read operation
correct?
thanks
-----Original Message-----
From: harri.siirtola@vtt.fi [mailto:harri.siirtola@vtt.fi]
Sent: 19 June 2001 17:37
To: HuangQiang; eCos; harri.siirtola@vtt.fi
Subject: RE: [ECOS] Question about system bus
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