找的原理图用的是1g的nand flash,焊接时用的2g的。
现在烧录的根文件系统镜像已经150M了,下载进去后发现有些文件丢失。
应该是nand flash配置的问题吧?
离线
用的nand flash型号是w25n2g,查了下,每页是2048字节。
制作yaffs.img用到的命令是:
mkyaffs2 --inband-tags -p 2048 rootfs_new rootfs_yaffs2_new.img
---------------------------------------------------------------------------------
而且,之前yaffs.img大小是130m时,下载进去,qt程序是完整的,可以运行qt例程。
离线
nuc972的pa6,7,8,9是和nand相关的启动配置,我之前都是悬空的。
cfg7 cfg6 nand flash page size
on on 2KB
on off 4KB
off on 8KB
off off None
cfg9 cfg8 nan flash ecc type
on on BCH T12
ON OFF BCH T15
OFF ON BCH T24
OFF OFF None
我把pa6,7跳线全接上,结果烧录时却提示:
Cannot find NAND(2048,0)
离线
另,群里一朋友说编译uboot时,有个nuc970_evb.h文件,里面有nand flash大小的配置,结果我用的2016版的uboot,倒是能找到这个文件,但在里面却没有找到NAND SIZE相关的。
离线
除了下载usb口外,还有个usb口,不过这个有点问题,插上鼠标或u盘,整个板就不停掉电重启了。
离线
找到之前的rootfs,然后只把qt复制进去,制作为Yaffs.img后,大小为90M多。
烧录到目标板,可以正常运行。
离线
Gentlepig 说:找到之前的rootfs,然后只把qt复制进去,制作为Yaffs.img后,大小为90M多。
烧录到目标板,可以正常运行。是用 4楼 的方法吗?
不是,用nu-writer正常烧录进去的。
离线
130M也可以,至少qt程序没丢,别的不知道。
然后到150M时,下载进去后qt里只有个bin目录其他三个目录没了...
离线
串口输出的调试信息,显示uboot是认出了256M的nand flash。
U-Boot 2016.11 (Jun 15 2019 - 14:28:01 +0800)
CPU: NUC972
Board: NUC970
DRAM: 64 MiB
NAND: 256 MiB
In: serial
Out: serial
Err: serial
Net: emac
Hit any key to stop autoboot: 0
离线
这个软件能校验吗?
不能校验就看能不能读回来,
读回来手动校验,
看看写进去的是否正常。
该软件有校验功能。
刚烧录进去,目标板没有重启时,校验,正常;
烧录进去后,目标板重启但仍进入ibr,校验,也是正常。
是不是我这个yaffs.img文件里有问题?打包的时候没有都包含进来?
那么,如何查看yaffs.img这个镜像文件里的内容呢?
离线
90M的根文件系统也出问题了,折腾了一下午,又烧录进去了。结果发现/usr/目录下,local目录是两个,bin目录是两个,share目录也是两个...
离线
Usb host接口和tf接口都没调好呢...
想试下网口,也不知道怎么配置,总是ping不通。
很尴尬,不知道怎么往目标板拷贝程序。
离线
这是主机上运行?
离线
目标板没这么多命令...
离线
在win下,用Nu-writer擦除nand flash后,再用nu-writer写入那个原来的150M的yaffs.img,qt程序可以运行了...
离线
那说明是没有擦除引起吗?
那前面是怎么校验通过的呢?!
你这么一说也是...
之前校验明明能通过的。
离线
网口搞定了。
进到系统后,执行udhcpc -i eth0命令,就自动配置好网口了。
Usb口,之前插上鼠标,整板反复复位,和板子的usb供电有关,之前是插到了个usb hub上。
现在直接插到电脑的usb口后,目标板的usb host口接鼠标,不会复位了。
但是,鼠标的灯不亮,调试信息:
~ # usb 2-2: new full-speed USB device number 2 using nuc970-ohci
usb 2-2: device descriptor read/64, error -62
usb 2-2: device descriptor read/64, error -62
usb 2-2: new full-speed USB device number 3 using nuc970-ohci
usb 2-2: device descriptor read/64, error -62
usb 2-2: device descriptor read/64, error -62
usb 2-2: new full-speed USB device number 4 using nuc970-ohci
usb 2-2: device not accepting address 4, error -62
usb 2-2: new full-speed USB device number 5 using nuc970-ohci
usb 2-2: device not accepting address 5, error -62
hub 2-0:1.0: unable to enumerate USB device on port 2
离线
谢谢,我试试。
离线
USB 封装画反了...
我说这usb信号线怎么这么绕啊。
离线
把usb座焊下来,在底层焊上,这样顺序就对上了。
插上Usb鼠标后:
usb 2-2: USB disconnect, device number 2
鼠标有亮度,但不可调。
离线
开机后,插鼠标,提示找到device number2.
number1估计是usb otg那个接口吧,现在接着电脑u口来給板子供电。
然后插上u盘,认出来了。
BusyBox v1.22.1 (2016-02-03 14:11:04 CST) built-in shell (ash)
Enter 'help' for a list of built-in commands.
-/bin/sh: /mnt/mmcblk0p1/scan_zbar: not found
~ # usb 2-2: new low-speed USB device number 2 using nuc970-ohci
usb 2-2: USB disconnect, device number 2
usb 2-2: new low-speed USB device number 3 using nuc970-ohci
usb 2-2: USB disconnect, device number 3
usb 1-2: new high-speed USB device number 4 using nuc970-ehci
usb-storage 1-2:1.0: USB Mass Storage device detected
scsi0 : usb-storage 1-2:1.0
scsi 0:0:0:0: Direct-Access Kingston DataTraveler 3.0 PMAP PQ: 0 ANSI: 6
sd 0:0:0:0: [sda] 30320640 512-byte logical blocks: (15.5 GB/14.4 GiB)
sd 0:0:0:0: [sda] Write Protect is off
sd 0:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DA
sda: sda1
sd 0:0:0:0: [sda] Attached SCSI removable disk
FAT-fs (sda1): Volume was not properly unmounted. Some data may be corrupt. Ple.
[Mount VFAT]: /dev/sda1 --> /mnt/sda1
-------------------------------------------------------------------
U盘可以挂载,可以看到里面的内容。
鼠标只能在qt程序下试看它动不动,也许是编译qt时没有指定鼠标为输入设备?
但是退出qt程序,在命令提示符下,接键盘,按按键,在串口调试信息里看不到反应。
最近编辑记录 Gentlepig (2019-07-03 17:10:17)
离线
USB问题已解决。
需要在内核配置时设置USB HID相关选项,具体可参考bsp手册。之前我只配置了USB HOST部分,HID部分没有设,所以认不出鼠标和键盘。
离线
退出qt程序后,usb鼠标每隔几十秒,会自动断开然后重连。不知道这算不算个问题。
/usr/local # usb 2-2: USB disconnect, device number 2
usb 2-2: new low-speed USB device number 3 using nuc970-ohci
input: Logitech USB Optical Mouse as /devices/platform/nuc970-ohci/usb2/2-2/2-21
hid-generic 0003:046D:C077.0002: input: USB HID v1.11 Mouse [Logitech USB Optic0
usb 2-2: USB disconnect, device number 3
usb 2-2: new low-speed USB device number 4 using nuc970-ohci
input: Logitech USB Optical Mouse as /devices/platform/nuc970-ohci/usb2/2-2/2-22
hid-generic 0003:046D:C077.0003: input: USB HID v1.11 Mouse [Logitech USB Optic0
usb 2-2: USB disconnect, device number 4
usb 2-2: new low-speed USB device number 5 using nuc970-ohci
input: Logitech USB Optical Mouse as /devices/platform/nuc970-ohci/usb2/2-2/2-23
hid-generic 0003:046D:C077.0004: input: USB HID v1.11 Mouse [Logitech USB Optic0
usb 2-2: USB disconnect, device number 5
usb 2-2: new low-speed USB device number 6 using nuc970-ohci
input: Logitech USB Optical Mouse as /devices/platform/nuc970-ohci/usb2/2-2/2-24
hid-generic 0003:046D:C077.0005: input: USB HID v1.11 Mouse [Logitech USB Optic0
usb 2-2: USB disconnect, device number 6
usb 2-2: new low-speed USB device number 7 using nuc970-ohci
input: Logitech USB Optical Mouse as /devices/platform/nuc970-ohci/usb2/2-2/2-25
hid-generic 0003:046D:C077.0006: input: USB HID v1.11 Mouse [Logitech USB Optic0
usb 2-2: USB disconnect, device number 7
usb 2-2: new low-speed USB device number 8 using nuc970-ohci
input: Logitech USB Optical Mouse as /devices/platform/nuc970-ohci/usb2/2-2/2-26
hid-generic 0003:046D:C077.0007: input: USB HID v1.11 Mouse [Logitech USB Optic0
usb 2-2: USB disconnect, device number 8
usb 2-2: new low-speed USB device number 9 using nuc970-ohci
input: Logitech USB Optical Mouse as /devices/platform/nuc970-ohci/usb2/2-2/2-27
hid-generic 0003:046D:C077.0008: input: USB HID v1.11 Mouse [Logitech USB Optic0
usb 2-2: USB disconnect, device number 9
usb 2-2: new low-speed USB device number 10 using nuc970-ohci
input: Logitech USB Optical Mouse as /devices/platform/nuc970-ohci/usb2/2-2/2-28
hid-generic 0003:046D:C077.0009: input: USB HID v1.11 Mouse [Logitech USB Optic0
usb 2-2: USB disconnect, device number 10
usb 2-2: new low-speed USB device number 11 using nuc970-ohci
input: Logitech USB Optical Mouse as /devices/platform/nuc970-ohci/usb2/2-2/2-29
hid-generic 0003:046D:C077.000A: input: USB HID v1.11 Mouse [Logitech USB Optic0
usb 2-2: USB disconnect, device number 11
usb 2-2: new low-speed USB device number 12 using nuc970-ohci
input: Logitech USB Optical Mouse as /devices/platform/nuc970-ohci/usb2/2-2/2-20
hid-generic 0003:046D:C077.000B: input: USB HID v1.11 Mouse [Logitech USB Optic0
usb 2-2: USB disconnect, device number 12
usb 2-2: new low-speed USB device number 13 using nuc970-ohci
input: Logitech USB Optical Mouse as /devices/platform/nuc970-ohci/usb2/2-2/2-21
hid-generic 0003:046D:C077.000C: input: USB HID v1.11 Mouse [Logitech USB Optic0
usb 2-2: USB disconnect, device number 13
usb 2-2: new low-speed USB device number 14 using nuc970-ohci
input: Logitech USB Optical Mouse as /devices/platform/nuc970-ohci/usb2/2-2/2-22
hid-generic 0003:046D:C077.000D: input: USB HID v1.11 Mouse [Logitech USB Optic0
usb 2-2: USB disconnect, device number 14
usb 2-2: new low-speed USB device number 15 using nuc970-ohci
input: Logitech USB Optical Mouse as /devices/platform/nuc970-ohci/usb2/2-2/2-23
hid-generic 0003:046D:C077.000E: input: USB HID v1.11 Mouse [Logitech USB Optic0
离线