PaulStoffregen / teensy_loader_cli

Command line Teensy Loader
http://www.pjrc.com/teensy/loader_cli.html
332 stars 152 forks source link

Add boot only flag, '-b' #17

Closed mct closed 8 years ago

mct commented 8 years ago

Fixes #16

PaulStoffregen commented 8 years ago

This patch appears to discard usage of "write_size" and replaces it with a fixed number. I can not merge it for that reason.

mct commented 8 years ago

Oh, you're right, thank you. I had misread the protocol specification such that I thought the block size was always 128, but clearly that's wrong.

I modified boot() to take the write_size value from main(), and also to re-use main()'s existing buffer. For the new boot_only option, it uses a write_size of block_size + 2.