用RVDS创建ARM汇编工程并且搭建调试环境
 2015.05.06    |      ARM11    |     AilsonJack    |     暂无评论    |     2117 views
广告位C招租:1
By: Ailson Jack
Date: 2015-05-06
个人博客: http://www.only2fire.com/
<p style="text-indent: 2em;">对于嵌入式的学习,首先就要对所使用的处理器的汇编指令要有一个比较好的了解,这里结合一些资料以及个人的实际操作,给大家讲讲如何搭建ARM的汇编工程,这里使用的是RVDS 2.2,在下面我提供了软件的下载链接。</p><p style="text-indent: 2em;">RealView Developer Suite(RVDS)工具是ARM公司推出的新一代ARM集成开发环境(上一代是ADS)。支持所有的ARM系列核,并与众多的第三方实时操作系统及工具商合作简化开发流程。其包含以下组件:GUI(Graphics User Interface,图形用户界面)开发环境(CodeWarrior和AXD)、支持软件组成。有了这些部件,用户就可以为ARM系列的处理器,编写、调试自己的程序了。</p><p style="text-indent: 0em;">&nbsp;&nbsp;这里是我提供的RVDS软件,文件:<a class="btn btn-success" href="https://pan.baidu.com/s/1dDAPcYX" target="_blank">点此下载</a>&nbsp;密码:<span style="color: rgb(255, 0, 0);">wg17</span>。</p><p style="text-indent: 2em;"><span style="color: rgb(255, 0, 0);">注:</span>要完成汇编程序的学习,当然是需要一个<span style="color: rgb(255, 0, 0);">JLink</span>,一块<span style="color: rgb(255, 0, 0);">开发板</span>(我的是ARM11),还有<span style="color: rgb(255, 0, 0);">RVDS软件</span>。</p><p class="artical_littlestyle1">1、安装RVDS软件</p><p style="text-indent: 2em;">请下载我提供的文件,照着安装教程,安装完RVDS 2.2,之后安装好JLink驱动程序。</p><p style="text-indent: 2em;">在<span style="color: rgb(255, 0, 0);">开始</span>-&gt;<span style="color: rgb(255, 0, 0);">所有程序</span>-&gt;<span style="color: rgb(255, 0, 0);">ARM</span>-&gt;<span style="color: rgb(255, 0, 0);">RealView Developer Suite v2.2</span>打开<span style="color: rgb(255, 0, 0);">CodeWarrior</span>软件:</p><p style="text-align:center"><img src="/uploads/AilsonJack/2018.08.20/1534733651416160.png" onclick="preview_image(&#39;/uploads/AilsonJack/2018.08.20/1534733651416160.png&#39;)"/></p><p class="artical_littlestyle2">2、创建工程</p><p style="text-indent: 2em;">在CodeWarrior中,点击<span style="color: rgb(255, 0, 0);">File</span>-&gt;<span style="color: rgb(255, 0, 0);">New</span>,我将工程放在E盘下的ARM_ASM文件夹中(注意不要在路径中包含中文字符),工程名为<span style="color: rgb(255, 0, 0);">test</span>,最后点击<span style="color: rgb(255, 0, 0);">确定</span>:</p><p style="text-align:center"><img src="/uploads/AilsonJack/2018.08.20/1534733651453503.png" onclick="preview_image(&#39;/uploads/AilsonJack/2018.08.20/1534733651453503.png&#39;)"/></p><p style="text-align:center"><img src="/uploads/AilsonJack/2018.08.20/1534733651957481.png" onclick="preview_image(&#39;/uploads/AilsonJack/2018.08.20/1534733651957481.png&#39;)"/></p><p style="text-indent: 2em;">这是创建好后的工程文件:</p><p style="text-align:center"><img src="/uploads/AilsonJack/2018.08.20/1534733651977353.png" onclick="preview_image(&#39;/uploads/AilsonJack/2018.08.20/1534733651977353.png&#39;)"/></p><p style="text-indent: 2em;">将我提供给大家的一个汇编文件test.S拷贝到工程文件夹中:</p><p style="text-align:center"><img src="/uploads/AilsonJack/2018.08.20/1534733651695141.png" onclick="preview_image(&#39;/uploads/AilsonJack/2018.08.20/1534733651695141.png&#39;)"/></p><p style="text-indent: 2em;">在CodeWarrior中的下图区域中<span style="color: rgb(255, 0, 0);">右键</span>-&gt;<span style="color: rgb(255, 0, 0);">Add Files</span>,将刚才的汇编文件<span style="color: rgb(255, 0, 0);">test.S</span>添加到工程中:</p><p style="text-align:center"><img src="/uploads/AilsonJack/2018.08.20/1534733652598962.png" onclick="preview_image(&#39;/uploads/AilsonJack/2018.08.20/1534733652598962.png&#39;)"/></p><p style="text-align:center"><img src="/uploads/AilsonJack/2018.08.20/1534733656574622.png" onclick="preview_image(&#39;/uploads/AilsonJack/2018.08.20/1534733656574622.png&#39;)"/></p><p style="text-align:center"><img src="/uploads/AilsonJack/2018.08.20/1534733657540101.png" onclick="preview_image(&#39;/uploads/AilsonJack/2018.08.20/1534733657540101.png&#39;)"/></p><p style="text-align:center"><img src="/uploads/AilsonJack/2018.08.20/1534733659993762.png" onclick="preview_image(&#39;/uploads/AilsonJack/2018.08.20/1534733659993762.png&#39;)"/></p><p class="artical_littlestyle3">3、工程配置</p><p style="text-indent: 2em;">点击<span style="color: rgb(255, 0, 0);">Edit</span>-&gt;<span style="color: rgb(255, 0, 0);">Debug Settings</span>,弹出如下窗口:</p><p style="text-align:center"><img src="/uploads/AilsonJack/2018.08.20/1534733665281110.png" onclick="preview_image(&#39;/uploads/AilsonJack/2018.08.20/1534733665281110.png&#39;)"/></p><p style="text-indent: 2em;">选择处理器使用的ARM核,我使用的是S3C6410芯片,它是基于ARM1176JZF-S核,因此我选择的是<span style="color: rgb(255, 0, 0);">ARM1176JZF-S</span>,你们根据自己的实际情况选择吧:</p><p style="text-align:center"><img src="/uploads/AilsonJack/2018.08.20/1534733669862031.png" onclick="preview_image(&#39;/uploads/AilsonJack/2018.08.20/1534733669862031.png&#39;)"/></p><p style="text-align:center"><img src="/uploads/AilsonJack/2018.08.20/1534733672256848.png" onclick="preview_image(&#39;/uploads/AilsonJack/2018.08.20/1534733672256848.png&#39;)"/></p><p style="text-indent: 2em;">了解你的开发板的内存的开始地址,我的开发板的内存地址开始于:<span style="color: rgb(255, 0, 0);">0X50000000</span>,这里我将程序放置在<span style="color: rgb(255, 0, 0);">0X50200000</span>处:</p><p style="text-align:center"><img src="/uploads/AilsonJack/2018.08.20/1534733717498517.png" onclick="preview_image(&#39;/uploads/AilsonJack/2018.08.20/1534733717498517.png&#39;)"/></p><p style="text-align:center"><img src="/uploads/AilsonJack/2018.08.20/1534733717955439.png" onclick="preview_image(&#39;/uploads/AilsonJack/2018.08.20/1534733717955439.png&#39;)"/></p><p style="text-indent: 2em;">接下来就可以编译程序了,可以在工程文件下的<span style="color: rgb(255, 0, 0);">Debug</span>文件夹中看到<span style="color: rgb(255, 0, 0);">test.axf</span>文件,这就是要下载的文件:</p><p style="text-align:center"><img src="/uploads/AilsonJack/2018.08.20/1534733717476080.png" onclick="preview_image(&#39;/uploads/AilsonJack/2018.08.20/1534733717476080.png&#39;)"/></p><p style="text-align:center"><img src="/uploads/AilsonJack/2018.08.20/1534733718973849.png" onclick="preview_image(&#39;/uploads/AilsonJack/2018.08.20/1534733718973849.png&#39;)"/></p><p style="text-indent: 2em;">至此,创建、编译程序算是完成了。</p><p class="artical_littlestyle4">4、AXD软件配置</p><p style="text-indent: 2em;"><span style="background-color: rgb(118, 146, 60);">(1)、</span>打开AXD软件</p><p style="text-indent: 2em;">在<span style="color: rgb(255, 0, 0);">开始</span>-&gt;<span style="color: rgb(255, 0, 0);">所有程序</span>-&gt;<span style="color: rgb(255, 0, 0);">ARM</span>-&gt;<span style="color: rgb(255, 0, 0);">RealView Developer Suite v2.2</span>打开<span style="color: rgb(255, 0, 0);">AXD</span>软件:</p><p style="text-align:center"><img src="/uploads/AilsonJack/2018.08.20/1534733719969692.png" onclick="preview_image(&#39;/uploads/AilsonJack/2018.08.20/1534733719969692.png&#39;)"/></p><p style="text-indent: 2em;">打开之后,提示安装文件夹中缺少<span style="color: rgb(255, 0, 0);">JlinkARM.dll</span>:</p><p style="text-align:center"><img src="/uploads/AilsonJack/2018.08.20/1534733727172018.png" onclick="preview_image(&#39;/uploads/AilsonJack/2018.08.20/1534733727172018.png&#39;)"/></p><p style="text-indent: 2em;">这个文件可以在先前安装完的JLink驱动文件夹中拷贝,将其拷贝到提示的路径中即可:</p><p style="text-align:center"><img src="/uploads/AilsonJack/2018.08.20/1534733723631140.png" onclick="preview_image(&#39;/uploads/AilsonJack/2018.08.20/1534733723631140.png&#39;)"/></p><p style="text-indent: 2em;"><span style="background-color: rgb(118, 146, 60);">(2)、</span>添加<span style="color: rgb(255, 0, 0);">JLinkRDI.dll</span></p><p style="text-indent: 2em;">点击AXD软件中<span style="color: rgb(255, 0, 0);">Options</span>-&gt;<span style="color: rgb(255, 0, 0);">Configure Target</span>,弹出如下窗口:</p><p style="text-align:center"><img src="/uploads/AilsonJack/2018.08.20/1534733721208330.png" onclick="preview_image(&#39;/uploads/AilsonJack/2018.08.20/1534733721208330.png&#39;)"/></p><p style="text-align:center"><img src="/uploads/AilsonJack/2018.08.20/1534733732597404.png" onclick="preview_image(&#39;/uploads/AilsonJack/2018.08.20/1534733732597404.png&#39;)"/></p><p style="text-indent: 2em;">然后将JLink驱动文件夹下的<span style="color: rgb(255, 0, 0);">JLinkRDI.dll</span>添加进来:</p><p style="text-align:center"><img src="/uploads/AilsonJack/2018.08.20/1534733733868653.png" onclick="preview_image(&#39;/uploads/AilsonJack/2018.08.20/1534733733868653.png&#39;)"/></p><p style="text-indent: 2em;">接下来,给开发板上电,连接好JLink,然后点击<span style="color: rgb(255, 0, 0);">OK</span>按钮,可以看出,AXD软件已经识别出了芯片:</p><p style="text-align:center"><img src="/uploads/AilsonJack/2018.08.20/1534733734261301.png" onclick="preview_image(&#39;/uploads/AilsonJack/2018.08.20/1534733734261301.png&#39;)"/></p><p style="text-align:center"><img src="/uploads/AilsonJack/2018.08.20/1534733735406939.png" onclick="preview_image(&#39;/uploads/AilsonJack/2018.08.20/1534733735406939.png&#39;)"/></p><p style="text-indent: 2em;">至此,AXD的配置算是完成了。</p><p class="artical_littlestyle1">5、调试程序</p><p style="text-indent: 2em;">点击<span style="color: rgb(255, 0, 0);">File</span>-&gt;<span style="color: rgb(255, 0, 0);">Load Image…</span>,找到之前编译工程生成的<span style="color: rgb(255, 0, 0);">test.axf</span>文件:</p><p style="text-align:center"><img src="/uploads/AilsonJack/2018.08.20/1534733780531180.png" onclick="preview_image(&#39;/uploads/AilsonJack/2018.08.20/1534733780531180.png&#39;)"/></p><p style="text-align:center"><img src="/uploads/AilsonJack/2018.08.20/1534733780903364.png" onclick="preview_image(&#39;/uploads/AilsonJack/2018.08.20/1534733780903364.png&#39;)"/></p><p style="text-align:center"><img src="/uploads/AilsonJack/2018.08.20/1534733780592901.png" onclick="preview_image(&#39;/uploads/AilsonJack/2018.08.20/1534733780592901.png&#39;)"/></p><p style="text-indent: 2em;">点击<span style="color: rgb(255, 0, 0);">System Views</span>-&gt;<span style="color: rgb(255, 0, 0);">Registers</span>,添加寄存器窗口到界面,以便观察:</p><p style="text-align:center"><img src="/uploads/AilsonJack/2018.08.20/1534733780359676.png" onclick="preview_image(&#39;/uploads/AilsonJack/2018.08.20/1534733780359676.png&#39;)"/></p><p style="text-align:center"><img src="/uploads/AilsonJack/2018.08.20/1534733781549507.png" onclick="preview_image(&#39;/uploads/AilsonJack/2018.08.20/1534733781549507.png&#39;)"/></p><p style="text-align:center"><img src="/uploads/AilsonJack/2018.08.20/1534733783232779.png" onclick="preview_image(&#39;/uploads/AilsonJack/2018.08.20/1534733783232779.png&#39;)"/></p><p style="text-align:center"><img src="/uploads/AilsonJack/2018.08.20/1534733787501782.png" onclick="preview_image(&#39;/uploads/AilsonJack/2018.08.20/1534733787501782.png&#39;)"/></p><p style="text-indent: 2em;">接下来,大家就可以根据自己的程序,来进行调试了。</p><p style="text-indent: 2em;">至此,用RVDS创建ARM汇编工程,并且搭建调试环境已经完成了,有什么不明白的地方,可以留言提问,如果我知道,肯定解答。<br/></p>
欢迎关注博主的公众号呀,精彩内容随时掌握:
热情邀请仔细浏览下博客中的广告,万一有对自己有用或感兴趣的呢。◕ᴗ◕。。
如果这篇文章对你有帮助,记得点赞和关注博主就行了^_^,当然了能够赞赏博主,那就非常感谢啦!
注: 转载请注明出处,谢谢!^_^
广告位C招租:2
广告位C招租:3
广告位D招租:1
广告位D招租:2
暂无评论,要不要来个沙发
发表评论

 
广告位E招租
Copyright © 2015~2021  说好一起走   保留所有权利   |  百度统计  蜀ICP备15004292号