Measuring and modelling the energy consumption of multi-threaded, multi-core embedded software