MyFPGA Forum

 找回密码
 注册
搜索
查看: 2799|回复: 0
打印 上一主题 下一主题

DE1_SoC uart 在application 中使用方法

[复制链接]
跳转到指定楼层
1#
发表于 2015-8-18 09:37:43 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式
连续接到了几个想在应用程序中使用uart的问题,uart 在linux系统中默认作为了console,所以是无法直接使用的!如果必须使用,就得想办法不让它作为linux的console.但是为了实现交互式环境,必须要另外留一个console界面。
可以使用VGA framebuffer或者ethernet SSH 进行交互。
这里参考了两篇文档进行了实现:
http://www.armadeus.com/wiki/index.php?title=Uart
http://knowledge.digi.com/articl ... se-serial-port-UART
铭记:be sure that your device won't send data back in response of U-Boot boot's sequence !!!!
1 recompile内核
device driver
        ---charcater devices
                --serial  drivers
                    [ ]Console on 8250/16550 and campatible serial port
make zImage
2 /etc/inittab 中把下面一行注释掉
   #S:2345:respawn:/sbin/getty  115200 ttyS0
3 uboot参数设定
setenv bootargs "console=none"
env save
4 在VGAconsole页面对ttyS0参数设定
stty -F /dev/ttyS0 11500
5 VGA页面 echo hello > /dev/ttyS0

有图有真相





最后上传一个zImage
zImage.tar.gz (3.76 MB, 下载次数: 0)
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|MyFPGA

GMT+8, 2024-5-9 01:23 , Processed in 0.046155 second(s), 18 queries .

Powered by Discuz! X3

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表