From: Joerg Wunsch <address@hidden>
Sent: Tuesday, September 18, 2012 11:21 AM
>What's the point? A pointer is just a 32-bit (or perhaps 24-bit,
>in recent AVR-GCC versions) number.
>Normally, the point of using a pointer is that the compiler arranges
>for you to dereference the pointer automatically, but this memory
>being external, not accessible by normal CPU instructions, this cannot
>work anyway. Consequently, you can use the respective integer numbers
(perhaps through some kind of typedef that hints them being
Thanks for the response. Basically the requirement is to use external serial FLASH memory. We wanted large pointer for two things
1. To declare a section and assign variable names which is better than using absolute addresses. This is possible.
2. Pass the address to functions which do the reading and writing the memory. Given below is an example function prototype we would like to have
void ReadXFlashBlock (unsigned char *destptr, unsigned char *sourceaddr, unsigned int noofbytes);
In the above destptr is not an issue but sourceaddr is. If a 32 bit pointer can be somehow declared then this will be pretty elegant. If this is not possible then the only alternative would be to change the function parameters as shown below which is not really elegant.
void ReadXFlashBlock (unsigned char *destptr, long sourceaddr, unsigned int
The calling program must treat this long variable as a pointer rather than long itself.