Hi Vero,
If you declare an automatic variable in a function it will be created somewhere on the heap, if it is a static variable, it will be in the bss section of your linked binary. In both cases there is no way in C to make the compiler create a variable at a specific location.
What you can do is create a pointer variable and set that to point to the location you wish to use:
Code:char *p_variable;p_variable = 0x20001500;// Now you just dereference the pointer to access your char// e.g. to set the variable to *:*p_variable = '*';
It is a good idea to declare this type of variable in your linker command file, along with your other memory map declarations in the way that Simon has pointed out.
Cheers,
Paul.
Message Edited by mccp on 2007-03-1510:02 AM
Message Edited by mccp on 2007-03-1510:03 AM