Jump to content
UltiMaker Community of 3D Printing Experts

How to build marlin firmware with makefile?


zhonghello
 Share

Recommended Posts

Posted · How to build marlin firmware with makefile?

Dears,

I want to build marlin firmware with makefile, and I have installed Arduino 1.5.2 and the install path is G:/software.

Then I changed makefile as below:

# This defined the board you are compiling for (see Configuration.h for the options)

HARDWARE_MOTHERBOARD ?= 72

 

# Arduino source install directory, and version number

ARDUINO_INSTALL_DIR ?= G:/software/arduino-1.5.2-windows/arduino-1.5.2

ARDUINO_VERSION ?= 152

 

# You can optionally set a path to the avr-gcc tools. Requires a trailing slash. (ex: /usr/local/avr-gcc/bin)

AVR_TOOLS_PATH ?= G:/software/arduino-1.5.2-windows/arduino-1.5.2/hardware/tools/avr/bin/

 

After changed the makefile, from a command prompt, I change into Marlin directory, and then type 'make', it shows below error:

G:\Marlin>make

make: *** No rule to make target `G:/Marlin/applet/wiring.o', neede

d by `G:/Marlin/applet/Marlin.elf'. Stop.

 

Very appreciated if any help~

PS: Actually, I am not sure about the arduino version :152

 

 

  • Link to post
    Share on other sites

    Posted · How to build marlin firmware with makefile?

    I did a quick test here and the Ultimaker/Marlin compiles fine with the latest 'stable' Arduino 1.0 (1.0.5) and gives the error you get with 1.5 Beta (tested with 1.5.7).

    Unless you absolutely want/need to go ahead with 1.5, easiest is to install 1.0...

    1.5 probably requires some more tweak in the Makefiles -- note that 1.5.7 does not even have the avr-utils, which requires more work to setup a build environment...

     

  • Link to post
    Share on other sites

    • 1 month later...
    Posted · How to build marlin firmware with makefile?

    I did a quick test here and the Ultimaker/Marlin compiles fine with the latest 'stable' Arduino 1.0 (1.0.5) and gives the error you get with 1.5 Beta (tested with 1.5.7).

    Unless you absolutely want/need to go ahead with 1.5, easiest is to install 1.0...

    1.5 probably requires some more tweak in the Makefiles -- note that 1.5.7 does not even have the avr-utils, which requires more work to setup a build environment...

     

    Not entirely true, You get this issue also with 1.0.5 when using a wrong motherboard. The default right now is '11' in the Makefile. A patch I have in my local git repository looks like the following (tested on *ubuntu) for an UM2 which is motherboard version 72. Arduino is installed via apt-get and i think it now has a dependancy on the normal avrdude (avrdude.conf is a symlink to /etc/avrdude...)

    diff --git a/Marlin/Makefile b/Marlin/Makefile

    index d8c7d0a..481c454 100644

    --- a/Marlin/Makefile

    +++ b/Marlin/Makefile

    @@ -37,19 +37,19 @@

    # from the commandline with "make HARDWARE_MOTHERBOARD=71" for example

     

    # This defined the board you are compiling for (see Configuration.h for the options)

    -HARDWARE_MOTHERBOARD ?= 11

    +HARDWARE_MOTHERBOARD ?= 72

     

    # Arduino source install directory, and version number

    -ARDUINO_INSTALL_DIR ?= ../../arduino-0022

    -ARDUINO_VERSION ?= 22

    +ARDUINO_INSTALL_DIR ?= /usr/share/arduino

    +ARDUINO_VERSION ?= 105

     

    # You can optionally set a path to the avr-gcc tools. Requires a trailing slash. (ex: /usr/local/avr-gcc/bin)

    AVR_TOOLS_PATH ?=

     

    #Programmer configuration

    UPLOAD_RATE ?= 115200

    -AVRDUDE_PROGRAMMER ?= arduino

    -UPLOAD_PORT ?= /dev/arduino

    +AVRDUDE_PROGRAMMER ?= wiring

    +UPLOAD_PORT ?= /dev/ultimaker2

     

    #Directory used to build files in, contains all the build files, from object files to the final hex file.

    BUILD_DIR ?= applet

    @@ -293,7 +293,7 @@ LDFLAGS = -lm

    # Programming support using avrdude. Settings and variables.

    AVRDUDE_PORT = $(UPLOAD_PORT)

    AVRDUDE_WRITE_FLASH = -U flash:w:$(BUILD_DIR)/$(TARGET).hex:i

    -AVRDUDE_FLAGS = -D -C $(ARDUINO_INSTALL_DIR)/hardware/tools/avr/etc/avrdude.conf \

    +AVRDUDE_FLAGS = -D -C $(ARDUINO_INSTALL_DIR)/hardware/tools/avrdude.conf \

    -p $(MCU) -P $(AVRDUDE_PORT) -c $(AVRDUDE_PROGRAMMER) \

    -b $(UPLOAD_RATE)

     

     

     

  • Link to post
    Share on other sites

    Posted · How to build marlin firmware with makefile?

    Well... Yeah...

    I meant to say that it works for building UM stock firmware...

    It also does not work out of the box if you try compile e.g. for a RepRep Full Display controller instead of the UltiController...

    Stock firmware is built from the '_do_make.bat' script where board and other options are set properly. This works perfectly and do not require any patch.

    Then obviously if you try anything else than that you are on your own...

     

  • Link to post
    Share on other sites

    Posted · How to build marlin firmware with makefile?

    _do_make.bat however is very platform specific and requires patching when changing arduino versions etc. Also, _do_make.bat is basically patching the Makefile 'on the fly'.

    Since we're talking about UM's specifically here it's not unthinkable that RepRap based firmware won't build 'out of the box' ;)

     

  • 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
     Share

    • Our picks

      • Here it is. The new UltiMaker S7
        The UltiMaker S7 is built on the success of the UltiMaker S5 and its design decisions were heavily based on feedback from customers.
         
         
        So what’s new?
        The obvious change is the S7’s height. It now includes an integrated Air Manager. This filters the exhaust air of every print and also improves build temperature stability. To further enclose the build chamber the S7 only has one magnetically latched door.
         
        The build stack has also been completely redesigned. A PEI-coated flexible steel build plate makes a big difference to productivity. Not only do you not need tools to pop a printed part off. But we also don’t recommend using or adhesion structures for UltiMaker materials (except PC, because...it’s PC). Along with that, 4 pins and 25 magnets make it easy to replace the flex plate perfectly – even with one hand.
         
        The re-engineered print head has an inductive sensor which reduces noise when probing the build plate. This effectively makes it much harder to not achieve a perfect first layer, improving overall print success. We also reversed the front fan direction (fewer plastic hairs, less maintenance), made the print core door magnets stronger, and add a sensor that helps avoid flooding.
         

         
        The UltiMaker S7 also includes quality of life improvements:
        Reliable bed tilt compensation (no more thumbscrews) 2.4 and 5 GHz Wi-Fi A 1080p camera (mounted higher for a better view) Compatibility with 280+ Marketplace materials Compatibility with S5 project files (no reslicing needed) And a whole lot more  
        Curious to see the S7 in action?
        We’re hosting a free tech demo on February 7.
        It will be live and you can ask any questions to our CTO, Miguel Calvo.
        Register here for the Webinar
          • Like
        • 13 replies
      • UltiMaker Cura 5.3.0-Alpha 🎄 Tree Support Spotlight 🎄
        Are you a fan of tree support, but dislike the removal process and the amount of filament it uses? Then we would like to invite you to try this special release of UltiMaker Cura. Brought to you by our special community contributor @thomasrahm
         
        We generated a special version of Cura 5.2 called 5.3.0 Alpha + Xmas. The only changes we introduced compared to UltiMaker Cura 5.2.1 are those which are needed for the new supports. So keep in mind, this is not a sneak peek for Cura 5.3 (there are some really cool new features coming up) but a spotlight release highlighting this new version of tree supports.  
          • Like
        • 17 replies
      • New here? Get ahead with a free onboarding course
        Hi,
         
        Often getting started is the most difficult part of any process. A good start sets you up for success and saves you time and energy that could be spent elsewhere. That is why we have a onboarding course ready for
        Ultimaker S5 Pro Bundle, Ultimaker S5, Ultimaker S3 Ultimaker 2+ Connect.   
        They're ready for you on the Ultimaker Academy platform. All you need to do to gain access is to register your product to gain free access. 
        Ready? Register your product here in just 60 seconds.
          • Like
        • 14 replies
    ×
    ×
    • Create New...