Re: Writing to a memory location with GNU -ARM compiler.
> From: l...
> [mailto:l...] On Behalf Of Saurabh Arora
> Sent: 04 October 2007 08:42
> To: l...
> Subject: [lpc2000] Writing to a memory location with GNU -ARM
> Hello Group,
> I am using GNU compiler for my LPC2136 & want to write a byte
> on some memory location.Previously I used the Real View
> Compiler for KEIL & there was a inbuilt command
> _wbyte(location,char) for writng the same.There is another
> command _at address for writing to a memory location.But when
> I use this command in GNU compiler,both of these command are
> not recognized & the program is not getting compiled.Can
> anyone tell me what should I do to write a byte to desired
> memory location.
Am I missing the point here, or are you just asking how to use a pointer?
This is not compiler specific.
/* Delcare a pointer to the address 0x1234 */
char *c = 0x1234;
/* Write 5 to the address 0x1234. */
*c = 5;
Or are you trying to write to some kind of protected area?
> This routine should compile with GNU compiler
> & should obiviously in C.
Obviously, just like using _at.
13 official architecture ports, 1000 downloads per week.
Certified by T as meeting the requirements for safety related systems.