一种面向AVR单片机的嵌入式虚拟机
详细信息    本馆镜像全文|  推荐本文 |  |   获取CNKI官网全文
摘要
随着电子技术和计算机技术的快速发展,嵌入式系统已经被广泛地应用于人类生活的方方面面。目前的嵌入式微处理器种类繁多,体系结构也各不相同,这降低了嵌入式软件的通用性,进而阻碍了嵌入式系统的发展与普及。如何能够合理重用现有的软件代码来提高软件开发的效率已经成为嵌入式软件开发中的一个主要研究方向。目前,广泛应用的方法是采用嵌入式虚拟机技术来解决不同嵌入式平台的软件重用问题。
     本文主要研究了一种基于ATmega128单片机的嵌入式虚拟机。其中研究了嵌入式硬件平台,包括原理图设计、PCB设计制作、硬件调试等;通过对JAVA虚拟机的深入分析后,借鉴其核心思想给出了基于AVR单片机的虚拟机规范定义;重点研究了虚拟机的设计与实现,且针对系统软件的高效性等特点,使用C语言和汇编语言混合编程的方法开发出了嵌入式堆栈虚拟机(ESVM)原型;研究了主机端开发环境的设计问题,开发了基于MFC应用程序框架的可视化主机端软件,该软件为用户提供了应用程序的编辑、编译等基本功能。另外,本文还开发了一个目标代码下载器,使用该下载器把编译生成的目标代码通过串口下载到目标机端。最后,本文对系统的运行效果进行了验证。
With the rapid development of electronics technology and computer science, the embedded system has been used widely and it has a tendency of being a part of people’s daily lives. Due to the various types and different architectures of the MCUs, it downs low the universal use of the embedded software and slows the development and utilize fields .The solution how to reuse software code to increase the efficiency of software’s development would be a main research direction of the embedded software system. Nowadays, embedded virtual machine is used widely to solve the software reuse in different platforms.
     This thesis researches on the virtual machine based on the ATmega128. First, this thesis builds the embedded hardware platform, including the principle design, PCB design and hardware debug, and so on. Second, uses for reference on the specification of Java Virtual Machine, defines the specification of the ESVM, and realize it on the ATmega128 MCU. Later on, it is mainly researched on the design and realize of the virtual machine. This thesis creates the ESVM virtual machine using C language and the assemble language. In order to make it easy to use, we design visual client software which is base on MFC. This software supports easy interfaces for the edition, compile. Besides, we realize a downloader which can download the compiled object code into the target though the serial port.At last, this thesis shows the running result of the target system, and gives the detail introduction .
引文
[1]王清明,基于嵌入式linux的Java虚拟机分析与设计,[硕士学位论文],西安,电子科技大学,2004.12
    [2]朱天阳,嵌入式Java虚拟机的应用管理模块AMS的设计与实现,[硕士学位论文],北京,北京邮电大学,2007.5
    [3] G.Bollella,A.J.Wellings, P.Dibble,and D.Holmes,Cost Enforcement and Deadline Monitoring in The Real-Time Specification for Java,presented at Proceedings of the 7th IEEE International Symposium on Object-Oriented Real-Time Distributed Computing ISORC-2004,2004
    [4] H.Cai and A.Wellings,A real-time isolate specification for Ravenscar-Java , Object-Oriented Real-Time Distributed Computing ,2004, Proceedings , Seventh IEEE International Symposium on, 2004,P325~328
    [5] J.Baker,J.Manson, T.Cunei,S.Jagannathan,Preemptible Atomic Regions for Real-time java,presented at Proceedings of the 26th IEEE International Real-Time Systems Symposium(RTSS05),2005
    [6] Antonio Cunei Jason Baker, Chapman Flack,Real-time java in Avionics Applications,presented at Proceedings of the 12th IEEE Real-Time and Embedded Technology and Applications Symposium(RTAS),2006
    [7] Noam Nisan,Shimon Schocken,计算机系统要素--从零开始构建现代计算机,北京,电子工业出版社,2007.2:P121~124
    [8] Bill Venners(美),深入Java虚拟机,北京,机械工业出版社2003.9:P15~24
    [9] Brad Abrams Krzysztof Cwalina,.NET设计规范--.NET约定、惯用法与模式,北京,人民邮电出版社,2006.7:P25~30
    [10]柴志雷,Java实时性及嵌入式实时Java处理器研究,[硕士学位论文],上海,复旦大学,2006.4
    [11]蔡建平,关于嵌入式应用开发技术,第十届全国抗恶劣环境计算机学术年会论文集,2000.10
    [12] ATmega128 Reference Manual,Web pages at http://www.atmel.com
    [13] Douglas E.Comer(美),计算机系统结构精髓,北京,清华大学出版社,2006.3:P246~254
    [14]马潮,高档8位单片机ATmega128原理与开发应用指南(上),北京,北京航空航天大学,2004.12:P6~12
    [15]陈冬云,杜敬仓等,ATmega 128单片机原理与开发指导,北京,机械工业出版社,2006.1:P4~7
    [16]霍宏伟,牛延超等,ATmega 128/2560系列单片机原理与高级应用,北京,中国林业出版社,2006.4:P11~15
    [17]刘兰香,张秋生,ATmega128单片机应用与开发实例,北京,机械工业出版社,2006.6:P8~11
    [18]王克宏,Java虚拟机规范,北京,清华大学出版社,1996.12:P1~5
    [19] Frank Yellin(美) Tim Lindholm,Java虚拟机规范,北京,北京大学出版社,1997.10:P188~200
    [20] JTime Reference Manual ,Web pages at http://www.timesys.com
    [21] B.Delsart,G.Bollella,R.Guider,Mackinac:making hotSpot / spltrade / real-time, presented at Eighth IEEE International Symposium on Object-Oriented Real-Time Distributed Computing,ISORC 2005,2005
    [22] Mackinac Whitepaper,Web pages at http://research.sun.com/projects/mackinac
    [23] James E. Smith,Ravi Nair,Virtual machines : versatile platforms for systems and processes,Beijing,Publishing House of Electronics Industry,2006:P1~8
    [24] Randall Hyde,编程卓越之道第二卷Volume 2运用底层语言思想编写高级语言代码,北京,电子工业出版社,2007.4:P256~289
    [25] William Stallings(美),操作系统--精髓与设计原理,北京,电子工业出版社,2006.2:P189~203
    [26]姜旭锋,SmartSimular--基于虚拟指令集的嵌入式系统模拟器,[硕士学位论文],杭州,浙江大学,2006.5
    [27]陈熹,YJVM--一种运行在嵌入式Linux内核中的Java虚拟机的设计与实现,[硕士学位论文],上海,上海交通大学,2007.1
    [28]魏洪兴,嵌入式系统设计师教程,北京,清华大学出版社,2006.8:P388~389
    [29]罗蕾,嵌入式实时操作系统及应用开发,北京,北京航空航天大学出版社, 2005.1:P139~168
    [30]候俊杰,深入浅出MFC(第二版),武汉,华中科技大学出版社,2001:P311~335
    [31] Dave Thomas,Andy Hunt(美),版本控制之道:使用CVS,北京,电子工业出版社,2005.5
    [32]谭浩强,C语言程序设计(第二版),北京,清华大学出版社,1999.12:P1~4
    [33]王春海,虚拟机技术与应用--配置、管理与实验,北京,清华大学出版社,2006.12:P3~10
    [34]冯雁,编译原理与技术,杭州,浙江大学出版社,2004.9:P2~3
    [35] GNU Flex Reference Manual, Web pages at http://www.gnu.org/software/flex/manual
    [36] Bochs User Manual, Web pages at http://bochs.sourceforge.net/doc/docbook/user/introduction.html
    [37] GNU Bison Reference Manual, Web pages at http://www.gnu.org/software/bison/manual
    [38]孙悦红,编译原理及实现,北京,清华大学出版社,2005.4:P169~172
    [39]张幸儿,计算机编译原理,北京,科学出版社,2003:P284~287
    [40] David Salomon,Assembler and Loaders,West Sussex, UK: Ellis Harwood Ltd. Market Cross House, 1993: P13-14
    [41] Chris Nettleton, PWilson Ifill, Colin Marsh, Towards a demonstrably-correct ada compiler, ACM 2 Penn Plaza, Suite 701 New York NY USA, 2007: P89 - 96
    [42] PTorbjorn Ekman, Gorel Hedin, The jastadd extensible java compiler, ACM 2 Penn Plaza, Suite 701 New York NY USA, 2007: P1 - 18
    [43] Charles R. Hardnett, Krishna V. Palem, Yogesh Chobe, Compiler optimization of embedded applications for an adaptive SoC architecture, ACM Press, 2006: P312 - 322