Cross gcc Mailing List Archive

[Prev][Index][Thread]

Re: volital registers



In article <55dmdv$j7v@halon.vggas.com>, nev@snet.net says...
>#define SCSR (*(unsigned short *)0xfffC0C)
>
>This works OK until the the I do this
>
>        while (SCSR & 0X0100)  
>                ;

>How do specify pointer to a volital area in memory?
>#define SCSR (*(volatile unsigned short *)0xfffC0C)

>
>OR
>
>I would like to have the CPU's internal I/O show up 
>in the linker map
>so that if someone tries to map something else in 
>the same location the
>linker will give a warning or error.

You can do it in the linker script.
Linker scripts are well explained in the manual that comes with ld.

-- 
James Youngman       VG Gas Analysis Systems |The trouble with the rat-race 
 Before sending advertising material, read   |is, even if you win, you're 
http://www.law.cornell.edu/uscode/47/227.html|still a rat.



Home | Subject Index | Thread Index