As D wrote: > Now I see that the guy who invented this feature was trying to save > some space on his HDD but it is not polite to program in such a way.
Actually, it started out as a feature/enhancement request, initially only applied to the S-Record output routines (SVN r330), but then generalized (SVN r331), back in 2003. No, I don't think saving disk space was the major issue there. It's rather that most people simple are not interested in seeing those bytes at all, as they don't carry any information – these days, where controllers with 128 and more KiB of flash are pretty standard, even more than 12 years ago when it was introduced. If you have an ATxmega256* filled with just 1 KiB, and read it back, you'll have a hard time spotting your actual flash data in the lengthy file. > I waste about 2 days to discover this undocumented feature I agree that it being not documented is a bug. Besides of documenting it properly, what do you think about issuing a warning message in case the readout yielded no non-0xFF flash data, and thus results in an empty file? > if you do read and then just make verify then avrdude will crash with > divided by zero "feature"... :) That's been another bug, but one that has already been fixed since: https://savannah.nongnu.org/bugs/?40142 Just to make sure: $ ./avrdude -c stk500v2 -P /dev/cuaU2 -p m16 -U fl:v:foo.bin:r avrdude: AVR device initialized and ready to accept instructions Reading | ################################################## | 100% 0.01s avrdude: Device signature = 0x1e9403 (probably m16) avrdude: verifying flash memory against foo.bin: avrdude: load data flash data from input file foo.bin: avrdude: input file foo.bin contains 0 bytes avrdude: reading on-chip flash data: Reading | ################################################## | 100% 0.00s avrdude: verifying ... avrdude: 0 bytes of flash verified avrdude done. Thank you. > PS: Nobody(Google, Yandex) knows about this feature by the way.... heck... > time wasted... It's probably hard to find the correct keywords for search engines to find about this. пока, -- cheers, Joerg .-.-. --... ...-- -.. . DL8DTL http://www.sax.de/~joerg/ Never trust an operating system you don't have sources for. ;-) _______________________________________________ avrdude-dev mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/avrdude-dev
