Go Down

Topic: INSTRUCTIONS to skip verification (Read 2136 times) previous topic - next topic

ivanseidel

May 12, 2013, 07:48 am Last Edit: May 12, 2013, 07:51 am by ivanseidel Reason: 1
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.
Arduino DueTimer | https://github.com/ivanseidel/DueTimer
Arduino Thread | https://github.com/ivanseidel/ArduinoThread


rowboteer

#2
Feb 15, 2016, 12:09 am Last Edit: Feb 15, 2016, 12:14 am by rowboteer
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:

Code: [Select]

# 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!

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.

rowboteer

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?

Okio

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.

Okio

This 5 minute post period is ridiculous.

rowboteer

@Okio

Made the changes suggested they made no difference  :(

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!

MorganS

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.
GoForSmoke: "What GShield? You never mentioned a shield."

Okio

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.

ghlawrence2000

#10
Feb 19, 2016, 06:15 pm Last Edit: Feb 19, 2016, 06:24 pm by ghlawrence2000
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:-
Code: [Select]
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:-
Code: [Select]
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
UTFT_SdRaw now included in library manager!! ;) High speed image drawing from SD card to UTFT displays for Mega & DUE.
UTFT_GHL - a VASTLY upgraded version of UTFT_CTE. Coming soon to a TFT near you! 8) Shipping April 1 2016!

ubidefeo

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 :)

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

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy