This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]