arduino / Arduino

Arduino IDE 1.x

Home Page:https://www.arduino.cc/en/software

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Uploading process stuck on Due if sketch is larger then 256KB and 'Verify code after upload' is set

prasimix opened this issue · comments

An attempt to upload sketch on Due that is larger then 256KB cannot be completed if Verify code after upload option is selected:

Due stuck

To reproduce this step, make sketch that is more then 256KB long or try this eez_psu_sketch where we noticed this bug, go to File... Preferences and select Verify code after upload option and start upload (Ctrl+U).

I tested that with Arduino IDE 1.6.9 and 1.6.13 on Windows and Ubuntu with installed Arduino SAM boards (32-bits ARM cortex-M3) by Arduino package 1.6.9. Board is obviously Arduino Due.

Hi @prasimix ,
thanks for reporting. I tested the sketch (both with and without verify) and it behaves correctly (on Linux). I'm attaching the (super) verbose output in case you are interested or can spot any relevant difference (like the OS in use 🙂 ).
verbose_out.txt

If you enable the verbose output you should see the bossac version; mine is 1.6.1

Thanks for quick response. How can I generate such verbose output file? I tried uploading (not just compiling) once again with selected both Show verbose output during: upload and Verify code after upload options and got the same problem.

I tried with Arduino IDE 1.6.9 on Windows 10 and upload fails during verify as @prasimix reported. Here is the verbose output:

verbose_out.zip

You can see that bossac is version 1.6.1.

@mvladic @prasimix I may have an idea; how long is it taking the upload process? We recently added a check on the IDE to avoid stuck programmers instances which block the serial port (

if (!process.waitFor(2, TimeUnit.MINUTES)) {
)
If your upload takes more than 2 minutes it gets killed forcibly... On my PC it takes far less, but it could be OS dependant

Yes, it takes more than 2 minutes. I tried again and upload blocked after exactly 2 minutes and 30 seconds.

Ok, so we reached a corner case which I never thought it was possible to encounter, my bad.
@cmaglie @PaulStoffregen for your experience, what could be a safe value for MAXIMUM successful upload duration? 3 minutes? 5 minutes?

If 2 minutes is enough for 256KB, 4 minutes should be enough for 512KB :)
Maybe you can link that limit to selected board.