For padding, I think it depend to SHA256, wich means we have 32 Bytes. So we have to complete the rest of the empty spaces by 1 to reach SHA dimension (32bytes), this of course if the input length doesn't equal Bytes.
Thanks for your comment! There are many ways to do it as long as the Bootloader is a linear one and not FileSystem based. What you said is true also! In other projects we are working on, the size is being transferred in the bin header, to gain time in flashing and verification! Let's say the bin size is 5k but we allocated 64k for application! The bootloader will have to flash the whole 64k even 59k is only padding, so flashing time will be multiplied by 59/5 = 12times which is too much!
For padding, I think it depend to SHA256, wich means we have 32 Bytes. So we have to complete the rest of the empty spaces by 1 to reach SHA dimension (32bytes), this of course if the input length doesn't equal Bytes.
Thanks for your comment! There are many ways to do it as long as the Bootloader is a linear one and not FileSystem based. What you said is true also! In other projects we are working on, the size is being transferred in the bin header, to gain time in flashing and verification! Let's say the bin size is 5k but we allocated 64k for application! The bootloader will have to flash the whole 64k even 59k is only padding, so flashing time will be multiplied by 59/5 = 12times which is too much!