I have a board that is populated with a BT816 and a Winbond 25Q128JVSI.
There also is a FT232H on the board I can connect to from the EVE Asset Builder as "MPSSE".
I generated an "output.bin" with only this "unified.blob" and a single small image in ASTC 8x8 format.
But I can not write it to the FLASH, not even after I resorted to use progflash.exe directly.
D:\FLASH>progflash
Welcome to BT81X Flash Programming Utility V0.0.5
Copyright(c) Bridgetek Pte Ltd All Rights Reserved
Usage: ProgFlash [command] [argument]
module Select Program Module [ FT4222 (default) | MPSSE ]
erase Erase all of flash
newblob Install blob <file_name> in flash
write Write <file_name> to flash (assumes flash is already erased)
update Write <file_name> to flash, erasing if necessary
read Read all of flash into <filename>
D:\FLASH>progflash module MPSSE erase
Information on channel number 0:
Flags=0x2
Type=0x8
ID=0x1b3d0200
LocId=0x433
SerialNumber=0k2LWMY6
Description=USB 2 SPI
ftHandle=0x0
handle=0x6d4330 status=0x0
VC1 register ID after wake up 7c
reg_touch_rz =0x7fff
reg_touch_rzthresh =0xffff
reg_touch_tag_xy=0x80008000
reg_touch_tag=0x0
Progress ERASE 1
Erasing Flash...
Progress ERASE 90
Progress ERASE 100
Erase Flash successfully
DONE!
I was about to additionally ask why erasing takes this long but then I just found that the datasheet for this chip
specifies 40...200 seconds for a chip erase.
Now when I try to write this is what happens:
D:\FLASH>progflash module MPSSE write output.bin
[exactly the same lines repeated as above]
Progress BLOB 1
Writing Blob file ".\unified.blob" to BT81X Flash Storage
Progress PROG 0
Write Blob file ".\unified.blob" to BT81X Flash Storage successfully
Progress WRITE 1
Writing Flash file "output.bin" to BT81X Flash Storage (assumes flash is already erased)
Progress PROG 0
Progress PROG 83
Verify Flash failed!
Write Flash file "output.bin" to BT81X Flash Storage unsuccessfully
Exsiting ...
The first thing that is strange is that progflash.exe insists of writing "unified.blob", it is even required to have a file of that name in the same directory as progflash.exe.
However, genflash.exe always adds this mysterious blob to the first 4096 bytes - and I see no way around this, neither from the Eve Asset builder or from using genflash.exe directly.
So it really looks like progflash.exe is shooting itself in the foot there.
Okay, annother erase then, followed by an update command:
D:\FLASH>progflash module MPSSE update output.bin
...
Progress BLOB 1
Writing Blob file ".\unified.blob" to BT81X Flash Storage
Progress PROG 0
Write Blob file ".\unified.blob" to BT81X Flash Storage successfully
Progress UPDATE 1
Writing Flash file "output.bin" to BT81X Flash Storage, erasing if necessary
Progress PROG 0
Verify Flash failed!
Write Flash file "output.bin" to BT81X Flash Storage unsuccessfully
Exsiting ...
Still does not look like it is working.
A "progflash module MPSSE read empty.bin" after an erase results in a 16MB sized file filled with 0xff.
That is fine, although it would be somewhat nicer if it would not save all the empty pages from the end of the data to the end of the flash and even would not save a file at all for an empty flash.
Why? Well, because that would allow copying the content of a flash from one board to annother even when the second board has a smaller flash than the first one, given of course that the first flash is not full but one would be able tell by the size of the file if it will fit or not.
Also writing only the necessary data should be faster.
Okay, "progflash module MPSSE write output.bin" again and it fails again, or at least it says so.
Followed by "progflash module MPSSE read notempty.bin".
Now I compared this "notempty.bin" to "unified.blod" and "output.bin" and it turned out that I wasted a couple of hours to look into a problem that is not even there.
The "notempty.bin" and "output.bin" are exactly the same for the length of "output.bin".
Please update the EVE Asset Builder, it is still on the first release and out for over six months now, thank you.
And please add a "verify" option to progflash.exe in case you do not already have.