Hi3519AV100开启UART串口-大华hdw1230c-a-v3

1.首先找到内核源码 Hi3519AV100_SDK_V2.0.2.0/osdrv/opensource/kernel/linux-4.9.y

2.修改hi3519av100.dts文件:源码/arch/arm/boot/dts/hi3519av100.dts

&uart0 { status = “okay”; }; &uart1 { //自行加入 status = “okay”; //自行加入 }; //自行加入 &uart2 { //自行加入 status = “okay”; //自行加入 }; //自行加入

3.修改hi3519av100.dtsi文件:源码/arch/arm/boot/dts/hi3519av100.dtsi

aliases { serial0 = &uart0; serial1 = &uart1; //自行加入 serial2 = &uart2; //自行加入 amba { #address-cells = <1>; #size-cells = <1>; compatible = “arm,amba-bus”; ranges; uart0: uart@04540000 { compatible = “arm,pl011”, “arm,primecell”; reg = <0x04540000 0x1000>; interrupts = <0 36 4>; clocks = <&clock HI3519AV100_UART0_CLK>; clock-names = “apb_pclk”; status = “okay”; //由disable改为okay }; uart1: uart@04541000 { compatible = “arm,pl011”, “arm,primecell”; reg = <0x04541000 0x1000>; interrupts = <0 37 4>; clocks = <&clock HI3519AV100_UART1_CLK>; clock-names = “apb_pclk”; dmas = <&hiedmacv310_0 2 2>, <&hiedmacv310_0 3 3>; dma-names = “tx”,”rx”; status = “okay”; //由disable改为okay }; uart2: uart@04542000 { compatible = “arm,pl011”, “arm,primecell”; reg = <0x04542000 0x1000>; interrupts = <0 38 4>; clocks = <&clock HI3519AV100_UART2_CLK>; clock-names = “apb_pclk”; dmas = <&hiedmacv310_0 4 4>, <&hiedmacv310_0 5 5>; dma-names = “tx”,”rx”; status = “okay”; //由disable改为okay };
<

4.打开终端进入到源码目录

cd Hi3519AV100_SDK_V2.0.2.0/osdrv/opensource/kernel/linux-4.9.y

5.拷贝对应的配置文件

cp arch/arm/configs/hi3519av100_xxxxxx_defconfig .config

可选的配置文件如下:

hi3519av100_amp_defconfig hi3519av100_amp_nand_defconfig hi3519av100_amp_emmc_defconfig hi3519av100_smp_defconfig hi3519av100_smp_nand_defconfig hi3519av100_smp_emmc_defconfig

6.编译,进入kernel configuration

make ARCH=arm CROSS_COMPILE=arm-himix200-linux- menuconfig

按照如下配置:

Device Drivers —> Character devices —> Serial drivers —> <*> ARM AMBA PL011 serial port support [*] Support for console on AMBA serial port

保存修改并退出

7.编译生成uImage

make ARCH=arm CROSS_COMPILE=arm-himix200-linux- uImage

8. ls /dev就会查看到 ttyAMA0 ttyAMA1 ttyAMA2 了

版权声明:本文为CSDN博主「十月怀胎肚儿」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。

原文链接:https://blog.csdn.net/u012915226/article/details/119451986原文链接:https://blog.csdn.net/u012915226/article/details/119451986

免责声明:文章内容来自互联网,本站不对其真实性负责,也不承担任何法律责任,如有侵权等情况,请与本站联系删除。
转载请注明出处:Hi3519AV100开启UART串口-大华hdw1230c-a-v3 https://www.yhzz.com.cn/a/11267.html

上一篇 2023-04-21 10:49:35
下一篇 2023-04-21 12:50:08

相关推荐

联系云恒

在线留言: 我要留言
客服热线:400-600-0310
工作时间:周一至周六,08:30-17:30,节假日休息。