Jump to content
Ultimaker Community of 3D Printing Experts
Sign in to follow this  
ascanio

How to compile Marlin Firmware

Recommended Posts

Hello everybody

I've just built my heatbed for my UM1 the relay way ando now need to upgrade my firmwar in order to have it go...

I have never done any firmware operation ever so i am really new to this

I found this interesting topic

http://umforum.ultimaker.com/index.php?/topic/1948-how-to-configure-marlin-firmware-yourself-heated-print-bed-problem/

About configuring Merlin for heatbed, but did'nt understand a couple of thing:

What are the changes needed in the configuration header?

(I have downloaded the ultimaker's fork on github)

I see you have to set the motherboard type (7)

#ifndef MOTHERBOARD

#define MOTHERBOARD 7

#endif

and the thermistor type, but here it comes the first problem:

#define TEMP_SENSOR_0 -1

#ifndef TEMP_SENSOR_1

#define TEMP_SENSOR_1 0

#endif

#define TEMP_SENSOR_2 0

#define TEMP_SENSOR_BED 0

 

Which one has to be defined with my thermistor number? (the bed one seems the most obvious but u never know..)??

 

I also see there is a cnfiguration builder:

http://marlinbuilder.robotfuzz.com

But i have no idea what all theese options mean. I just want my UM to work as good as before, but support the Heatbed (btw I have the ulticontroller...)

 

Any way let's say I have my config file (and what about the advanced configuration, do I need to change them as well??) HOW DO YOU COMPILE?

I understood you want to have a final hex file and upload that to your UM via cura, but how do i get it out of it?

I didn't understant the compiling you have to do with the arduino IDE, nor the "make" command-line. Any easy way to do it?

 

EDIT I found here an easy step-to-step guide for compiling Merlin firmware

http://www.extrudable.me/2013/05/03/building-marlin-from-scratch/

 

Thank you very much

 

Share this post


Link to post
Share on other sites

The robotfuzz builder will do everything for you, and produce the finished hex file. You just have to set up the configuration options. If I remember correctly, you can just pick the basic Ultimaker setup from the drop down, and then all you need to do is pick the correct temp sensor type for your heated bed.

Share this post


Link to post
Share on other sites

Ok so i leave all the settings as I find them, select the thermistor and i am done? What about the ulticontroller I have, any other setting to set? (I see there is a hardware section)

I see it generates a hex file for you. So it means I don't have to manually compile it? But i can just use that one?

 

Share this post


Link to post
Share on other sites

Ok so i leave all the settings as I find them, select the thermistor and i am done?

 

Yes. It's pretty well tested. I've tested it. Other's use it.

 

I see it generates a hex file for you. So it means I don't have to manually compile it? But i can just use that one?

 

Yes. Very easy. You can use Cura to upload it using cura expert menu.

Save this hex file!!! In fact save the configuration.h file that comes out of robot fuzz just in case you want to upgrade to a newer version of Marlin some day. Then you can do a diff (winmerge works well) on your configuration.h file and some future build of Marlin you do. Make sure you can find this hex file 3 years from now - label it well and clearly.

Marlin is pretty safe - you can install different versions over and over and if you screw up you just install a newer one. Also it's easy to go back to the one that comes with cura (also in the expert menu).

 

Share this post


Link to post
Share on other sites

Actually since people might end up here on a google search I'll give more information to others who want to compile with the gui:

How to compile Marlin yourself - I assume everyone here is doing this for the UM Original but if for UM2 marlin source is instead here: (Ultimaker2 marlin source: https://github.com/Ultimaker/SecretMarlin)

First get the source code files here:

https://github.com/ErikZalm/Marlin

Then edit Configuration.h – this is by far the hardest step and it's not bad. I recommend you go here:

http://marlinbuilder.robotfuzz.com/

and use that website only to get the Configuration.h file. Then run winmerge or some other diff program to compare the latest ErikZalm version of Configuration.h to the one from robotfuzz which is usually a few months behind. Edit the ErikZalm version to match the robotfuzz generated version. Make any other edits as necessary. It sound complicated but it is extremely clear and well commented. Sometimes with paragraphs of explanation.

configuration.h file detailed explanation:

http://airtripper.com/1145/marlin-firmware-v1-basic-configuration-set-up-guide/

Then you need to build Marlin. There are instructions that come with the erik zalm download in the "README.md" text file.

Basically you download and install arduino ide:

http://arduino.cc/en/main/software

Then copy the sanguino software as explained in README file. Open Marlin.ino file in Arduino IDE by double clicking it (not pde file as stated in README - I think that's old). Select board as "Mega 2560" as explained in README file. Go to "file" "preferences" and select "verbose output" so you can find your hex file. Then build it by clicking the check box in the upper left corner. At the bottom you will see it compiling Marlin. At the end of this it says where the hex file is. If you are currently connected to your UM through USB you can just click "file" "upload" and you are done! But you should locate that hex file and save it somewhere along with the Configuration.h file used to create it so you can recreate the same version with maybe one change. Also you can upload the hex file using Cura in expert menu.

Alternatively you can build Marlin with somewhat more detailed step by step instructions the command line way (which I don't prefer):

http://www.extrudable.me/2013/05/03/building-marlin-from-scratch/

 

 

Share this post


Link to post
Share on other sites

 

 

HEATED BED IS l NOT WORKING ANY MORE

 

 

 

I have a UM original with Prusa heated bed. It worked always perfect

 

After I downloaded Cura 14.9, and new default firmware, My heated bed was not working anymore.

 

Then I build customized firmware with Marrlin Builder. on my Utlticontroller I get the error: Maxtemp Bed. The "H" gives 358 degrees.

 

The only thing I could think of was that maybe my thermistor was broken. I built in a new thermistor but I still get the same error.

 

I made already a lot of posts and had even a "ticket"with Ultimaker, but still no solution for my problem.

 

Is there anyone who has a suggestion?

 

Share this post


Link to post
Share on other sites

Hey Herman,

So if I understand the situation, you have a UMO to which you've added a custom heated bed (not purchased from Ultimaker) and when you upgraded to Cura 14.9, you also flashed the firmware that came with 14.9.

If this is correct, it's the wrong firmware. To my knowledge, Cura does NOT come with firmware that supports anything other than the heated bed upgrade that comes from Ultimaker.

The UM bed upgrade uses a different temp sensor for the bed (I believe it is a PT100). It is probably incompatible with what you probably have which most likely is a 100k thermistor.

You should follow GR5's information on using http://marlinbuilder.robotfuzz.com/ making sure you select the correct sensor for the bed and reflash with the firmware it generates.

Good luck.

 

Share this post


Link to post
Share on other sites

Hey guys,

I'm trying to use this link to compile some custom firmware for my UMO:

http://marlinbuilder.robotfuzz.com/

I have dual extruders and the official Heated Bed Kit. Does anyone know what sensor I need to select for the heated bed temperature sensor?

Im (I think if I have understood correctly) then going to enable the line for graphic controller in the hex config file.

Thanks for any advice

 

Share this post


Link to post
Share on other sites

The marlinbuilder@robtfuzz works with a slightly older Marlin version where this sensor might not be included yet. I don't know if this sensor does yet exist in the ErikZalm fork where both marlinbuilder and Ultimaker update their forks from. It certainly will at some point.

Share this post


Link to post
Share on other sites

Ah ok, so for my predicament there is no compiler that I can use?

 

But, certainly

1. Download the Ardiuno 1.0.6 IDE like gr5 suggested.

2. Download the firmware sources from GitHub (select the suitable branch)

3. Edit the Configuration.h for your needs

4. compile and upload the .hex file

I quote again:

 

...

configuration.h file detailed explanation:

http://airtripper.com/1145/marlin-firmware-v1-basic-configuration-set-up-guide/

Then you need to build Marlin. There are instructions that come with the erik zalm download in the "README.md" text file.

Basically you download and install arduino ide:

http://arduino.cc/en/main/software

Then copy the sanguino software as explained in README file. Open Marlin.ino file in Arduino IDE by double clicking it (not pde file as stated in README - I think that's old). Select board as "Mega 2560" as explained in README file. Go to "file" "preferences" and select "verbose output" so you can find your hex file. Then build it by clicking the check box in the upper left corner. At the bottom you will see it compiling Marlin. At the end of this it says where the hex file is. If you are currently connected to your UM through USB you can just click "file" "upload" and you are done! But you should locate that hex file and save it somewhere along with the Configuration.h file used to create it so you can recreate the same version with maybe one change. Also you can upload the hex file using Cura in expert menu.

...

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

Terms of Use Privacy Policy