I am working on a HTTP firmware bootloader. The application will download the latest firmware.bin file from a local server and store it in Flash via NVM. NVM requires I write a page at a time which is 64 bytes. The problem I am having is when the WINC1500 xplained pro downloads the file, it doesn't receive the bytes evenly. Some packets are less then 64bytes. For example:
My firmware file size is 10260k
1st packet size: 62 bytes
2nd packet size : 64
3rd packet size: 64
4th packet size: 64
5th packet size: 43
6th packet size: 64
last packet: length: 7
and so on. When I write to NVM, I get a lot of empty data e.g. 00 I call 'padding', which I believe is preventing the firmware from loading. So my question is, does having a lot empty data ''padding' effect how the firmware will run?
Example. The highlighted sections are "padding" required for NVM.