Tips for burning the bootloader?

416 views
Skip to first unread message

Kyle Kish

unread,
Dec 31, 2016, 3:34:26 PM12/31/16
to X-Machines 3D Printers
So after bricking my printer trying to update to the correct firmware I'm in the process of trying to get it back up and running.
I found I needed another board to burn the bootloader back onto the printer, so i picked up the "Pocket AVR Programmer" 

I got the drivers installed and it connected to the printer following this guide:

my pc sees the AVR


I believe I have the right board selected and programmer seen in the GIF below.

but as you can see in the GIF I get a failed double check connections.
Any idea what I'm missing?

Thanks guys.

Kyle-

Sandro

unread,
Jan 1, 2017, 2:05:46 AM1/1/17
to X-Machines 3D Printers
Note that the page from SparkFun says the PocketAVR programmer cannot be used to program the ATmega2560 that powers our Lorei printers.  You might need to use another programmer.

Travis Jackson

unread,
Jan 2, 2017, 3:11:10 PM1/2/17
to X-Machines 3D Printers
you should be able to convert an arduino UNO into a programmer... I don't know the steps, I just remember reading about it once. I am still trying to get the firmware from xmachines, they have gone completely silent again. frustrating.

Doug Reitmeier

unread,
Jan 2, 2017, 8:59:44 PM1/2/17
to X-Machines 3D Printers
When I had a similar problem I used an Uno and the instructions at the link below.



Doug

Lars

unread,
Jan 3, 2017, 10:36:55 AM1/3/17
to X-Machines 3D Printers
@Kyle: I have the same problem.
I bricked my printer by trying to upload a new firmware (downloaded it here in this group) via Cura Software.
Now, when i power up the printer, i just get a blank blue screen and that's it.
Can someone please help with a step by step tutorial on how to get a bootloader or a new firmware onto this printer, please ???

Lars

unread,
Jan 7, 2017, 4:12:14 AM1/7/17
to X-Machines 3D Printers
OK, i managed to flash the official firmware onto the Lorei board (got the firmware download linke from xmachines via email)
There was no need to handle with a new bootloader. I just used Arduino to compile the code, exported the hex file to my AVRISP mkII and flashed the file with AVR Studio. That was easy ;o)
Now my printer is up and running. Two thumbs up !

Kyle Kish

unread,
Jan 7, 2017, 5:31:59 PM1/7/17
to X-Machines 3D Printers
oh really? I also got my marlin zip from xmachines. I can compile it. how do you save it as a hex? Guess i need to get a AVRISP mkII too

Sandro

unread,
Jan 9, 2017, 11:20:03 AM1/9/17
to X-Machines 3D Printers
In the Arduino IDE there is an option under the "Sketch" menu to: Export compiled Binary

That will create a .hex file for you.

Kyle Kish

unread,
Jan 12, 2017, 4:41:42 PM1/12/17
to X-Machines 3D Printers
Ok finally got my AVRISP mkII, got a hex file generated, and downlaoded AtmelStudio 7. Is the Flashing done by the "Device Programming" as seen in my screenshot or am I completely offtrack here ?

arg2761

unread,
Jan 12, 2017, 6:58:51 PM1/12/17
to X-Machines 3D Printers
Kyle:

Which AVRISP mkII did you get?
Also, I get two hex files: Marlin.ino.mega.hex and Marlin.ino.with_bootloader.mega.hex.
What do you get?

Regards

Kyle Kish

unread,
Jan 12, 2017, 7:14:03 PM1/12/17
to X-Machines 3D Printers
Um i got this one. 

My hex files are Marlin.ino.hex and Marlin.ino.with_bootloader.hex

arg2761

unread,
Jan 12, 2017, 7:16:17 PM1/12/17
to X-Machines 3D Printers
Greetings.

I get two "hex" files. Not sure which to use.
Which one did you use?

Kyle Kish

unread,
Jan 12, 2017, 7:20:44 PM1/12/17
to X-Machines 3D Printers
I planned on using the Marlin.ino.hex because Lars mentioned he didnt need bootloader. I'm just not sure of what im doing when it comes to flashing it

arg2761

unread,
Jan 12, 2017, 7:25:55 PM1/12/17
to X-Machines 3D Printers
"I'm just not sure of what im doing when it comes to flashing it"

You and me, Brother!
I got my printer with a bad power supply. When they send me a working PSU, I got the blank screen of death. I've had this "paper weight" for over two months.
I been trying to get them to fix it for me; they jus say "try this".

I'm going to get the programmer to see if I unbrick it...more "good money after bad money", as it were.
(needed to rant).

Regards.

arg2761

unread,
Jan 12, 2017, 9:06:26 PM1/12/17
to X-Machines 3D Printers
Kyle:

I ordered the same programmer.
Did you get your board running yet?

Kyle Kish

unread,
Jan 12, 2017, 9:26:12 PM1/12/17
to X-Machines 3D Printers
Not yet. Im not sure what to do in atmel studio 7 to flash it. I cant seem to find a straight tutorial for it or at least im not sure what im looking for. I need to do some more research I guess.

Kyle Kish

unread,
Jan 12, 2017, 10:19:56 PM1/12/17
to X-Machines 3D Printers
Woot i got it running again. 
So for anyone you doesn't know and your brick your printer.
I added Pictures/Gifs/Links to almost everything I could think of.

1. Get firmware from xmachines. *they may be adding this to their website in the future* :                                        https://github.com/XMachines/XMachines-Lorei-Firmware
2. you'll need a ATMEL AVR Programmer if your like me and don't have other Arduinos something like this:                 https://www.amazon.com/gp/product/B00KM6ZA9I/ref=oh_aui_detailpage_o02_s00?ie=UTF8&psc=1
3. In the Arduino ide with xmachines provided firmware you need to "Export compiled binary" under the Sketch tab
 I used this to set up were to find these hex files. * they are hidden by default* :                                                      https://www.kanda.com/blog/microcontrollers/avr-microcontrollers/find-arduino-hex-files-output-binaries/ 
4. Download Atmel Studio 7.0:                                                                                                                             http://www.atmel.com/tools/ATMELSTUDIO.aspx
5. With the ATMEL AVR plugged into your pc, Plug it into your printer board  *its right in the middle*                                                           http://i.imgur.com/Omyolrp.jpg


6.Your AVR will have two green lights if correct. make sure to plug in your printer to your outlet too. It needs an external power.
7.In Atmel Studio Click Tools > Device Programming                                                                                        https://gyazo.com/3cfd7be6690944b495bcd2c98203fa11
8. Set the tool: AVRISP mkii  Device: ATmega2560 Interface: ISP    Hit Apply                                                   https://gyazo.com/92739191edbbd2c23d42f720fb710cef
9. Go to memories on the left side
10. In the flash (256 KB) box point to your hex directory. (I used the hex that had bootloader just to be safe.)       https://gyazo.com/d7f0ef9d5fa91ee75ce630c4f79fdd26
11. Hit Program. If it all worked your printer should be back to normal screen!

Now to see if I can get it really working. A problem for another day-

arg2761

unread,
Jan 13, 2017, 7:46:42 AM1/13/17
to X-Machines 3D Printers
Kyle:

You "DA" Man!

Thank you very much for posting this.
I have the same predicament and your post just became the "Bible" (respectfully).

Have a great weekend.

Kyle Kish

unread,
Jan 14, 2017, 12:07:56 PM1/14/17
to X-Machines 3D Printers

arg2761,

one more thing I missed is in the firmware.

make sure you set  the config for your size. I missed this.

arg2761

unread,
Jan 15, 2017, 12:51:35 PM1/15/17
to X-Machines 3D Printers
Kyle:

An update.
I could not figure out how to load the firmware with CrossPack.
I got a Windows 7 laptop and installed ATMEL Studio. It was not an easy thing. Took me a couple of hours with several reboots.
Once I had ATMEL Studio installed, I followed your instructions and the board got "re-programmed".
It is working now:


Thank you for sharing your experience. It sure made it easier for me.

Regards,

Al

Sandro

unread,
Jan 18, 2017, 1:56:13 PM1/18/17
to X-Machines 3D Printers
I'm going to  try to spend sometime this weekend getting the firmware situation worked out.  For me that means:

  1. WORKING Compiled firmware tested using Cura to install.
  2. Procedures to repair a bricked board using a standard Arduino and free/cross-platform tools
  3. anything else??

Scott Haynes

unread,
Jul 2, 2017, 5:23:28 AM7/2/17
to X-Machines 3D Printers
Did you ever figure out how to do this using an Uno or some other Arduino to restore the firmware/bootloader?  I will order the AVR programmer listed above, but it is going to take a few days to get here, would like to get my printer going again tomorrow if possible.

Thanks!

arg2761

unread,
Jul 2, 2017, 8:47:16 AM7/2/17
to X-Machines 3D Printers
Scott:

I only restored using an AVR.


Regards,


Al

Sandro

unread,
Jul 2, 2017, 9:37:26 PM7/2/17
to X-Machines 3D Printers
I did get this working, but I never took the time to properly write it up. 


Also I found Nick Gammon's pages helpful: http://www.gammon.com.au/forum/?id=11635

The XMachines controller board has an ISP header, so the wiring from the Arduino page is pretty correct.  I don't remember if the pinouts are precisely the same, or flipped, but I didn't have much trouble working it out at the time.  Let me know if I can help with more details, I could theoretically re-fllash my bootloader to test out the process again if necessary.  (I still have the cable I bodged together sitting here, so it's really just a matter of going through the steps again).

Scott Haynes

unread,
Jul 3, 2017, 2:10:43 PM7/3/17
to X-Machines 3D Printers
Thanks, I got it working using the UNO as the programmer, followed the gammon instructions and it was easy.

Now trying to get this BLTouch working, I can't get a G29 to work, it keeps telling me I need to home Z and ignores the G29.




DroneOn

unread,
Jul 3, 2017, 8:45:18 PM7/3/17
to X-Machines 3D Printers
Does a G28 work? Does the pin extend when homing?

Scott Haynes

unread,
Jul 3, 2017, 9:00:15 PM7/3/17
to X-Machines 3D Printers
I am not home at the moment, but I don't think so, The print head only moves up when homing. The Bltouch does respond to M280 commands though.

Shawn T

unread,
Sep 1, 2017, 8:45:21 AM9/1/17
to X-Machines 3D Printers
Did you send the m500 to save?

Hobbie Discounters

unread,
May 14, 2018, 1:43:45 AM5/14/18
to X-Machines 3D Printers
I was one of the lucky few that did receive my printer for my kickstarter pledge. I got the duo with 12" bed. I didn't however receive the bed heater. I just purchased a 200mm 24v heater, but I dont know how to wire it in and update the firmware to make it function. Can someone please help me??

Sandro

unread,
May 14, 2018, 11:38:23 AM5/14/18
to X-Machines 3D Printers
I don't think the Lorei has a 24v supply line. I thought the system was 12v.

In any event, the controller board has a place to wire the heated bed in the back right corner (looking at the printer from the front). It is very near the y-stepper motor.

DroneOn

unread,
May 14, 2018, 10:04:08 PM5/14/18
to X-Machines 3D Printers
It is indeed 24v.
Reply all
Reply to author
Forward
0 new messages