The widespread expansion of digital device market has forced embedded system companies to deal with several additional challenges in order to provide complex systems in this market niche. One of the most important challenges is related to energy consumption, mainly, due to the following factors: (i) mobility issues; (ii) environmental problems and (iii) energy costs. This book presents a software synthesis method for hard real-time systems, which takes into account intertask relations, overheads, timing as well as energy constraints. The method is composed of several activities, which include: (i) measurement; (ii) speci?cation; (iii) formal modeling; (vi) scheduling; and (v) code generation. The method is also centered on Petri net formalism, which lays down a basis for precise pre-runtime schedule generation, adopting dynamic voltage scaling (DVS) for reducing energy consumption. From a feasible schedule, a customized code is generated satisfying the speci?ed constraints and, so, assuring runtime predictability. To tackle the static nature of pre-runtime schedules, a lightweight runtime scheduler is also proposed to improve energy consumption during system execution.