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

An error occurred while uploading the sketch #517

Open
Ozista opened this issue Jul 25, 2019 · 14 comments
Open

An error occurred while uploading the sketch #517

Ozista opened this issue Jul 25, 2019 · 14 comments

Comments

@Ozista
Copy link

Ozista commented Jul 25, 2019

Hi, I have just downloaded the latest (2 days old) new version of "cnc_ctrl_v1" Maslow firmware. I have an AT Mega 2560 Chinese board. While uploading the sketch, the diodes flashing for 1 second, then long after (<15 sec) the message "An error occurred while uploading the sketch".

I have successfully uploaded the Exaplesample/Basic/Blink sketch from the file menu of my Arduino Ver. 1.8 9 and my USB port used is #9.

Thank you in advance for any ideas on the above error.

@blurfl
Copy link
Collaborator

blurfl commented Jul 25, 2019

I get that error message when I forget to quit the GroundControl program before programming the Arduino. Both programs try to use the serial connection to the Mega. See if that's the issue, let us know what you find.

@Ozista
Copy link
Author

Ozista commented Jul 26, 2019 via email

@blurfl
Copy link
Collaborator

blurfl commented Jul 26, 2019

OK, sorry that didn't help. Does the firmware compile correctly? Can you copy the contents of the compile window into a .zip file and attach it here?

@davidelang
Copy link
Contributor

davidelang commented Jul 26, 2019 via email

@Ozista
Copy link
Author

Ozista commented Jul 26, 2019

Good idea, the firmware compiles great thanks! Attached 2 files -with and without the upload Verbose.

Thank again.

MaslowVerbozeOutput Compile-only.txt
MaslowVerbozeOutput Compile-Upload.txt

@blurfl
Copy link
Collaborator

blurfl commented Jul 26, 2019

It looks like it compiles correctly, but both files seem to be the output of the compile command rather than the upload. The output with upload Verbose should have a section at the end showing the output of the avrdude uploader. This is what it looks like here:

avrdude-out.txt

@Ozista
Copy link
Author

Ozista commented Jul 28, 2019

Sorry, the upload tail of the verbose did not come with the previous file. Please find attached again and the screenshot of the settings while uploading.

Thank you for your time, Scott!

cnc_ctr_v1 setings while uploading
MaslowVerbozeOutput.Compile-Upload.txt

@blurfl
Copy link
Collaborator

blurfl commented Jul 28, 2019

I think the programmer should be "AVR ISP" - that's what shows up here. If that doesn't fix things, let's look at the verbose capture from uploading Blink.ino.

@blurfl
Copy link
Collaborator

blurfl commented Jul 28, 2019

Sorry, I can't make much of the huge text dump in your last message. Could you edit that message to remove the text dump (to tidy up the thread) and attach the dump as a text attachment?
I still don't see the output from the avrdude uploader. In Arduino preferences, turn off 'verbose output during compilation', turn on 'upload'...

@Ozista
Copy link
Author

Ozista commented Jul 29, 2019

Sorry, that is maybe due to replying within the email platform.
Hope these attachments will appear separately?!

MaslowVerbozeOutput.Compile-Upload2.txt
Blink Copile-Upload verbose.txt
cnc_ctr_v1 setings while uploading2

@blurfl
Copy link
Collaborator

blurfl commented Jul 29, 2019

Searching online for 'arduino avrdude: stk500v2_ReceiveMessage() timeout' brings up some things that might apply.

Try to reset the AVR (press and release the button) while the programmer is attempting to connect.
There has been problems with the version from the Microsoft Store. Try to remove the old version and install the newest: arduino.cc/en/Main/Software
Having three '!' characters in a row in the source file - !!! - can cause problems for the bootloader

@Ozista
Copy link
Author

Ozista commented Jul 29, 2019

Wow, Scott that was the -!!!- problem! Thank you so much! I could upload after finding "!!!" and replaced all to one "!".
I do not know how many and/or where they were but the Ctrl F worked to find and the Replace all in all sketches at one...

Thank again Mate, hope I can help in some way soon.

Istvan Toth

@blurfl
Copy link
Collaborator

blurfl commented Jul 29, 2019

🎉👍 That sure was a strange one! Glad it’s solved.

@BarbourSmith
Copy link
Member

Nice work!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants