Jump to content

How to build marlin firmware with makefile?


zhonghello

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
    • Our picks

      • S-Line Firmware 8.3.0 was released Nov. 20th on the "Latest" firmware branch.
        (Sorry, was out of office when this released)

        This update is for...
        All UltiMaker S series  
        New features
         
        Temperature status. During print preparation, the temperatures of the print cores and build plate will be shown on the display. This gives a better indication of the progress and remaining wait time. Save log files in paused state. It is now possible to save the printer's log files to USB if the currently active print job is paused. Previously, the Dump logs to USB option was only enabled if the printer was in idle state. Confirm print removal via Digital Factory. If the printer is connected to the Digital Factory, it is now possible to confirm the removal of a previous print job via the Digital Factory interface. This is useful in situations where the build plate is clear, but the operator forgot to select Confirm removal on the printer’s display. Visit this page for more information about this feature.
          • Like
        • 0 replies
      • Ultimaker Cura 5.6 stable released
        Cura now supports Method series printers!
         
        A year after the merger of Ultimaker and MakerBotQQ, we have unlocked the ability for users of our Method series printers to slice files using UltiMaker Cura. As of this release, users can find profiles for our Method and Method XL printers, as well as material profiles for ABS-R, ABS-CF, and RapidRinse. Meaning it’s now possible to use either Cura or the existing cloud-slicing software CloudPrint when printing with these printers or materials
        • 48 replies
    ×
    ×
    • Create New...