加入收藏 | 设为首页 | 会员中心 | 我要投稿 | RSSRSS-巴斯仪表网
您当前的位置:首页 > 电子发烧 > 单片机学习

uClinux windows下安装说明

时间:2013-09-08  来源:123485.com  作者:9stone

安装 Cygwin 做为发展环境
1. 将Cygwin 安装光盘置入CDROM中, 范例中我们将假设CDROM是放置在D槽。
2. 在D:/ 下激活setup.exe后出现如下画面,接着按”下一步”。
  
3. 出现如下画面后,可让我们选择Cygwin原始资料的来源,因为目前Cygwin的原始资料在CDROM中,所以选择“Install from Local Directory” 后,按”下一步”。
 

4. 出现如下画面后,可让我们选择Cygwin要安装在那个目录,此时设定你的Cygwin system要安装在那个路径-如 c:/cygwin后,按”下一步”。
  

5. 出现如下画面后,可让我们选择Cygwin原始资料的来源目录,此时要设定Cygwin原始资料光盘所在的光驱路径后按”下一步”。

 

6. 在Cygwin安装选项中选择 install all ,若你想用make xconfig来设定uClinux的重建选项,因为做make xconfig时会用到很多工具,因此最好选择 install all ,否则你将无法正常执行make xconfig
 
7. 在安装完成后会出现如下画面,此时只需按下”完成”既可
 

重建 uClinux 烧录映像档
一、首先我们必须设定 Cygwin 的编译工具联结
1. 假如您的操作系统是WIN NT/ 2000, 开启file C:/Cygwin/Cygwin.bat, 在“@echo off 下一行加入 “set CYGWIN=title ntea”.(可省略不作)
2. 在桌面执行Cygwin Bash shell 
3. 到根目录下 cd /
4. cp D:/arm-elf-tools-cygwin.tar.gz空格 /usr/local
5. cp D:/uClinux-dist-Creator.tar.gz 空格 /usr/src
6. cd /usr/local
7. tar xvfz arm-elf-tools-cygwin.tar.gz
8. cd /usr/src
9. tar xvfz uClinux-dist-Creator.tar.gz
10. We must modify some configuration to make sure that uClinux can compile under Cygwin.
11. cd /bin
12. mv sh.exe sh.exe.old
13. cp bash.exe sh.exe  (because some shell script cannot run sh.exe under Cygwin)
14. open c:/cygwin/etc/profile, <-到这个目录下
将原路径 “/usr/local/bin:/usr/src:/usr/bin:/bin:$Path” 修改为“/usr/local/bin:/usr/src:/usr/bin:/bin”

二、设定Uclinux选项
15. 在路径cd /usr/src/uClinux-dist底下,键入 make xconfig数秒后会出现以下画面。
  
16. 此时选择 “Target Platform Selection “可以出现以下画面,让你挑选CPU与kernel的版本
  
17. 如上图,此时CPU是选Samsung 4510B, 而kernel的版本是选2.4版,而liberary是选uClibc,将”Customize Kernel Settings” 选”y”是因为接下来我们想做Kernel的选项设定,而将 “Customize Vendor/User Settings” 选”y”是因为接下来我们也想做user application的选项设定,做完上述的设定之后就选”Main Menu” 会出现以下画面。
  
18. 我们可以选择 “Save and Exit”将刚才所做的设定储存起来,过几秒之后就会出现以下画面,此时我们可以做图上所示之各个uClinux模块的设定。, 最后选择“Save and Exit” 将刚才所做的设定储存起来。 
 
19. 出现以下画面之后,你可以依据自己得需求设定uClinux User Application,此时我们可以做图上所示之各个应用程序的设定, 最后选择“Save and Exit” 将刚才所做的设定储存起来
 
20. 在 configuring 你的 uClinux kernel and application之后, 我们可以开始建立映像资料

三、建立uClinux
21. 在路径 /usr/src/uClinux-dist下
22. make dep
23. make lib_only(it builds library)
24. make user_only(it builds user space applications)
25. make romfs
26. make image(这将产生 romfs.o) 画面上将会出现一些错误讯息,不用担心请忽略这个错误,错误只在这里发生一次
27. make
28. 建立完成后,我们可以发现在/usr/src/uClinux-dist/images下,新增了两个档案image.rom and image.ram
29. 以下动作可省略                                                    
30. You can download image.ram (or linux-2.4.x/linux which including debug information) via Domingo IDE to your target at address 0x8000, and then set the Program Counter to 0x8000 and just run it
31. Or, you can flash the image.rom to the flash rom under your target using the flashing tool under Domingo.
32. The uClinux console default setting is UART0,19200,8n1.
 
33. Now, you can enjoy the world of uClinux!!

34.最后把范例档案看Makefile的路径在那放在该目录下.

 


分享到:
来顶一下
返回首页
返回首页
发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表
栏目导航->单片机学习
  • 电子应用基础
  • 电源技术
  • 无线传输技术
  • 信号处理
  • PCB设计
  • EDA技术
  • 单片机学习
  • 电子工具设备
  • 技术文章
  • 精彩拆解欣赏
  • 推荐资讯
    使用普通运放的仪表放大器
    使用普通运放的仪表放
    3V与5V混合系统中逻辑器接口问题
    3V与5V混合系统中逻辑
    数字PID控制及其改进算法的应用
    数字PID控制及其改进
    恶劣环境下的高性价比AD信号处理数据采集系统
    恶劣环境下的高性价比
    栏目更新
    栏目热门