SMCube is a tool for modeling, simulation, and code generation of discrete time finite state machines (FSM) The idea driving the development of SMCube was the need for a lightweight State Machine editor, simulator, and code generator, that could be used to generate embedded code as well as graphically simulate the state machine evolution. But... why a state machine editor? Automatic code generation from functional models is a clear trend in automotive, industrial control, and in other industrial sectors. Most of the application descriptions used for code generation often include both, data-flow subsystems and finite state automatas. The Data Flow part is typically used to perform filters and control algorithms. Finite state automatas are used to map complex behaviors that are not easily expressed with data flow concepts (as, for example, application modes, alarms, and so on).