Abstract
In this thesis, we propose an application-specific demand code-paging scheme named EcoSwap for resource-constrained wireless sensor platform with EEPROM or FLASH as secondary storage. A page manager manages the pages between the on-chip RAM and the secondary storage. The page manager is generated by a compiler and is combined with the application code. EcoSwap transforms function call/return instructions into calls to the page manager and function that are larger than the page size into multiple functions. As a result, each code page can be loaded into RAM upon demand. To minimize the execution overhead, EcoSwap adopts two optimization techniques to improve performance.