Abstract:Aiming at the Freescale core control board MC9S12XS128 programming complex, long development cycle problem, MATLAB language was used to represent a control lowlevel driver interface function,it was packaged in the Simulink module;using RTW code generation tool,driver codes for each module were generated rapidly,to realize graphic programming for MC9S12XS128 control board.In order to verify the feasibility of the method,the position following control experiment environment for automotive electronic throttle was built based on MC9S12XS128 control unit.The experimental results show that the code generation technology of Simulink module packaging can meet the development needs of control system and it has a very strong applicability.