Duet3D Logo Duet3D
    • Tags
    • Documentation
    • Order
    • Register
    • Login

    Cant build RepRapFirmware

    Scheduled Pinned Locked Moved
    Firmware installation
    2
    10
    1.0k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Albertundefined
      Albert
      last edited by

      Hello,

      Currently I have successfully build any other projects mentioned in the buildinstruction. But, when I try to build the RepRapFirmware, there is a error says:

      Invoking: Cross G++ Compiler
      arm-none-eabi-g++ -D__SAM3X8E__ -DDUET_06_085 -D_XOPEN_SOURCE -I"C:\Eclipse\Firmware\CoreNG\cores\arduino" -I"C:\Eclipse\Firmware\CoreNG\libraries\Flash" -I"C:\Eclipse\Firmware\CoreNG\libraries\SharedSpi" -I"C:\Eclipse\Firmware\CoreNG\libraries\Storage" -I"C:\Eclipse\Firmware\CoreNG\libraries\Wire" -I"C:\Eclipse\Firmware\CoreNG\asf" -I"C:\Eclipse\Firmware\CoreNG\asf\common\utils" -I"C:\Eclipse\Firmware\CoreNG\asf\common\services\clock" -I"C:\Eclipse\Firmware\CoreNG\asf\sam\drivers" -I"C:\Eclipse\Firmware\CoreNG\asf\sam\services\flash_efc" -I"C:\Eclipse\Firmware\CoreNG\asf\sam\utils" -I"C:\Eclipse\Firmware\CoreNG\asf\sam\utils\cmsis\sam3x\include" -I"C:\Eclipse\Firmware\CoreNG\asf\sam\utils\header_files" -I"C:\Eclipse\Firmware\CoreNG\asf\sam\utils\preprocessor" -I"C:\Eclipse\Firmware\CoreNG\asf\thirdparty\CMSIS\Include" -I"C:\Eclipse\Firmware\CoreNG\variants\duet" -I"C:\Eclipse\Firmware\RepRapFirmware\src" -I"C:\Eclipse\Firmware\RepRapFirmware\src\Duet" -I"C:\Eclipse\Firmware\RepRapFirmware\src\Duet\Lwip" -I"C:\Eclipse\Firmware\RepRapFirmware\src\Duet\EMAC" -I"C:\Eclipse\Firmware\RRFLibraries\src\General" -O2 -Wall -c -std=gnu++17 -mcpu=cortex-m3 -mthumb -ffunction-sections -fdata-sections -fno-threadsafe-statics -fno-rtti -fno-exceptions -nostdlib -Wdouble-promotion -fsingle-precision-constant "-Wa,-ahl=CoreXZKinematics.s" -MMD -MP -MF"src/Movement/Kinematics/CoreXZKinematics.d" -MT"src/Movement/Kinematics/CoreXZKinematics.o" -o "src/Movement/Kinematics/CoreXZKinematics.o" "../src/Movement/Kinematics/CoreXZKinematics.cpp"
      In file included from ../src/ObjectModel/ObjectModel.h:11:0,
      from ../src/ObjectModel/ObjectModel.cpp:8:
      C:\Eclipse\Firmware\RepRapFirmware\src/RepRapFirmware.h:38:10: fatal error: General/SafeStrtod.h: No such file or directory
      #include "General/SafeStrtod.h"
      ^~~~~~~~~~~~~~~~~~~~~~
      compilation terminated.
      src/ObjectModel/subdir.mk:18: recipe for target 'src/ObjectModel/ObjectModel.o' failed
      make: *** [src/ObjectModel/ObjectModel.o] Error 1
      make: *** Waiting for unfinished jobs....

      I can find this file in the RRFLibraries project, and try to add the library path to the Cross G++ compiler of the RepRapFirmware project. But it does not work.

      Really appreciate any help.

      1 Reply Last reply Reply Quote 0
      • dc42undefined
        dc42 administrators
        last edited by

        The legacy Duet configuration won't build from current sources because I haven't kept it up to date. But you should be able to overcome that particular error by adding the RRFLibraries/src folder to the include file path. Look in the other build configurations to see what the exact path is.

        Duet WiFi hardware designer and firmware engineer
        Please do not ask me for Duet support via PM or email, use the forum
        http://www.escher3d.com, https://miscsolutions.wordpress.com

        1 Reply Last reply Reply Quote 0
        • Albertundefined
          Albert
          last edited by Albert

          @dc42 thanks for help,

          I change the include path "${workspace_loc:/RRFLibraries/src}", and it works!

          But after that I get many errors says that some function is not declared in this scope, following is one of the error messages:

          C:\Eclipse\Firmware\RepRapFirmware\src/Platform.h: In member function 'void Platform::SetAcceleration(size_t, float)':
          C:\Eclipse\Firmware\RepRapFirmware\src/Platform.h:973:2: error: 'accelerations' was not declared in this scope

          And the picture is the list of those errors.

          0_1543402163876_Screen_20181128184819.png

          do I miss any required library or any project that I need to add to my workspace.

          1 Reply Last reply Reply Quote 0
          • dc42undefined
            dc42 administrators
            last edited by

            As I said before, I haven't maintained the legacy Duet (06-085) configuration. Most of those errors looks as though they are caused by changes to the expected content of the board-specific Pins_xxx.h file, which I didn't make to the legacy Duet version (Pins_Duet.h).

            Even if you make the necessary changes to that file, you probably still won't be able to build working firmware, because I have not maintained the non-RTOS code. If you try to build an RTOS version of firmware for the legacy Duets, you will run out of RAM unless you make savings elsewhere.

            If you want to build the last released Duet sources, you should use the files from /main of ReprapFirmware instead. You will need to either extract an older set of compatible files of the CoreNG project, or change the files in RepRapFirmware to be compatible with the interface changes in CoreNG.

            Duet WiFi hardware designer and firmware engineer
            Please do not ask me for Duet support via PM or email, use the forum
            http://www.escher3d.com, https://miscsolutions.wordpress.com

            Albertundefined 2 Replies Last reply Reply Quote 0
            • dc42undefined
              dc42 administrators
              last edited by

              PS - in case you want to try to build firmware for legacy Duets form latest sources, I've just fixed the Pins_Duet.h file and I will commit it to github along with the 2.02RC5 changes later today. But the MCP4461.cpp file also needs to be changed to use the new I2C interface in CoreNG, and I don't plan to do that.

              If you were actually wanting to build firmware for the Duet WiFi or Due Ethernet, then you should build the DUET_NG configuration instead.

              Duet WiFi hardware designer and firmware engineer
              Please do not ask me for Duet support via PM or email, use the forum
              http://www.escher3d.com, https://miscsolutions.wordpress.com

              1 Reply Last reply Reply Quote 1
              • Albertundefined
                Albert @dc42
                last edited by

                @dc42

                Actually, I am planning to build the duet2, but didn't notice that I have not changed the configuration.

                As you mentioned before, I need to either extract an older set of compatible files of the CoreNG project, or change the files in RepRapFirmware to be compatible with the interface changes in CoreNG. Wonder what are those file that you mentioned.

                1 Reply Last reply Reply Quote 0
                • Albertundefined
                  Albert @dc42
                  last edited by

                  @dc42

                  Now I just change the configuration of ReprapFirmware to Duet2_RTOS without changing any file, and there is a error:

                  ../src/GCodes/GCodes3.cpp:64:30: error: cannot bind non-const lvalue reference of type 'int32_t& {aka long int&}' to an rvalue of type 'int32_t {aka long int}'

                  Is it caused by lack of the necessary files?

                  1 Reply Last reply Reply Quote 0
                  • dc42undefined
                    dc42 administrators
                    last edited by

                    I suspect you have an inconsistency between files. I suggest you checkout the latest files for all 4 main projects (/v2-dev branch for RepRapFirmware, /main for the others) and try again. That will get you up to date with the 2.02RC5 source code, which I committed yesterday. Before you build, either Refresh the projects or exit and restart Eclipse, to ensure that it picks up the latest .cproject files.

                    Duet WiFi hardware designer and firmware engineer
                    Please do not ask me for Duet support via PM or email, use the forum
                    http://www.escher3d.com, https://miscsolutions.wordpress.com

                    1 Reply Last reply Reply Quote 0
                    • Albertundefined
                      Albert
                      last edited by

                      That works! Thank you so much for help!

                      I re-download all the projects from github to make sure that everthing is fresh.

                      Even though there was an error says that a .o file can not be found in the directory, it turns out that is because I did not match the configuration of CoreNG and RepRapFirmware ( I choose the SAM4E8E for CoreNG but Duet2_RTOS for ReprapFirmware). After I change the configuration of CoreNG to SAM4E8E_RTOS, everything is ok now.

                      Hope that might help someone else.

                      dc42undefined 1 Reply Last reply Reply Quote 0
                      • dc42undefined
                        dc42 administrators @Albert
                        last edited by

                        @albert said in Cant build RepRapFirmware:

                        Even though there was an error says that a .o file can not be found in the directory, it turns out that is because I did not match the configuration of CoreNG and RepRapFirmware ( I choose the SAM4E8E for CoreNG but Duet2_RTOS for ReprapFirmware). After I change the configuration of CoreNG to SAM4E8E_RTOS, everything is ok now.

                        That's correct. The SAM4E8E non-RTOS build of CoreNG is used by the DuetIAP project.

                        Duet WiFi hardware designer and firmware engineer
                        Please do not ask me for Duet support via PM or email, use the forum
                        http://www.escher3d.com, https://miscsolutions.wordpress.com

                        1 Reply Last reply Reply Quote 0
                        • First post
                          Last post
                        Unless otherwise noted, all forum content is licensed under CC-BY-SA