hexeguitar / CH55x_python_flasher

Python based flash/verify tool for the CH55x MCUs
GNU General Public License v3.0
15 stars 3 forks source link

fix binary file validation by accepting small files #1

Closed ghost closed 4 years ago

ghost commented 4 years ago

Reduce filesize requirement for validation to account for smaller blink-LED type files.

ghost commented 4 years ago

Alternatively, I could propose a >0 check. What do you think? I chose 32 as a power of two that kept to the spirit of your implementation.

hexeguitar commented 4 years ago

I have just tried to compile a very simple blink example for CH551, just a clock config, delay routine and port toggling. The firmware was 235 bytes, so yes, the 255 limit is too high. I'm using SDCC 4.0. I have picked up that part from Aarons script which i used as base. I think just a >0 check would be ok here.