I. Introduction
IoT devices increasingly rely on energy harvesting to power themselves because they are deployed in complex working environments, and thus it is hard to charge or replace their batteries [1]–[4]. Without energy harvesting, the lifetime of IoT devices will be severely limited by the battery size. As the energy output of harvesters is typically tiny and unstable, an energy-harvesting IoT (EH-IoT) device typically executes intermittently: the device runs for a short while and depletes the energy storage; after that, the device has to shut down to collect energy and restarts after the energy storage is replenished. This unique nature brings critical challenges to tasks requiring much energy to execute. Such a task may frequently experience power failures before it completes. Many important system services will be severely affected by this problem [2], [5], among which firmware update is a crucial one [6].