This paper presents an approach for analyzing embedded systems' software energy consumption and performance based on probabilistic modeling. Such an approach applies Coloured Petri Net modeling language (CPN) for supporting simulation and analysis. The proposed approach offers three basic contributions for embedded system analysis field:(i)code modeling, a probabilistic model for scenarios exploration being presented, (ii) formalism, a formal and widespread modeling language (CPN) being applied, with previously validated engines and algorithms for simulation;(iii) flexibility, the proposed approach enabling modeling of different micro-controllers at different abstraction levels.