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

    Failed to compile RF3.4

    Scheduled Pinned Locked Moved
    Firmware installation
    5
    21
    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.
    • JoergS5undefined
      JoergS5 @Giuliano
      last edited by

      This post is deleted!
      1 Reply Last reply Reply Quote 0
      • dc42undefined
        dc42 administrators @Giuliano
        last edited by dc42

        @giuliano you are looking at the wrong location because you haven't taken account of some occurrences of ..\ in the path that I quoted. The correct location on my machine is C:\Program Files (x86)\GNU Arm Embedded Toolchain\10 2021.10\arm-none-eabi\lib\thumb\v7e-m+dp\hard.

        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

        Giulianoundefined 1 Reply Last reply Reply Quote 0
        • Giulianoundefined
          Giuliano @dc42
          last edited by

          @dc42 : you're right, it's there. Don't know how I could miss it 🙂
          Any Idea what I could try to solve that undefined reference to `pow' and 'llrint' ?
          Do I need to add a reference to libm.a somewhere?

          Thanks
          Giuliano

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

            @giuliano I don't know why you are getting those errors and I am not, however I do know that sometimes the Gnu linker can fail to pick up a library function because it scanned the libraries in the wrong order. If that's the case then adding libm at the end of the library list might help.

            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
            • dc42undefined
              dc42 administrators @Giuliano
              last edited by dc42

              @giuliano PS there is also a --verbose switch that you could add to the linker command, in case the output gives a hint about what is failing. See https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_node/ld_3.html.

              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

              Giulianoundefined 1 Reply Last reply Reply Quote 0
              • Giulianoundefined
                Giuliano @dc42
                last edited by

                @dc42 Thanks for the hints. Adding libm didn't help, and through the --verbose command i have seen that the library succeeds loading in previous steps (?).

                i don't really know what else I could try.. do you see anything suspect in my log?

                Thanks
                Giuliano

                log.txt

                1 Reply Last reply Reply Quote 0
                • Giulianoundefined
                  Giuliano
                  last edited by

                  I copied libm from the GNU Arm Embedded Toolchain to one of the projects build folder (C:\Eclipse\Firmware\RRFLibraries\SAME70_RTOS) and added libm to the library list again as you suggersted and it works this way.
                  Not sure why the build process wasn't reading it from the original folder, although in the log i saw the entry:
                  attempt to open c:/program files (x86)/gnu arm embedded toolchain/10 2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+dp/hard\libm.a succeeded

                  You can close this thread i think.

                  Thanks a lot for your help

                  GingerGradStudentundefined 1 Reply Last reply Reply Quote 0
                  • GingerGradStudentundefined
                    GingerGradStudent @Giuliano
                    last edited by

                    @giuliano @dc42 I have encountered the same errors. I am very new to this entire process and I am confused by what you mean by adding libm to the "library list". What / where is this list you are adding it to? I have the libm file and I have moved it to the RRFLibraries folder, so it is just the library list I need guidance to.

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

                      @gingergradstudent I mean add it to the list of libraries in the linker settings, after supc++. It probably isn't necessary to copy it anywhere.

                      f0886b34-0806-45f3-be54-80af994243e5-image.png

                      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

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

                        Further to my previous reply, this linker error only occurs when using Eclipse 2022-06, whereas I have been building with Eclipse 2022-03. A fix is to add "m" (not "libm" as I suggested previously) without quotes to the linker library list. I will add this to the project configuration.

                        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

                        GingerGradStudentundefined 1 Reply Last reply Reply Quote 0
                        • GingerGradStudentundefined
                          GingerGradStudent @dc42
                          last edited by

                          @dc42 I installed Eclipse 2022-03 instead of Eclipse 2022-06 and that fixed everything. Thanks!

                          Kmarkstteundefined 1 Reply Last reply Reply Quote 0
                          • Kmarkstteundefined
                            Kmarkstte @GingerGradStudent
                            last edited by

                            @gingergradstudent @dc42
                            Thank you very much, I also managed to compile it

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