Skip to content
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

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

Closed
prasimix opened this issue Dec 3, 2016 · 7 comments
Labels
Board: Arduino Due Applies only to the Due Type: Bug

Comments

@prasimix
Copy link

prasimix commented Dec 3, 2016

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.

@facchinm
Copy link
Member

facchinm commented Dec 5, 2016

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

@prasimix
Copy link
Author

prasimix commented Dec 5, 2016

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.

@mvladic
Copy link

mvladic commented Dec 7, 2016

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.

@facchinm
Copy link
Member

facchinm commented Dec 7, 2016

@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

@mvladic
Copy link

mvladic commented Dec 8, 2016

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

@facchinm
Copy link
Member

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?

@prasimix
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Board: Arduino Due Applies only to the Due Type: Bug
Projects
None yet
Development

No branches or pull requests

3 participants