Due to the popularity and heterogeneity of embedded systems, the problem of software component (SW-component) allocation in such systems is receiving increasing attention. Addressing this problem using a graphical modeling language such as Ecore will enable system designers to better and more easily allocate their components. However, the existing Ecore models do not address the problem of SW-component allocation in heterogeneous embedded systems. Because of Ecore informal semantics, Ecore models cannot be analyzed using mathematical tools. On the other hand, an approach based on colored Petri nets (CPNs) was proposed for the modeling and analysis of the software component allocation problem. The approach was shown to be applicable in the field not only with respect to the cost optimization problem, but also because it takes nonfunctional requirements into consideration. In this paper, we propose an approach for the automated transformation of an Ecore model into an equivalent CPN model, which will help the modeler use the power of a formal modeling language by only modeling the system using a simple Ecore-based modeling language.