It seems that esptool-ck fails to write tiny files to flash. If I write a file with less than 680 bytes, all looks well on the protocol side but nothing actually gets stored in the flash. So with 679 bytes it fails, with 680 bytes it works OK.
Other tools seem to work around this bug (probably a bug in the ESP8266 ROM) by padding the data to BLOCKSIZE_FLASH.
I have created this commit to enable padding (with 0xff) the last block of every file to BLOCKSIZE_FLASH. This effectively solves the issue of writing small files to the flash. It does not have negative side effects since the flash gets erased in quantities larger than BLOCKSIZE_FLASH anyways.
It seems that esptool-ck fails to write tiny files to flash. If I write a file with less than 680 bytes, all looks well on the protocol side but nothing actually gets stored in the flash. So with 679 bytes it fails, with 680 bytes it works OK.
Other tools seem to work around this bug (probably a bug in the ESP8266 ROM) by padding the data to BLOCKSIZE_FLASH.
I have created this commit to enable padding (with 0xff) the last block of every file to BLOCKSIZE_FLASH. This effectively solves the issue of writing small files to the flash. It does not have negative side effects since the flash gets erased in quantities larger than BLOCKSIZE_FLASH anyways.