最近在学习嵌入式开发,由于在校没有开发板,就只能使用skyeye 模拟了。这几天开始串口编程方面的学习,但是现在问题出来了,skyeye怎么配置才具有串口通信功能,并且编译好的uClinux可以在e 上面运行。我在网上查了很多资料,都是说skyeye要支持串口要配置skyeye.conf这个文件,具体的配置方式如下:
skyeye的UART控制选项:
uart选项可以控制skyeye在另一个与某个串口连接的终端上输入/输出字符
格式:
uart: fd_in=indevname, fd_out=outdevname
fd_in=indevname indevname表示用于输入的设备文件名,其值为实际的串口设备文件/dev/ttySx
fd_out=outdevname outdevname表示用于输出的设备文件名,其值为实际的串口设备文件/dev/ttySx
例如:
uart: fd_in=/dev/ttyS0, fd_out=/dev/ttyS0
参照这个说明,我也做了相同的配置,我的配置文件如下:
#kyeye config file sample
cpu: arm7tdmi
mach: at91
mem_bank: map=M, type=RW, addr=0x00000000, size=0x00004000
mem_bank: map=M, type=RW, addr=0x01000000, size=0x00400000
mem_bank: map=M, type=R, addr=0x01400000, size=0x00400000, file=./boot.rom
mem_bank: map=M, type=RW, addr=0x02000000, size=0x00400000
mem_bank: map=M, type=RW, addr=0x02400000, size=0x00008000
mem_bank: map=M, type=RW, addr=0x04000000, size=0x00400000
mem_bank: map=I, type=RW, addr=0xf0000000, size=0x10000000
#set nic info state=on/off mac=xx:xx:xx:xx:xx:xx ethmod=tuntap/vnet hostip=dd.
dd.dd.dd
net: state=on, mac=0:4:3:2:1:f, ethmod=tuntap, hostip=10.0.0.1
uart:fd_in=/dev/ttyS0,fd_out=/dev/ttyS1
后来用skyeye启动uClinux,这下又出问题了。在没有配置uart参数之前skyeye启动uClinux是可以的,但是配置之后就不行了。我的操作步骤是:
[root@localhost uclinux3]# skyeye linux
***************************************************************
**** ****
**** SkyEye Simulator Ver 0.7.7 with GDB 5.3 Interface ****
**** ****
***************************************************************
GNU gdb 5.3
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This SkyEye was configured as "--host=i686-pc-linux-gnu --target=arm-elf"...
(no debugging symbols found)...
(SkyEye)target sim
cpu info: armv3, arm7tdmi, 41007700, fff8ff00, 0
mach info: name at91, mach_init addr 0x813db08
nic[0] info: state=1, ethmod num=1, mac addr=0:4:3:2:1:f, hostip=10.0.0.1
uart info: input device is /dev/ttyS0, fd is 6.
uart info: output device is /dev/ttyS1, fd is 7.
nic_init_begin
tapif_init begin
tapif_init: fd 8
tapif_init: system("ifconfig tap0 inet 10.0.0.1");
tapif_init end
nic_init_end
SKYEYE: use arm7100 mmu ops
Loaded ROM ./boot.rom
Connected to the simulator.
(SkyEye) load
Loading section .init, size 0xa000 vma 0x1000000
Loading section .text, size 0xcfdb0 vma 0x100a000
Loading section .data, size 0x9154 vma 0x10da000
Start address 0x1000000
Transfer rate: 7436320 bits in <1 sec.
(SkyEye)run
Starting program: /home/tj/skyeye/at91/uclinux3/linux
然后程序就停在这里不动了,查了很多资料都没有说配置skyeye支持串口具体怎么做,以及怎样测试串口配置已经成功了。
我是真的没有办法了,希望有解决这问题的朋友能够指点一下,不胜感激。如果有 step by step 那就更好了,谢谢了!