folpindo / arduino

Automatically exported from code.google.com/p/arduino
0 stars 0 forks source link

Option to skip verification step on upload. #842

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What change would like to see?

From Nathan Seidle:

"I've been playing with the stk500 serial bootloader and was surprised
the find that v1.0 IDE still does a verify over serial. The way
avrdude in v1.0 currently works is during a serial upload avrdude
pushes the new firmware to the target, then requests the firmware back
from the target to verify that the code was correctly recorded. This
push then pull causes the serial upload process to be twice as long as
it needs to be. Adding a '-V' option to the avrdude call will disable
this verify step.

"I propose adding a check box to the preferences window that allows
people to turn on or off this verify step. Removing this verify step
will cut the upload time in half. Please see this image to see what I
mean: http://sfecdn.s3.amazonaws.com/tutorialimages/VerifyCode.jpg

"This speed-up trick only applies to boards that use the serial/avrdude
type bootloader - ie, every board currently in existence. This doesn't
really matter with the newer USB (HID?) type bootloader that is being
developed for the ATmega32U4 based boards (Leonardo, etc). The USB
native bootloader is so fast, I'm not really worrying about it yet.

"You might say: "Wait! This means we will be pushing firmware to
targets over serial and there's a risk the firmware could become
corrupt! We need verify!" I turned off the avrdude verify step four
years ago and have never had an instance where my serial upload got
corrupted. With modern USB/serial conversion, corruption is very
unlikely. Also, stk500_v2 (used on all Megas currently) uses a CRC on
every packet it pushes. This greatly decreases the chance that we
would have a firmware record error. With this checkbox the small group
of people that are really worried about it can re-enable the verify
step if they so desire. However, the greater mass of users will see an
immediate upload time cut in half (yay!).

"I've successfully implemented this feature in my own sandbox version
of the IDE. There's about 20 lines of code that need to be added to:
\app\src\processing\app\debug\AvrdudeUploader.java
\app\src\processing\app\Preferences.java
\build\windows\work\lib\preferences.txt
\build\shared\lib\preferences.txt

"I don't really mind if this makes the initial v1.0 release or not, but
I would like to see it added at some point. Is this feature something
the group would like to see in the main branch? If so, I'll teach
myself how to do a proper github submission."

Code here: 
https://github.com/nseidle/Arduino/commit/a991811d8ae7148448b9c195028650218edb91
53

Original issue reported on code.google.com by dmel...@gmail.com on 3 Mar 2012 at 6:04

GoogleCodeExporter commented 9 years ago
https://github.com/arduino/Arduino/commit/a292677108ea5f012a726d37f0403f7423fc9e
a3

Original comment by dmel...@gmail.com on 3 Mar 2012 at 6:59