Re: [avr-gcc-list] External 256K FLASH - memory pointer

2012-10-01 Thread Richard Weickelt
Hi, I do not know if there will be any code over head due to C++. Unfortunately my forte is 'C'. Can I trouble you for some examples/sample code please? Thank you once again. Use a 32-bit unsigned integer and a typedef as it has been suggested and You're done. It would be foolish to move on

Re: [avr-gcc-list] External 256K FLASH - memory pointer

2012-09-20 Thread Parthasaradhi Nayani
Hello Richard, Thanks a lot for your suggestion. Yes we can and it has already been suggested: Define Your own abstract data type with an underlying 32 bit integer. You can even overload all operators for it to achieve full pointer semantics. But I would not go so far and overload the

Re: [avr-gcc-list] External 256K FLASH - memory pointer

2012-09-18 Thread Parthasaradhi Nayani
From: Joerg Wunsch j...@uriah.heep.sax.de To: avr-gcc-list@nongnu.org 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

Re: [avr-gcc-list] External 256K FLASH - memory pointer

2012-09-18 Thread Richard Weickelt
Hi, 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

Re: [avr-gcc-list] External 256K FLASH - memory pointer

2012-09-17 Thread Joerg Wunsch
Parthasaradhi Nayani partha_nay...@yahoo.com wrote: I have an external FLASH (serial) of size 256K. I would like t= o create a memory section for this memory and have pointers (more than 16 b= its) to this memory. What's the point? A pointer is just a 32-bit (or perhaps 24-bit, in recent

[avr-gcc-list] External 256K FLASH - memory pointer

2012-09-16 Thread Parthasaradhi Nayani
Hello all, I have an external FLASH (serial) of size 256K. I would like to create a memory section for this memory and have pointers (more than 16 bits) to this memory. Can some one help me please?  I am sorry if such a topic has already been dealt with, as my googling did not yield the desired