CodeSpriteEmbedded software consultancy
specializing in
ARM Powered systems
HomeSite MapClientsContact
Search this site 
powered by FreeFind

CodeSprite Projects

On-demand Overlay Loading System

In a system with restricted amounts of RAM, but ample slow-access memory, it was necessary to place some code modules in overlays, loaded as required and run from the same physical memory region.

Consideration also had to be given to the fact that it may be necessary to update the overlays independently of the code in ROM. For this reason, calls from the ROM into the overlay were vectored through a jumptable that formed part of the header of each overlay module.

Use of different memory aliases for each overlay allowed realtime trace to determine which module was currently loaded, and also provided us with the opportunity to implement a guard function embedded into the jumptable entries. This tiny piece of code used hashing techniques to determine whether the correct overlay is loaded into memory, and can be used to load in the correct overlay if required, before continuing with the requested function.

It was important that apart from the act of requesting an overlay to be loaded, the interface through the overlay jumptable should be completely transparent to both the ROM developer and the overlay developer. This was achieved with a system of partial linking and linker-symbol renaming.

The final system fulfilled all the objectives, and provided a fully automated overlay build and link process.