NAND flash memory has become an indispensable component in mobile embedded systems because of its versatile features such as non-volatility, solid-state reliability, low cost and high density. Even though NAND flash memory is gaining popularity as data storage, it can be also exploited as code memory for XIP (execute-in-place). In this paper, we present a new memory architecture which incorporates NAND flash memory into an existing memory hierarchy for code execution. The usefulness of the proposed approach is demonstrated with real embedded workloads on a real prototyping board. Categories and Subject Descriptors B.3.2 [Memory Structures]: Design Styles – Cache memories; D.4.2 [Operating Systems]: Storage Management – Secondary storage; B.6.1 [Logic Design]: Design Styles – Memory control and access. General Terms Algorithms, Measurement, Performance, Design Keywords Memory architecture, NAND XIP, Priority-based caching