In the development trend of embedded technology, the methods of embedded system design are studied and widely utilized. This paper presents a new approach to design embedded system and generate code from models based on Domain Specific Language and Text Template Transformation Toolkit. | Journal of Computer Science and Cybernetics, , (2012), 323 332 EMBEDDED SYSTEM DESIGN AND CODE GENERATION BY USING THE DSL AND T4∗ rew ex r yxqD xq ix xqyg fsxr University of Engineering and Technology Vietnam National University, Hanoi, Vietnam; Email: huongpv@ Tóm t t. rong xu h÷îng ph¡t triºn m¤nh m³ õ æng ngh» nhóngD ¡ ph÷ìng ph¡p thi¸t k¸ h» thèng nhóng ông 1÷ñ nghi¶n ùu v triºn kh i rëng r¢iF f i ¡o n y tr¼nh y ¡ h ti¸p ªn mîi 1º thi¸t k¸ v sinh m¢ ho h» thèng nhóng dü tr¶n ngæn ngú mi·n x¡ 1ành v æng ngh» sinh m¢ RF ghóng tæi 1ành ngh¾ ngæn ngú mi·n x¡ 1ànhD x¥y düng si¶u mæ h¼nh t÷ìng ùng v ph¡t triºn æng ö 1º thi¸t k¸ mæ h¼nh ki¸n tró D mæ h¼nh th nh ph¦n õ h» thèng nhóng v mæ h¼nh ho¤t 1ëng õ ¡ th nh ph¦n ph¦n m·m trong h» thèng nhóngF ø mæ h¼nh thi¸t k¸D dü tr¶n æng ngh» sinh m¢ R 1º sinh m¢ theo ¡ ngæn ngú kh¡ nh uF Abstract. sn the development trend of em edded te hnologyD the methods of em edded system design re studied nd widely utilizedF his p per presents new ppro h to design em edded system nd gener te ode from models sed on hom in pe ifi v ngu ge nd ext empl te r nsform tion oolkitF e define three hom in pe ifi v ngu gesD uild the orresponding met E models nd develop our fr meworkF he fr mework is to design the models of em edded system su h s the r hite tur l model nd the omponent modelF st is lso to design the flow h rt of em edded softw reF f sed on the designed modelsD we pply the ext empl te r nsform tion oolkit to gener te ode from models utom ti llyF Keywords. hesign im edded ystemD im edded oftw reD h v @hom in pe ifi v ngu geAD gode qener tionD R @ ext empl te r nsform tion oolkitAD og @ ystem on ghipA 1. INTRODUCTION Nowadays, embedded systems technology have strongly developed and the embedded system design plays an important role in the embedded system development. A few authors have improved UML to support on .