The purpose of an engine controller is to fulfil emission, consumption and driveability requirements and to be able to fully utilize the potential of a modern engine with its high degree of freedom, the complexity of the controller becomes very high.The long calibration time, the complex architecture, the limited I/O and intellectual property make production controllers difficult to use in a research environment, where there is often a need to change the functionality in order to test new concepts. This is why many universities develop their own engine controller, which in many cases is only used for one project, why a lot of valuable research time is lost in developing the basic controller.This paper describes an open source engine controller for rapid prototyping to be used freely at the universities in Sweden for their research and education purposes. Currently it is based on a modular and flexible HW from dSPACE using Matlab/Simulink/RTW for the SW following the AUTOSAR standard. The model based SW can control any type of engine with any type of actuator such as multiple injections, fully flexible valvetrain or a complex turbo configuration.The controller is designed so it can handle transient as well as steady-state operations and by using the information from additional sensors compared to a production system, such as cylinder pressure and exhaust temperature, the SW can be kept very compact and optimized for fast calibration.To increase the time to market for new inventions and concepts it is easy to use the same controller on a demonstrator vehicle. To further increase the speed of the development, there is a complete Model-In-the-Loop environment which can also be used to validate new functionality before running the algorithm on the actual engine.