学号:4110008032泰山医学院毕业设计(论文)题目:基于ARMCortex-M3的双以太网口通信的实现院(部)系信息工程学院所学专业计算机科学与技术年级、班级2010级本科1班完成人姓名付水生指导教师姓名专业技术职称彭磊副教授2014年6月10日论文原创性保证书我保证所提交的论文都是自己独立完成,如有抄袭、剽窃、雷同等现象,愿承担相应后果,接受学校的处理。专业:计算机科学与技术班级:2010级本科一班签名:年月日泰山医学院本科毕业设计(论文)摘要随着嵌入式系统技术的发展,嵌入式系统技术与以太网技术融合的也越来越紧密,虽然嵌入式系统的应用程序完全可以在ARM裸机上运行,但是随着测控设备功能的增强,嵌入式系统所需完成的任务越来越复杂,需要管理的外设越来越多,传统的软件开发模式已经显得力不从心。而采用嵌入式操作系统作为软件开发平台,就可以由操作系统来完成任务的管理和系统资源的分配,开发工作的重点才能集中于实际应用系统性能的提高。此外,在操作系统基础上可实现统一规范的编程,使程序具有良好的可读性和可移植性,并可提高开发的效率。ARMCortex-M3处理器结合了多种突破性技术,令芯片供应商提供超低费用的芯片。该处理器还集成了许多紧耦合系统外设,令系统能满足下一代产品的控制需求。本论文是基于ARMCortex-M3微处理器MB9F618和近来比较流行RT-Thread操作系统的双以太网口通信的研制过程为主要内容,阐述了其具体使用的技术和各模块的实现方法,区别于一般的TCP/IP协议,本系统采用了LwIP的通信协议,LwIP实现的重点是在保持TCP协议主要的功能的基础上减少对RAM的占用,它只需要十几KB的RAM和40K左右的ROM就可以运行,这使LwIP协议栈适合在低端的嵌入式系统中使用。在以上的硬件和软件的共同支持下,最终完成了双以太网口之间通信的研究。关键词:ARMCortex-M3;RT-Thread;LwIP;双以太网的通信泰山医学院本科毕业设计(论文)AbstractWiththedevelopmentofembeddedsystemstechnology,embeddedsystemtechnologyandtheintegrationofEthernettechnologyisalsomoreclosely,thoughembeddedsystemsapplicationscanrunonARMbaremetal,butwithenhancedfunctionalityandcontroldevices,embeddedsystemsneededtocompletethetaskmorecomplex,theneedtomanagemoreandmoreperipherals,traditionalsoftwaredevelopmentmodelhasappearedtobeinadequate.Thefocusondistributiondevelopmentofembeddedoperatingsystemasthesoftwaredevelopmentplatform.Inaddition,theoperatingsystemcanberealizedonthebasisofastandardizedprogramming,theprogramhasgoodreadabilityandportability,andimprovedevelopmentefficiency.ARMCortex-M3processorcombinesmultiplebreakthroughtechnologiesenablechipvendorstoprovideultra-lowcostofthechip.Theprocessoralsointegratesanumberoftightly-coupledsystemperipherals,sothatthecontrolsystemcanmeettheneedsofthenextgenerationofproducts.ThisthesisisbasedonthedevelopmentprocessofdualEthernetportcommunicationARMCortex-M3microprocessorMB9F618andrecentlymorepopularRT-Threadoperatingsystemasthemaincontent,technologyanddescribestheimplementationofeachmoduleofitsspecificuse,thedifferenceingeneralTCP/IPprotocol,thesystemusesacommunicationprotocolLwIPfocusLwIPachieveistoreducetheoccupancyofRAMonthebasisofmaintainingthemainfeaturesoftheTCPprotocolon,ittakesaboutadozenKBofRAMand40KofROMcanrun,whichmakesLwIPstacksuitableforuseinlow-endembeddedsystems.Insupportofthesecommonhardwareandsoftware,thefinalcompletionofthestudyofcommunicationbetweenthedualEthernetports.Keywords:ARMCortex-M3;RT-Thread;LwIP;dualEthernetcommunication泰山医学院本科毕业设计(论文)目录前言........................................................................1第一章相关技术背景介绍.....................................................31.嵌入式系统的定义.....................................................32.嵌入式处理器分类与现状...............................................43.嵌入式操作系统.......................................................64.网络协议栈...........................................................65.本章小结.............................................................7第二章系统硬件平台.........................................................81.ARMCortex-M3处理器..................................................82.系统任务要求.........................................................92.1硬件方面........................................................92.1软件方面........................................................93.开发板MB9F618简介...................................................93.2开发板外观......................................................93.2配置说明.......................................................104.本章小结............................................................11第三章软件的设计..........................................................121.嵌入式操作系统的选择................................................121.1RT-Thread操作系统的简介........................1错误!未定义书签。1.2虚拟文件系统...................................................131.3shell系统......................................................131.4图形用户界面...................................................131.5支持的平台.....................................................131.6RT-Thread的内核对象模型........................................141.7内核对象管理工作模式...........................................141.8线程状态.......................................................152.LwIP协议栈...........................................错误!未定义书签。2.1LwIP协议栈简介.................................................16泰山医学院本科毕业设计(论文)2.2LwIP的以太网数据接收...........................................183.LwIP协议栈的初始化..................................................214.MB9F618网口设置.....................................................225.主要函数功能的简介..................................................256.本章小结............................................................25第四章系统功能模块调试....................................................271.程序烧写............................................................272.程序烧写后..........................................................273.双网卡测试..........................................................274.网口的通信..........................................................295.本章小结............................................................31结论........................................