BRT Community

Please login or register.

Login with username, password and session length
Advanced search  

News:

Welcome to the Bridgetek Community!

Please read our Welcome Note

Technical Support enquires
please contact the team
@ Bridgetek Support

Please refer to our website for detailed information on all our products - Bridgetek - Bridging Technology

Author Topic: EVE Asset Builder  (Read 13974 times)

Rudolph

  • Sr. Member
  • ****
  • Posts: 389
    • View Profile
EVE Asset Builder
« on: March 09, 2019, 11:34:02 AM »

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.
Logged

Kaetemi

  • Newbie
  • *
  • Posts: 30
    • View Profile
Re: EVE Asset Builder
« Reply #1 on: March 12, 2019, 10:45:47 AM »

You can supply the newblob command alongside the update command, to write a specific blob, as follows:
Code: [Select]
progflash newblob "unified.blob" update "flash.bin"
Can you verify if the blob in your flash binary (first 4096 bytes) is identical to the stock blob that you're writing?
Logged

Rudolph

  • Sr. Member
  • ****
  • Posts: 389
    • View Profile
Re: EVE Asset Builder
« Reply #2 on: March 15, 2019, 10:53:11 AM »

>You can supply the newblob command alongside the update command

Yes, I know that, this was not my point.
My point was that progflash.exe does look for a file named "unified.blob" even if you do not tell it to.
This file is required by progflash.exe and gets burned to flash every single time althogh it already is included
in the flash-file.
Progflash.exe should not even look for "unified.blob" by default and really should not burn it by default.
If beeing asked to do that, sure, this option sounds usefull. But flashing "unified.blob" or the generated flash image file should be mutually exclusive since the blob already is part of that flash image anyways.

>Can you verify if the blob in your flash binary (first 4096 bytes) is identical to the stock blob that you're writing?

'The "notempty.bin" and "output.bin" are exactly the same for the length of "output.bin".'

Yes, of course, this does include the first 4k.

And to repeat, my problem is not that the EVE Asset Builder is not working or the progflash.exe is not working.
My problem is, that progflash.exe keeps telling me that it fails to write the data to the flash while it works just fine.
It should not be necessary to read back the data every time from the flash only to confirm that progflash.exe thru out a false error message again.

Logged

Kaetemi

  • Newbie
  • *
  • Posts: 30
    • View Profile
Re: EVE Asset Builder
« Reply #3 on: March 18, 2019, 01:42:27 AM »

'The "notempty.bin" and "output.bin" are exactly the same for the length of "output.bin".'

Yes, of course, this does include the first 4k.
To clarify, are the first 4k bytes identical in all three of (1) the flash image, (2) the firmware blob, and (3) the read out data?
Logged

Rudolph

  • Sr. Member
  • ****
  • Posts: 389
    • View Profile
Re: EVE Asset Builder
« Reply #4 on: March 18, 2019, 06:49:09 PM »

>To clarify, are the first 4k bytes identical in all three of (1) the flash image, (2) the firmware blob, and (3) the read out data?

I just compared the "unified.blob" with the generated flash image and these are 100% identical for the length of the "unified.blob".
Logged