Bridgetek / pico-brteve

Example code and utility to make Raspberry Pi/Raspberry Pi Pico work with Eve GPU from BridgeTek. https://brtchip.com/eve/
MIT License
8 stars 5 forks source link

- pad the input file to 4096 and fill with 0xff #27

Closed RudolphRiedel closed 1 year ago

RudolphRiedel commented 1 year ago

See this discussion: https://github.com/RudolphRiedel/FT800-FT813/discussions/88

Flashing from Pi-Pico is not working correctly. EAB is not padding the flash image files to 4096 bytes. uf2conv4eve.py / uf2conv4eve.exe is not padding the flash image files to 4096 bytes and fails if the .bin file is less than 8192 bytes. eve_flash_pico.uf2 is not padding the .uf2 image to 4096 bytes but is using CMD_FLASHUPDATE

As I could not change EAB to use 4096 bytes padding and changing eve_flash_pico.uf2 would have been more complicated, I went for uf2conv4eve.py. At least the resulting .uf2 files are generated with padding to 4096 bytes now.

RudolphRiedel commented 1 year ago

I also just removed the +255 from the line: numblocks_file = (((len(file_content)|4095)+1) - EVE_FLASH_FIRMWARE_SIZE + 255) // 256 -> numblocks_file = (((len(file_content)|4095)+1) - EVE_FLASH_FIRMWARE_SIZE) // 256

I have no idea how to add this commit to this pull-request or if that is even possible.