烧写流程如下:
jlink命令行下
- h
- loadbin E:flqspifsbl.bin 0x20000 #fsbl较小忽略
- setPC 0x20000
- g
- WaitHalt
- loadbin E:flqspiBOOT.bin 0x01000000
- loadbin E:flqspiimage.bin 0x02000000
- loadbin E:flqspijlink_exe_DDR_uartu-boot_DDR_uart.bin 0x04000000 #u-boot较小忽略
- setPC 0x04000000
- g
进入u-boot后
- sf probe
- sf erase 0x0 +0xc0000
- sf write 0x01000000 0x0 0xc0000
- sf erase 0xc0000 +0x820000
- sf write 0x02000000 0xc0000 0x820000
综上,耗费时间较多的部分为
jlink部分,为load需要烧写的image,比较耗时
loadbin E:flqspiimage.bin 0x02000000
jlink下有命令是测试速度的,8MB speed 15000KHz 大概花费15秒
J-Link>speed 15000
Selecting 15000 kHz as target interface speed
J-Link>TestWSpeed 0x10000000 0x820000
Speed test: Writing 8 * 8320kb into memory @ address 0x10000000 ........
8320 kByte written in 14193ms ! (600 KByte/sec)
J-Link>TestWSpeed 0x10000000 0x820000
Speed test: Writing 8 * 8320kb into memory @ address 0x10000000 ........
8320 kByte written in 15281ms ! (557 KByte/sec)
loadbin E:flqspiimage.bin 0x02000000 #8MB speed 15000KHz 大概花费30秒
loadbin时间分为两部分:1.从硬盘取数据(和上位机电脑有关),2.将数据通过jtag写入ddr(和jtag速度有关)
u-boot部分,是erase和write
50MHz 8MB 大概在40s左右
jlink部分可以参考UM08001_JLink.pdf和UM08002_JLinkDLL.pdf
u-boot方面可参考https://blog.csdn.net/zhaoxinfan/article/details/79417696
等空下来再细细研究。