全志A133开发板安卓系统调试串口复用成普通串口方法-触觉智能EVB1309
<div class='showpostmsg'> 本帖最后由 Industio_触觉智能 于 2024-9-27 09:20 编辑<p data-track="2">本文介绍了在开发板/主板串口接口不够的情况下,可将调试串口改为普通串口使用,下面为大家分享修改方法。基于触觉智能<strong>EVB1309开发板</strong>演示,搭载全志A133芯片,具有高性能超低功耗优势,待机功耗低至15mW。</p>
<p> </p>
<p data-track="4"><strong>1、内核配置</strong></p>
<p data-track="5">源码longan目录执行以下命令进入内核配置项界面。</p>
<pre>
<code>./build.sh menuconfig</code></pre>
<p data-track="7"> </p>
<p data-track="8">根据以下路径进入Serial drivers界面,通过键盘上下键选中Console on SUNXI UART port配置项后,按下空格键选中。</p>
<p data-track="9">路径:Device Drivers -> Character devices -> Serial drivers</p>
<p><img _height="563" border="0" src="https://p3-sign.toutiaoimg.com/tos-cn-i-6w9my0ksvp/a62c5bc4c68b42c2ae7d2828c26c42d6~noop.image?_iz=58558&from=article.pc_detail&lk3s=953192f4&x-expires=1727952086&x-signature=XAMJrD2fYakw7Vcl9H2FcUoP8B4%3D" width="1080" /></p>
<p data-track="11">选择后通过键盘左右键移动到Save,按下键盘ENTER键,弹出确认框后默认在OK选项,继续按下ENTER键确定即可完成配置。</p>
<p> </p>
<p><img _height="563" border="0" src="https://p3-sign.toutiaoimg.com/tos-cn-i-6w9my0ksvp/7ec7a2babe5c46b4a75d34795c84bde6~noop.image?_iz=58558&from=article.pc_detail&lk3s=953192f4&x-expires=1727952086&x-signature=FtSmJwyDC1BPQFCnR3yQdCMmonE%3D" width="1080" /></p>
<p data-track="13">继续按下ENTER键确定退出。</p>
<p><img _height="563" border="0" src="https://p3-sign.toutiaoimg.com/tos-cn-i-6w9my0ksvp/23af939b66804bceb9bd115d5579a7af~noop.image?_iz=58558&from=article.pc_detail&lk3s=953192f4&x-expires=1727952086&x-signature=3icU5roCYRdIT42dvOjcQ0TwVy4%3D" width="1080" /></p>
<p> </p>
<p data-track="15">通过键盘左右键移动到Exit,按下ENTER键退出核配置项界面。</p>
<p><img _height="563" border="0" src="https://p26-sign.toutiaoimg.com/tos-cn-i-6w9my0ksvp/a983747c4f58407e8dde539f324d3e1a~noop.image?_iz=58558&from=article.pc_detail&lk3s=953192f4&x-expires=1727952086&x-signature=81IfRkoPxJGrVB%2Fkwr2Wb0w87fo%3D" width="1080" /></p>
<p> </p>
<p data-track="17">保存配置后将在kernel/linux- 4.9/生成.config配置,进入kernel/linux- 4.9/目录下将配置重命名为:</p>
<p data-track="18">sun50iw10p1smp_a133_android_defconfig</p>
<p data-track="19">然后拷贝到下面目录下:</p>
<p data-track="20">kernel/linux-4.9/arch/arm64/configs/</p>
<pre>
<code>cd kernel/linux-4.9/
mv .config sun50iw10p1smp_a133_android_defconfig
cp sun50iw10p1smp_a133_android_defconfig arch/arm64/configs/</code></pre>
<p data-track="22"> </p>
<p data-track="23"><strong>2、屏蔽掉earlyprintk和console项</strong></p>
<p data-track="24">复制代码修改以下文件:</p>
<p data-track="25">longan/device/config/chips/a133/configs/default/env.cfg</p>
<pre>
<code>#kernel command arguments
-earlyprintk=sunxi-uart,0x05000000
+#earlyprintk=sunxi-uart,0x05000000
initcall_debug=0
-console=ttyS0,115200
+#console=ttyS0,115200
nand_root=/dev/nand0p4
mmc_root=/dev/mmcblk0p4
init=/init</code></pre>
<p data-track="27"> </p>
<p data-track="29"><strong>3、屏蔽uart_para选项</strong></p>
<p data-track="30">复制代码修改以下文件:</p>
<p data-track="31">longan/device/config/chips/a133/configs/c3/sys_config.fex</p>
<pre>
<code>--- a/longan/device/config/chips/a133/configs/dpf/sys_config.fex
+++ b/longan/device/config/chips/a133/configs/dpf/sys_config.fex
@@ -127,10 +127,10 @@ pc_bias = 1800
auto_print_used = 1
-
-uart_debug_port = 0
-uart_debug_tx = port:PB09<2><1><default><default>
-uart_debug_rx = port:PB10<2><1><default><default>
+;
+;uart_debug_port = 0
+;uart_debug_tx = port:PB09<2><1><default><default>
+;uart_debug_rx = port:PB10<2><1><default><default>
jtag_enable = 1</code></pre>
<p data-track="33"> </p>
<p> </p>
<p data-track="34"><strong>4、重新编译</strong></p>
<p data-track="35">重新编译内核和源码后,将固件烧录到主板,开机接入调试串口内核将不会有调试串口打印。</p>
<p><img _height="563" border="0" src="https://p3-sign.toutiaoimg.com/tos-cn-i-6w9my0ksvp/1b14877d05ae4338a5af986c359c1bc2~noop.image?_iz=58558&from=article.pc_detail&lk3s=953192f4&x-expires=1727952086&x-signature=oRxKus8A2IzU0Fbg0t8Yh%2BPfKVA%3D" width="1080" /></p>
</div><script> var loginstr = '<div class="locked">查看本帖全部内容,请<a href="javascript:;" style="color:#e60000" class="loginf">登录</a>或者<a href="https://bbs.eeworld.com.cn/member.php?mod=register_eeworld.php&action=wechat" style="color:#e60000" target="_blank">注册</a></div>';
if(parseInt(discuz_uid)==0){
(function($){
var postHeight = getTextHeight(400);
$(".showpostmsg").html($(".showpostmsg").html());
$(".showpostmsg").after(loginstr);
$(".showpostmsg").css({height:postHeight,overflow:"hidden"});
})(jQuery);
} </script><script type="text/javascript">(function(d,c){var a=d.createElement("script"),m=d.getElementsByTagName("script"),eewurl="//counter.eeworld.com.cn/pv/count/";a.src=eewurl+c;m.parentNode.insertBefore(a,m)})(document,523)</script> <p>待机功耗低至15mW,真牛</p>
页:
[1]