Debug nuc977 connection nandflash (MT29F4G08ABAEAWP) summary
First, git the latest version of nu-write and uboot online at https://github.com/OpenNuvoton/
The old version of nu-write cannot write the content of nandflash page size 4KB T12
Secondly, the circuit cfg[7:6] must be configured as 4KB cfg[9:8] as T12 (the reason is the nand chip oob224)
Again, modify the uboot source directory
u-boot startup: drivers/mtd/nand/nand_ids.c
spl start with: board/nuvoton/nuc970/my_nand_ids.c
join in
See the chip manual for the reason
This will start.
Finally, make the ubi file system
sudo mkfs.ubifs -q -F -r rootfs -m 4096 -e253952 -c 1900 -o nuc972_ubifs_4096.img
sudo ubinize -o root-4096.bin -m 4096 -p256KiB -s 4096 -O 4096 ubinize_4096.cfg
There is a nu-write tool issue
Our Nu-Writer (2018/04/10-V01) NANDFLASH (Micron MT29F4G08ABAEAWP) mode is in 4K T12 mode, when the NANDFLASH has programmed the content, it cannot be erased.
Solution: use the old version of the tool to burn the u-boot.bin tool into the ddr and run the nand erase.chip command