am335x 更改调试串口
2016-10-24 17:46
429 查看
am335x 更改调试串口
/********************************************************************* * am335x 更改调试串口 * * am335x的调试串口是uart0,uart硬件连接上与其他功能出现了冲突。 * 打算将其更改为uart1。本文并没有全部更改成功。 * 记录其过程,方便以后继续尝试。 * * Tony Liu, 2016-4-47, Shenzhen *********************************************************************/ 本文主要内容: 1. kernel调试串口更改 2. rootfs调试串口更改 3. uboot调试串口更改 参考链接: http://bbs.ednchina.com/BLOG_ARTICLE_3003157.HTM http://www.cnblogs.com/zym0805/archive/2011/07/17/2108573.html 1. kernel 1.1 更改kernel调试串口 通过uboot传参数,更改内核的uart端口,默认是ttyO0,更改为ttyO1 uboot/include/configs/ok335x.h #define CON \ "console=ttyO1,115200n8\0" \ "optargs=\0" \ "mmcroot=/dev/mmcblk0p2 ro\0" \ "mmcrootfstype=ext3 rootwait\0" \ "nandroot=ubi0:rootfs rw ubi.mtd=7,2048\0" \ "nandrootfstype=ubifs rootwait=1\0" #endif 1.2 关闭kernel的调试串口 include/configs/ok335x.h 通过uboot传参数,更改内核的uart端口,默认是ttyO0,更改为ttynull #define CON \ "console=ttynull,115200n8\0" \ "optargs=\0" \ "mmcroot=/dev/mmcblk0p2 ro\0" \ "mmcrootfstype=ext3 rootwait\0" \ "nandroot=ubi0:rootfs rw ubi.mtd=7,2048\0" \ "nandrootfstype=ubifs rootwait=1\0" #endif 2. rootfs 2.1 更改文件系统的调试端口 更改为ttyO1, getty命令用于设置uart的参数 /etc/inittab 0:2345:respawn:/sbin/getty 115200 ttyO1 2.2 关闭rootfs调试串口 将对应的行注释即可 /etc/inittab #0:2345:respawn:/sbin/getty 115200 ttyO0 3. uboot uboot中更改没有成功,但也把过程记录,方便之后查看。 uboot/include/configs/ok335x.h 更改下面的宏,注释的时候使用"/* */"进行注释,用“//”注释,编译会出现问题。 /* tony */ /*#define CONFIG_SERIAL2 1 #define CONFIG_CONS_INDEX 2 */ #define CONFIG_SERIAL1 1 #define CONFIG_CONS_INDEX 1 //并添加下面两个宏, 定义UART1,UART2的寄存器地址 /* tony */ #define CONFIG_SYS_NS16550_COM2 0x48022000 /* UART1 */ #define CONFIG_SYS_NS16550_COM3 0x48024000 /* UART2 */ /*******/ board/forlinx/ok335x/pll.c 添加使能uart1 static void per_clocks_enable(void) { ...... /* UART0 */ __raw_writel(PRCM_MOD_EN, CM_WKUP_UART0_CLKCTRL); while (__raw_readl(CM_WKUP_UART0_CLKCTRL) != PRCM_MOD_EN); /* UART1, add by Tony */ __raw_writel(PRCM_MOD_EN, CM_PER_UART1_CLKCTRL); while (__raw_readl(CM_PER_UART1_CLKCTRL) != PRCM_MOD_EN); /* UART3 */ __raw_writel(PRCM_MOD_EN, CM_PER_UART3_CLKCTRL); while (__raw_readl(CM_PER_UART3_CLKCTRL) != PRCM_MOD_EN); ...... } //添加uart1的时能 board/forlinx/ok335x/mux.c void enable_uart1_pin_mux(void) { configure_module_pin_mux(uart1_pin_mux); } 添加调用 board/forlinx/ok335x/evm.c void s_init(void) { ...... enable_uart0_pin_mux(); enable_uart1_pin_mux(); ...... }
相关文章推荐
- am335x 更改调试串口
- H3 Linux内核更改uart1作调试串口
- 树莓派3的调试串口问题的不完美解决:让蓝牙与调试共存
- arm+linux下调试串口切换成普通串口
- OK6410裸机调试(使用串口,不需要使用JLINK)
- 若要调试此模块 请将其项目生成配置更改为 调试 模式 的解决办法
- 串口调试时出现乱码
- QT开发之旅三串口设备调试工具
- WINCE6.0 把调试串口改为通用串口
- 若要调试此模块,请将其项目生成配置更改为“调试”模式。若要取消显示此消息,请禁用“启动时若没有用户代码则发出警告”调试器选项。
- 在Ubuntu下使用串口调试(二)
- OK6410裸机调试(使用串口,不需要使用JLINK)
- 海思Hi35XX调试串口添加root登录密码
- ucos下用串口做调试口时,接收用户指令的方法
- 调试STM32 串口时的 诡异现象
- am335x在ubuntu下使用StarterWare编写裸机程序并在CCS中用Jlink调试
- windows下调试virtualbox的虚拟机串口
- ubuntu下codeblocks编译器更改调试终端
- WinCE 6.0 增加IOCTL以及在应用中读取调试串口输入
- WinCE中串口通讯的调试方法(虚拟串口软件 Serial Splitter Mobile)