Jump to content

Why are Cura UM2 extended binary and Arduino built UM2 extended binary so different?


umagi

Recommended Posts

Posted (edited) · Why are Cura UM2 extended binary and Arduino built UM2 extended binary so different?

KakaoTalk_20160218_134513240.thumb.jpg.67c716c1a5da211319d5eeb44914e178.jpgHi,

I have built my own UM2 Extended (made it even higher + some small modifications for more rigid heated bed platform, see pictures) and am now in the process of compiling the UM2 Extended firmware (from the official git repository, UM2 branch).

KakaoTalk_20160218_134451389.thumb.jpg.372fda235763e6610c6c07ba45e277e2.jpgKakaoTalk_20160218_134455927.thumb.jpg.b3a10e489464b09606c11d3b4a0447dc.jpgKakaoTalk_20160218_134513240.thumb.jpg.8ef43cf294a2b91228ede2b3fdea1086.jpgKakaoTalk_20160218_134529570.thumb.jpg.aedad8ce9da3da18d9ede04381c632e7.jpg

I have first tried with the default UM2 extended firmware included in the latest Cura version (Cura 15.04.4)  and compared it with the .hex file built using the latest Arduino IDE (v1.6.7) on Windows.

Cura binary: Cura_15.04.4\resources\firmware\MarlinUltimaker2extended.hex

Source for Arduino build: https://github.com/Ultimaker/Ultimaker2Marlin

When comparing both .hex version using a hex file comparator, it is obvious that both files are very very different.

My question is therefore this:

How is the default UM2 extended firmware included in Cura built?

Why are the two images so different? Are they any extra libraries included in the Cura image? Different optimization? Different compiler?

I have many questions upcoming concerning the debug process of my self-built UM2, which boots but does not seem to home properly, and hope to get some help from experienced people here^^.

Many thanks for your help.

KakaoTalk_20160218_134513240.thumb.jpg.67c716c1a5da211319d5eeb44914e178.jpg

KakaoTalk_20160218_134451389.thumb.jpg.372fda235763e6610c6c07ba45e277e2.jpg

KakaoTalk_20160218_134455927.thumb.jpg.b3a10e489464b09606c11d3b4a0447dc.jpg

KakaoTalk_20160218_134513240.thumb.jpg.8ef43cf294a2b91228ede2b3fdea1086.jpg

KakaoTalk_20160218_134529570.thumb.jpg.aedad8ce9da3da18d9ede04381c632e7.jpg

Edited by Guest
  • Link to post
    Share on other sites

    Posted · Why are Cura UM2 extended binary and Arduino built UM2 extended binary so different?

    Even just changing one byte in the code will make the whole file different because now addresses of every jump (in machine code) have all moved. Or if you move the data by one byte then those all change. So comparing binaries that only had one tiny change will usually look completely different.

    There might be a git tag somewhere - there should be - such that you can check out the exact version but really - the latest version is best anyway.

    What doesn't home? X? Y? or Z?

  • Link to post
    Share on other sites

    Posted · Why are Cura UM2 extended binary and Arduino built UM2 extended binary so different?

    My question is therefore this:

    How is the default UM2 extended firmware included in Cura built?

     

    The build process of the whole bunch of different firmware versions is included in the Cura package script

    As you can see - it uses the Makefile, not the Arduino IDE.

    (side note: maybe it's different for the new (beta) Cura - i haven't compared it yet)

    I'm still not sure, how the Arduino IDE compiles a sketch but i fear it compiles (and link) all files that are present in the Marlin folder. And there is a lot of stuff that is not needed (and not used) for the Ultimaker2.

    Using "make" you will have a lot more control about the building process. I recommend to go this way.

     

    Why are the two images so different? Are they any extra libraries included in the Cura image? Different optimization? Different compiler?

     

    Probably all of this... (see above)

    And keep in mind that the current branches are not always in a (directly) usable state. I recommend to start with the latest stable release (15.04.4 atm) - it's always better to use a steady starting point.

    Have fun!

  • Link to post
    Share on other sites

    Posted · Why are Cura UM2 extended binary and Arduino built UM2 extended binary so different?

    Oh! You mean this?

     

    $MAKE -j ${JOBS} HARDWARE_MOTHERBOARD=72 ARDUINO_INSTALL_DIR=${ARDUINO_PATH} ARDUINO_VERSION=${ARDUINO_VERSION} BUILD_DIR=_Ultimaker2extended DEFINES="'STRING_CONFIG_H_AUTHOR=\"Vers:_${BUILD_NAME}ex\"' TEMP_SENSOR_1=0 EXTRUDERS=1"

     

    I have always used the arduino IDE :(

    I didn't know it added junk libraries. But it still fits on my um2go so maybe it's not critical?

    What about for tinker Marlin? Do you also use make?

  • Link to post
    Share on other sites

    Posted · Why are Cura UM2 extended binary and Arduino built UM2 extended binary so different?

    Is there more information somewhere about where to get the same compiler version as UM? What build environment is preferred?

  • Link to post
    Share on other sites

    Posted (edited) · Why are Cura UM2 extended binary and Arduino built UM2 extended binary so different?

    Is there more information somewhere about where to get the same compiler version as UM?  What build environment is preferred?

     

    You should ask daid, he's the guy that does the firmware building.

    We do have some cmake scripts in the cura-build somehwere i believe.

    Edited by Guest
  • Link to post
    Share on other sites

    Posted · Why are Cura UM2 extended binary and Arduino built UM2 extended binary so different?

    I have always used the arduino IDE :(

    I didn't know it added junk libraries.  But it still fits on my um2go so maybe it's not critical?

     

    Don't worry - the linker should throw away all unused stuff, it just takes a bit longer than it could...

     

    What about for tinker Marlin? Do you also use make?

     

    Yep, sure. It's much more convenient if you want to compile several variants from the same sources.

    If you're interested: i use Arduino 1.6.5 at the moment and start this script from within GitBash.

  • 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

      • UltiMaker Cura 5.7 stable released
        Cura 5.7 is here and it brings a handy new workflow improvement when using Thingiverse and Cura together, as well as additional capabilities for Method series printers, and a powerful way of sharing print settings using new printer-agnostic project files! Read on to find out about all of these improvements and more. 
         
          • Like
        • 18 replies
      • 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
    ×
    ×
    • Create New...