dm3730调试笔记
開發環境ubuntu11.04
1.usb 轉串口:minicom 配置。lsusb看是否有對應到usb口,無到話要安裝驅動(一般可以看到廠家提供到驅動和相對應到該設備名字);有到話看ls /dev/ttyUSB0是否存在
?
然后是簡單到陪在minicom -s
+-----------------------------------------------------------------------+
??? | A -??? Serial Device????? : /dev/ttyUSB0 ???????????????????????????? |
??? | B - Lockfile Location???? : /var/lock???????????????????????????????? |
??? | C -?? Callin Program????? :?????????????????????????????????????????? |
??? | D - Callout Program????? :?????????????????????????????????????????? |
??? | E -??? Bps/Par/Bits?????? : 115200 8N1??????????????????????????????? |
??? | F - Hardware Flow Control : No ?????????????????????????????????????? |
??? | G - Software Flow Control : No??????????????????????????????????????? |
??? |?????????????????????????????????????????????????????????????????????? |
??? |??? Change which setting????
?
一般串口是ttyS0,在串口轉usb中,USB是0還是1自己查看后確定。
?
ADB over ethernet
?
1.首先讓android手機監聽指定的端口:
這一步需要使用shell,因此手機上要有終端模擬器,不過網上很多,隨便找個就行了,依次敲入下列幾行:
| 1 2 3 4 | su//獲取root權限 setprop service.adb.tcp.port5555//設置監聽的端口,端口可以自定義,如5554,5555是默認的 stop adbd//關閉adbd start adbd//重新啟動adbd |
2.手機連接wifi并確保手機和電腦連接同一個網絡,記下手機的ip地址,假設為a.b.c.d
3.電腦上打開命令提示符,敲入以下命令:
?| 1 | adb connect a.b.c.d//如果不輸入端口號,默認是5555,自定義的端口號必須寫明,對應第1步中自定義的端口號,例如:a.b.c.d:5554 |
4.配置成功,命令行顯示:“connected to a.b.c.d”,然后就可以調試程序了,^_^。
?
現在ADB已經完成了usb,wifi,有線ethernet
?
一個晚上到成果
?
?
3.DM3730 掛載文件系統
本操作是使用網絡下載內核,前提是需要配置好tftp和nfs(一般現在也可以使用usb,otg,uart等等)
tftp :vim/etc/xinetd.d/tftp
/etc/init.d/xinetd restart
nfs :vim /etc/exports
/etc/init.d/nfs-kernel-server restart
nfs配置時,使用,no_root_squash這個參數,使訪問nfs時的權限以root訪問。不要使用no_subtree_check..??? 同時文件系統使用chmod 777 -R rootfs.
.
boot下參數設置:
?
setenvbootargs 'init=/init console=ttyO0,115200n8 rootfs=/dev/nfs
ip=169.254.7.210:169.254.7.218:169.254.255.255:255.255.0.0 rw
rootdelay=3 nfsroot=169.254.7.218:/home/linux/android_rootfs,nolock
mem=256Mnoinitrd androidboot.console=ttyO0 vram=8M omapfb.vram=0:8M '
(參考TI 的用戶手冊)
setenvserverip 192.168.1.38
setenvipaddr 192.168.1.48 //用于TFTP
setenv bootcmd 'tftp 0x82000000 uImage;bootm' //boot不進入終端,自動跳過后執行到命令
saveenv
?
3 TI有2種nand ,onenand 和nand 配置,3730內部不存在onenand :onenand 是兼容了nand 和nor 的特性,常常用于3G移動通信等等。
簡單介紹下nandflash啟動的配置,
?
nand啟動參數設置
setenvserverip 169.254.7.218
setenvipaddr 169.254.7.210 //用于TFTP
加載各系統鏡像x-loader,kernel,rootfs,uboot
?
?
setenvnandboot ' nand read 0x82000000 0x280000 0x500000 '
setenvbootcmd 'run nandboot ; bootm 0x82000000 '配置kernel啟動從flash加載內核到內存0x82000000,啟動bootcmd
saveenv
?
Flashing x-loader
To flash MLO (x-load.bin.ift) to the NAND Flash, execute the commands listed below:
OMAP3_EVM? tftp 0x80000000 MLO
OMAP3_EVM nand erase 0x0 0x50000
OMAP3_EVM nandecc hw 2
OMAP3_EVM? nand write 0x80000000 0x0 0x50000
Flashing U-boot
To flash u-boot.bin to the NAND Flash, execute the commands listed below:
OMAP3_EVM tftp 0x80000000 u-boot.bin
OMAP3_EVM nand erase 0x80000 0x1C0000
OMAP3_EVM nandecc hw 2
OMAP3_EVM nand write 0x80000000 0x80000 0x1C0000
?
Flashing Linux kernel
To flash uImage to the NAND Flash execute the commands listed below:
OMAP3_EVM? tftp 0x80000000 uImage
OMAP3_EVM? nand erase 0x280000 <kernel image size>
OMAP3_EVM? nandecc hw 1
OMAP3_EVM? nand write 0x80000000 0x280000 <kernel image size>
同理文件系統下載,但是貌似由于我的系統過大,在80000000處會下載不成功,改為82000000就可以了,可能是中間端有壞塊寫不下去
setenvbootargs 'init=/init console=ttyO0,115200n8 noinitrd ip=offandroidboot.console=ttyO0 rootwait mem=256Momap_vout.vid1_static_vrfb_alloc=y rw ubi.mtd=4,2048 rootfstype=ubifsroot=ubi0:rootfs rootdelay=2 vram=8M omapfb.vram=0:8M '
?
?
?
?
nfs 參數:
?
?
setenvbootargs init=/init console=ttyO0,115200n8ip=192.168.1.48:192.168.1.1:255:255:255.0 rwrootdelay=3root=/dev/nfsnfsroot=192.168.1.38:/home/zhangfang/zf/DM3730/source/out/target/product/omap3evm/android_rootfs,nolockmem=256M noinitrd androidboot.console=ttyO0 vram=8M omapfb.vram=0:8M
轉載于:https://www.cnblogs.com/tuotuteng/p/3859728.html
總結
以上是生活随笔為你收集整理的dm3730调试笔记的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: IE被改:http://www.686d
- 下一篇: 计算机b级考试基础知识,全国计算机等级考