INSTRUCTIONS to skip verification

Hi,
I was getting furious, because my sketch already had 140kb, and was taking about 1 minute to upload.

Then, I figure out how to "skip" verification (The second "stage" of upload).

To disable verification, go to:
ArduinoSoftwareFolder/hardware/arduino/sam/plataform.txt

Then, open it and go to the last line (It's what "calls" bossac to upload the sketch). Find the following section:
"-e -w -v -b"
and alter it to:
"-e -w -b" (just remove the "-v", witch means: VERIFY code after upload).

After all, it should be like this:
tools.bossac.upload.pattern="{path}/{cmd}" {upload.verbose} --port={serial.port.file} -U {upload.native_usb} -e -w -b "{build.path}/{build.project_name}.bin" -R

Save the file, close and open Arduino IDE. Select another plataform and select Arduino Due Programming port just to make shure.

Have fun.

Thank you!

Thanks for this, un-ticking the "Verify code after upload" still does not work for the Due even in IDE 1.6.7 >:(

The file is is a different location in the latest IDE versions.

Now the easiest way to find the location of the file is to use the IDE menu File>Preferences and click the filing system directory link near the bottom of the "Settings" tab on the "Preferences" pop-up screen.

Then burrow down through the folders: packages/arduino/hardware/sam/1.6.6/

(Note the 1.6.6 at the end, even though I am using IDE 1.6.7, your version file path may be different!)

Then edit the platform.txt file as above. You might need to close the IDE and re-open for the change to take effect.

These are the reminder lines I put in the file:

# With verification
# tools.bossac.upload.pattern="{path}/{cmd}" {upload.verbose} --port={serial.port.file} -U {upload.native_usb} -e -w -v -b "{build.path}/{build.project_name}.bin" -R

# Without verification ( -v deleted )
tools.bossac.upload.pattern="{path}/{cmd}" {upload.verbose} --port={serial.port.file} -U {upload.native_usb} -e -w -b "{build.path}/{build.project_name}.bin" -R

I have only had a Due a couple of weeks but have never had the Verify fail myself and it is SO nice to be able to upload sketches in half the time!

Why don't you use the NativeUSB port? For me uploads take around 1 or 2 seconds (~100k bin). Been using it for months and has never failed.

Okio:
Why don't you use the NativeUSB port? For me uploads take around 1 or 2 seconds (~100k bin). Been using it for months and has never failed.

I have only had a Due a couple of weeks so had not tried the Native port, however I have just tried it and these are the results for a 63,852 byte sketch:

Programming port: 12.709s
Native USB port: 21.314s

I have heard the latest IDE is slower for upload but surely not more than 10x slower!

Is there a setting to speed it up, or are you using a different IDE, or is this a driver problem in the PC?

I'd forgotten I'd also modified platform.txt and have also set (forced) the COM port to 9 and speed to 115200 via device manager.

Attached is my platform.txt

Also; I don't use the godawful Arduino IDE. Instead UltraEdit is my editor of choice (I'm a C Dev. normally). Attached are my batch files for both verifying and uploading my current GPS based computer for the bike. These batch files are attached to UltraEdit via custom toolbar icons' with output capturing enabled.

platform.txt (5.31 KB)

This 5 minute post period is ridiculous.

batchfiles.zip (785 Bytes)

@Okio

Made the changes suggested they made no difference :frowning:

A 100Kbytes (i.e. 800kbits) upload would take at least 9s at 115,200 baud plus protocol overhead so you must be somehow running at over 500,000 baud to get 1-2s upload times.

I use a different editor too but it all gets piped through the Arduino compiler configuration setup so I am still not sure how you have achieved such short upload speeds! I don't see how the batch files make a difference either.

In practice it takes quite a while to compile large sketches anyway so I have got into the habit of commenting the code during compilation and uploads!

Okio:
This 5 minute post period is ridiculous.

The complete lack of spam on this forum is also ridiculous.

It shouldn't take you long to get your status up to the point where you're not limited.

rowboteer,
I can't really suggest anything, or anything which isn't already in the platform.txt, Other than suggesting using the batchfile(s) as they make use of --preserve-temp-files, which the IDE does not.
This may not be so important; but I use a RAMDrive (3GB) with all system temp folders redirected to this, which provides a small compile time performance boost.

The Due Native port disregards any setting for Serial speed, and is blazingly fast, I only use Arduino IDE, no special drivers since a clean install of Windows 7 x64. I get 1.5mbps no problem. It should DEFINITELY not be slower than the programming port!!

Native port:-

Sketch uses 50,236 bytes (9%) of program storage space. Maximum is 524,288 bytes.
Atmel SMART device 0x285e0a60 found
Erase flash
done in 0.012 seconds

Write 52528 bytes to flash (206 pages)

done in 1.244 seconds

Verify 52528 bytes of flash

Verify successful
done in 0.825 seconds
Set boot flash true
CPU reset.

Programming Port:-

Sketch uses 50,236 bytes (9%) of program storage space. Maximum is 524,288 bytes.
Atmel SMART device 0x285e0a60 found
Erase flash
done in 0.037 seconds

Write 52528 bytes to flash (206 pages)

done in 10.624 seconds

Verify 52528 bytes of flash

Verify successful
done in 10.272 seconds
Set boot flash true
CPU reset.

Regards,

Graham

Ended up on this post by chance but whilst I'm here I'd like to clarify something which may turn out to be useful to other folks digging into the subject of avrdude which I use a lot :slight_smile:

The Verify option for avrdude is -V (uppercase), while -v (lowercase) stands for verbose.
You can add even more -v (I sometimes use 4) to extend the amount of information you get while talking to the micro-controller.
Goes without saying that removing a -v will indeed save some time since in the Arduino IDE, stdout (the standard output) is directed to the console output and it takes a little time to process the forwarding of text from stdout to the text box in the IDE.

Hope it's interesting/useful
ciao.ubi