-
-
Notifications
You must be signed in to change notification settings - Fork 7k
Better avrdude output #2002
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Better avrdude output #2002
Conversation
I just reduced the verbosity even further (from three -v's to one -v), since I found that avrdude dumps a lot of overly verbose data when using the jtag3 programmer with two or three -v's still. |
One more reason to reduce the verbosity: Every now and then people ask how to run avrdude manually. I'd like to tell them to enable verbose uploads to peek at the commands printed, but due to the high verbosity, the commands scroll out of the buffer before you can properly look at them... I think this PR is ready to merge, would be good if it was indeed merged before the next release. |
Previously, the MessageSiphon class would read characters from an InputStream and then push them to the passed MessageConsumer one line at a time. Now, you can specify a line timeout. Normally, messages are still processed line by line, but if no line ending is received within the specified timeout (counting from the first character in the line), then the incomplete line is passed on as a message, without waiting for the line ending. This feature is used for the uploader command output. In particular, this allows the avrdude progress bar to be shown in the IDE as expected, character by character (previously, the entire progress bar would be buffered, making it show up completely at the end of the upload).
Previously, when verbose uploads were enabled, avrdude was run with four -v options, causing it to dump all raw bytes exchanged with the bootloader. This floods the console so much that meaningful output mostly disappears. Most users probably want to enable verbose mode just to see what avrdude command is ran. Furthermore, users that benefit from the raw bytes dumped are perfectly capable of either running avrdude manually, or modifying platform.txt. Given that, running avrdude with just one -v should be plenty. This fixes arduino#891.
29a6d60
to
cd9a9e3
Compare
I just rebased this against latest |
I agree with you that in most cases the noise produced with verbosity at level 4 hides much more valuable informations at the beginning of the output, BTW I'm not sure that the verbosity with |
Four -v's might be useful in some cases, but those will be very specific cases, where modifying platform.txt is acceptable. Thanks for merging this :-) |
The first commit makes the processing of the uploader output less strictly line-buffered, which makes the avrdude progress bar work in verbose mode.
The second commit reduces the avrdude verbosity, in verbose mode it was spamming more than is productive IMHO.