MaslowCNC / Firmware

Maslow Firmware
GNU General Public License v3.0
261 stars 133 forks source link

An error occurred while uploading the sketch #517

Open Ozista opened 5 years ago

Ozista commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

Hi Scott,

Thank you for the advice, I have made sure that the GroundControl was not running as I heard about before. I was lucky once with the Leonardo controller but the capacity of the card is not enough, the sample "Blink" is downloading on "Mega 2560" before and after the "Maslow Control Software" with no problem. My original 3D printer sketch "Marlin" is uploading fine but just not the "CNC_CTRL_v1". [image: image.png]

Istvan Toth

On Thu, Jul 25, 2019 at 2:45 PM Scott Smith notifications@github.com wrote:

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.

β€” You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/MaslowCNC/Firmware/issues/517?email_source=notifications&email_token=ABPQGYUV45RKJPI3SMQFMY3QBEVYDA5CNFSM4IGWVZD2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD2YKOEA#issuecomment-514893584, or mute the thread https://github.com/notifications/unsubscribe-auth/ABPQGYW6G6W47YQ72IL5PG3QBEVYDANCNFSM4IGWVZDQ .

blurfl commented 5 years ago

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 commented 5 years ago

are you sure that it compiled properly?

David Lang

Ozista commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

πŸŽ‰πŸ‘ That sure was a strange one! Glad it’s solved.

BarbourSmith commented 5 years ago

Nice work!!!