[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Fri, 26 Dec 2003 12:15:31 +1100
I am developing an application for the '169 that I now think will exceed the
16K memory. However, like much industrial instrumentation, it divides neatly
into two parts, a parameter setup part and a runtime part, both of which
would individually fit.
Back in the early 90's, Microsoft C introduced an "overlay" capability that
included a number of functions and linker options that set aside an area of
the 640K memory for overlays that were swapped in on demand from the PC's
With Atmel introducing in situ re-programming as a standard part of the
architecture, the capability to use overlays for low duty cycle function
sets (say a few thousand times during the product life) from an off-chip spi
eeprom looks very attractive.
I can see one way it could be done using a named region in flash and a
dispatch table in the BLS for all overlays that included whether they were
present, their entry address, size, recent usage pattern, off-chip
location/details, etc. The memory region would be maintained similar to a
MRU list. If a function was called and found to be not present, the region
would be examined for available space and, if available, the function
swapped in and called via the new location vector. If not enough space the
MRU list would be examined for a likely candidate based on size and usage
and existing functions discarded until enough contiguous space is available.
While I am going to start looking further at this method, I would be
interested if anyone has already tried overlays. The reason for posting to
this list is it might be interesting for the avrgcc team to look at whether
gcc has an overlay capability already, and/or whether overlays could be
built in to avrgcc without much major work.