Welcome! Log In Create A New Profile

Advanced

Trouble with flashing Marlin 2.1 on MKS board via Arduino UNO as programmer

Posted by Joneg 
Trouble with flashing Marlin 2.1 on MKS board via Arduino UNO as programmer
June 30, 2022 06:31AM
Greetings, really hope here can help me. I’m building a 3D printer. Use board MKS Gen L v1.0 (for this board, as I understand it, a common problem is that the usb connector does not work, the same for me). So I use arduino uno as programmer. Marlin 2.1, PlatformIO, VScode, Marlin Firmware Auto Build.


So firmware is okey after “build” its success. But after upload its says that and no flashing :confused:

Configuring upload protocol…
AVAILABLE: wiring
CURRENT: upload_protocol = wiring
Looking for upload port…
Auto-detected: COM4
Uploading .pio\build\mega2560\firmware.hex
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_getsync(): timeout communicating with programmer

avrdude done. Thank you.

*** [upload] Error 1

How can i fix it ? Thanks in advance for your help !
Attachments:
open | download - photo_2022-06-30_16-20-01.jpg (160.2 KB)
open | download - Снимок.PNG (37.2 KB)
Re: Trouble with flashing Marlin 2.1 on MKS board via Arduino UNO as programmer
June 30, 2022 07:39AM
your missing the capacitor on the uno

[docs.arduino.cc]

"This type of board needs a 10µF electrolytic capacitor connected to RESET and GND with the positive (long leg) connected to RESET. The capacitor has to be placed after the programmer board has been loaded with the ISP sketch.

The 10µF electrolytic capacitor connected to RESET and GND of the programming board is needed only for the boards that have an interface between the microcontroller and the computer's USB, like Mega, UNO, Mini, Nano. Boards like Leonardo, Esplora and Micro"
Re: Trouble with flashing Marlin 2.1 on MKS board via Arduino UNO as programmer
June 30, 2022 07:43AM
Also the environment your using for you board needs updating to use Arduino as ISP (default expect standard bootloader over usb)

upload_protocol = stk500v1
; each flag in a new line
upload_flags =
-P$UPLOAD_PORT
-b$UPLOAD_SPEED

; edit these lines
upload_port = SERIAL_PORT_HERE
upload_speed = 19200

Edited 1 time(s). Last edit at 06/30/2022 07:48AM by Dust.
Re: Trouble with flashing Marlin 2.1 on MKS board via Arduino UNO as programmer
June 30, 2022 07:47AM
Personally this is the wrong way to do it

I would do the following.

Use arduino ide to put a bootloader onto your controller via the uno running Arduino as ISP

then use platformio as it was intended to connect to your controller via usb to the bootloader.
Re: Trouble with flashing Marlin 2.1 on MKS board via Arduino UNO as programmer
June 30, 2022 07:51AM
Thanks for the answer, I read this article where we are talking about arduino mega as a programmer, and I have arduino uno
+ there is a video on YouTube where the same board is flashed through arduino uno, I do everything exactly the same as there, the difference is that they use arduino IDE and I have VScode with platformIO

[www.youtube.com]
Re: Trouble with flashing Marlin 2.1 on MKS board via Arduino UNO as programmer
June 30, 2022 08:02AM
its in ArduinoISP sketch or where ?
Re: Trouble with flashing Marlin 2.1 on MKS board via Arduino UNO as programmer
June 30, 2022 08:09AM
I would love to connect to the overdose fee, but my computer doesn't see it and nothing helps.
Sorry, only registered users may post in this forum.

Click here to login