avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avr-gcc-list] Re: Larger than 64K memory sections


From: David Brown
Subject: [avr-gcc-list] Re: Larger than 64K memory sections
Date: Wed, 26 Aug 2009 15:10:05 +0200
User-agent: Thunderbird 2.0.0.22 (Windows/20090605)

Jan Waclawek wrote:
I am using a 4MB flash memory with my Mega64. I would like to
create a memory section for the entire 4MB. Is it possible? If
yes, how can this be done in the makefile? Thank you very much
for your time.

You can't directly access such large memory areas from an AVR,
therefore it makes no sense to talk about a memory section for it.

IMHO your implication is incorrect. Even if there's no builtin
support for non-RAM variables in avr-gcc (yet), we already have
sections for EEPROM and FLASH - and the latter can be >64kB large.


Yes, that's true. I hadn't thought about the EEPROM sections, mainly because I think they are often a bad idea in practice and thus don't use them (it's far too easy for the final addresses to change between builds, making a mess of stored data after changing the software. I much prefer to use a struct at a fixed manually-specified address to order my eeprom data).

Still, without direct access the OP will need manual paging at least (and possibly more manual work - for all we know, this could be a serial flash, or 16-bit flash connected via GPIOs, or whatever).

Memory sections and pointer arithmetic get messy or impossible after 32K or 64K limits. A 4MB section may also crash with other sections in the linker file unless you are very careful.

All in all, I can't see any advantage to the OP in using memory sections here, and I can see a great many complications if it can be made to work at all.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]