板子bootmode[0:4]设置为11001,16bit_nand,所以bootmode[12]设置为1,在CCS下运行nand-flash-writer.out,擦除之后写入u-boot.min.nand,编译之前ddr寄存器都已经修改好了。烧写过程也没有错误,但是重启上电uart0并没有打印。后来在http://processors.wiki.ti.com/index.php/TI81XX_PSP_UBOOT_User_Guide#Flashing_U-Boot_using_CCS看到
- When using memory boot (NAND/SPI) a header needs to be attached to the U-Boot binary indicating the the load address and the size of the image. SPI boot also requires endian conversion before flashing the image.
似乎往nand烧写要加偏移吗?但是偏移要加多大呢?
下面是CCS运行nand烧写信息
[CortexA8] Welcome to CCS Nand Flash Utility
Choose your operation
Enter 1 ---> To Flash an Image
Enter 2 ---> To ERASE the whole NAND
Enter 3 ---> To EXIT
1
Enter image file path
D:\work\u-boot.min.nand
Enter offset (in hex):
0
Choose the ECC scheme from given options :
Enter 1 ---> BCH 8 bit
Enter 2 ---> HAM
Enter 3 ---> T0 EXIT
Please enter ECC scheme type :
1
Starting NETRA NAND writer
The NAND Flash is ONFI compatible
----------------------
NAND FLASH DETAILS
----------------------
Device ID : 0xca
Manufacture ID : 0x2c
Page Size : 2048 Bytes
Spare Size : 64 Bytes
Pages_Per_Block : 64
Number_of_Blocks : 2048
Device_width : 2 Byte
DeviceSize : 256 MB
Setting the ECC scheme
Set the BCH 8 bit ECC scheme .... done
Preparing to Flash image ....
Opening image ... done.
Erasing Required Blocks [start = 0, count = 1]...Done
Flashing image ...
Number of blocks needed for header and data: 0x1
Attempting to start write in block number 0x0.
Writing image data to Block 0 Page0x0
Writing image data to Block 0 Page0x1
Writing image data to Block 0 Page0x2
Writing image data to Block 0 Page0x3
Writing image data to Block 0 Page0x4
Writing image data to Block 0 Page0x5
Writing image data to Block 0 Page0x6
Writing image data to Block 0 Page0x7
Writing image data to Block 0 Page0x8
Writing image data to Block 0 Page0x9
Writing image data to Block 0 Page0xa
Writing image data to Block 0 Page0xb
Writing image data to Block 0 Page0xc
Writing image data to Block 0 Page0xd
Writing image data to Block 0 Page0xe
Writing image data to Block 0 Page0xf
Writing image data to Block 0 Page0x10
Writing image data to Block 0 Page0x11
Writing image data to Block 0 Page0x12
Writing image data to Block 0 Page0x13
Writing image data to Block 0 Page0x14
Writing image data to Block 0 Page0x15
Writing image data to Block 0 Page0x16
Writing image data to Block 0 Page0x17
Writing image data to Block 0 Page0x18
Writing image data to Block 0 Page0x19
Writing image data to Block 0 Page0x1a
Writing image data to Block 0 Page0x1b
Writing image data to Block 0 Page0x1c
Writing image data to Block 0 Page0x1d
Writing image data to Block 0 Page0x1e
Writing image data to Block 0 Page0x1f
Writing image data to Block 0 Page0x20
Writing image data to Block 0 Page0x21
Writing image data to Block 0 Page0x22
Writing image data to Block 0 Page0x23
Writing image data to Block 0 Page0x24
Writing image data to Block 0 Page0x25
Writing image data to Block 0 Page0x26
Writing image data to Block 0 Page0x27
Writing image data to Block 0 Page0x28
Writing image data to Block 0 Page0x29
Writing image data to Block 0 Page0x2a
Writing image data to Block 0 Page0x2b
Writing image data to Block 0 Page0x2c
Writing image data to Block 0 Page0x2d
Application is successfully flashed
NAND flashing successful!