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

    Setting Up Eclipse For the new Firmware

    Scheduled Pinned Locked Moved
    General Discussion
    5
    46
    4.6k
    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 @jml
      last edited by

      @jml
      I think you should follow
      https://github.com/dc42/RepRapFirmware/blob/dev/BuildInstructions.md
      This should be sufficient to make a basic build.

      dc42undefined 1 Reply Last reply Reply Quote 0
      • JoergS5undefined
        JoergS5 @jml
        last edited by

        @jml

        you asked for DuetIAP
        LwipESP8266
        CoreESP8266
        CoreDuet

        Most of them are old or have 1.21 version as a comment. I suspect that they are not needed.

        When you build the projects, eclipse tells you which libraries or links are missing,

        Good luck and please tell me where you get stuck.

        1 Reply Last reply Reply Quote 0
        • JoergS5undefined
          JoergS5 @jml
          last edited by

          @jml said in Setting Up Eclipse For the new Firmware:

          /Users/John/eclipse-workspace5/RepRapFirmware-2.01/src/ReprapFirmware.h:129:2: error: 'coreDelay' was not declared in this scope
          and it repeats several times. Other errors:
          make: *** [src/Tools/Filament.o] Error 1
          make: *** [src/Storage/FileStore.o] Error 1
          make: *** [src/Storage/FileInfoParser.o] Error 1
          make: *** [src/Tools/Tool.o] Error 1
          In file included from ../src/StepperDrivers/TMC22xx/TMC22xx.cpp:8:0:

          I think the reason is;
          You did not rename the project to RepRapFirmware, so some hardcoded links will not work:

          Step 4: Then rename folder ReprapFirmware-dev in that folder to RepRapFirmware.

          Error 1 in make is that the tool cannot find the file, this makes sense.

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

            @joergs5 said in Setting Up Eclipse For the new Firmware:

            @jml
            I think you should follow
            https://github.com/dc42/RepRapFirmware/blob/dev/BuildInstructions.md
            This should be sufficient to make a basic build.

            I confirm that, the up to date build instructions are the ones in the dev branch, not v2-dev.

            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

            jmlundefined 1 Reply Last reply Reply Quote 0
            • jmlundefined
              jml @dc42
              last edited by jml

              I was looking at the BuildInstructions.md within the RepRapFirmware-2.01 folder, but I will follow the ones at the link sent in the above comments and will report back.

              The BuildInstructions say to keep the folder names as-is. The folder name as-is is RepRapFirmware-2.01, but I feel like I should change it to just RepRapFirmware... is that right?

              1 Reply Last reply Reply Quote 0
              • jmlundefined
                jml
                last edited by jml

                Making progress. Using the proper Build Instructions this time. But now the first error that comes up (when building RepRapFirmware) is:

                In file included from ../src/Networking/ESP8266WiFi/WiFiInterface.cpp:9:0:
                ../src/Networking/ESP8266WiFi/WiFiInterface.h:16:10: fatal error: MessageFormats.h: No such file or directory
                #include "MessageFormats.h"
                ^~~~~~~~~~~~~~~~~~
                compilation terminated.

                But MessageFormats.h exists in the /Users/John/eclipse-workspace7/DuetWiFiSocketServer/src/include

                So I feel like it just can't see the socketserver folder. How do I link it or include it? CoreNG and FreeRTOS built fine by the way.

                JoergS5undefined 1 Reply Last reply Reply Quote 0
                • JoergS5undefined
                  JoergS5 @jml
                  last edited by JoergS5

                  @jml
                  WifiInterface.cpp I would try setting the reference by rclick on the project, properties, project references:
                  But your project workspace is in another one than in the other message (workspace7, workspace5), I would put all Duet related projects into one workspace.

                  This is not needed.

                  jmlundefined 1 Reply Last reply Reply Quote 0
                  • jmlundefined
                    jml @JoergS5
                    last edited by

                    @joergs5 When I go to Project References for RepRapFirmware, I see only CoreNG, and FreeRTOS. DuetWiFiSocketServer is not there. Do I need to import DuetWiFiSocketServer into Eclipse?

                    The reason I have different workspaces is because each time I try something new, I just start a new workspace and put in the original CoreNG, FreeRTOS, RRF, and socketserver folders into it. Reason for that is because I don't know if the things that I try mess up anything, so I like to start from scratch with a new workspace.

                    JoergS5undefined 2 Replies Last reply Reply Quote 0
                    • JoergS5undefined
                      JoergS5 @jml
                      last edited by

                      @jml I understand, this is totally ok, I do it the same way.

                      jmlundefined 1 Reply Last reply Reply Quote 0
                      • JoergS5undefined
                        JoergS5 @jml
                        last edited by JoergS5

                        @jml your question for DuetWiFi..: you should copy the DuetWiFi... files into the newest workspace you use, import it without the option to move the files (they are already in your new workspace), then it will show up in the build properties list and you can click it. Maybe you have to restart/rebuild all Eclipse, if it is not in the list.
                        this is not needed, and from DuetWifi you only need one .h file. See below

                        JoergS5undefined 1 Reply Last reply Reply Quote 0
                        • jmlundefined
                          jml @JoergS5
                          last edited by

                          That is exactly what I think I have been doing. Perhaps my importing is not right.

                          Option#1: This is what I would normally do. I would right click in the Navigator and select Import. Then I would select General > Existing Projects, and I'd select CoreNG and it would import. Then I would repeat for FreeRTOS and RepRapFirmware.

                          Option#2: File > Open Projects From File System. Select only CoreNG, FreeRTOS, and RepRapFirmware (and not selecting the socketserver one).

                          Using both options above, I still only get CoreNG and FreeRTOS in the project references for RepRapFirmware. The only way I can get the socket server one there is if I import it as a project, but then that causes a bunch of other errors.

                          I right click CoreNG to set active to SAM4E. For RRF I set active to Duet2_RTOS. This part should be fine I think.

                          JoergS5undefined 1 Reply Last reply Reply Quote 0
                          • JoergS5undefined
                            JoergS5 @JoergS5
                            last edited by JoergS5

                            @joergs5 I had problems updating the list of dependencies. Fastest way to resolve it, copy all necessary projects into a new workspace, then after setting the new workspace import them in one step (without file move), then it will all show up in the list.
                            this is not needed, see below

                            1 Reply Last reply Reply Quote 0
                            • JoergS5undefined
                              JoergS5 @jml
                              last edited by

                              @jml my importing procedure is:

                              1. copy files unzipped into the workspace
                              2. open eclipse, say file - import - general/existing projects into workspace - next
                              3. select root directory: select the workspace
                              4. select all project - finish
                              1 Reply Last reply Reply Quote 0
                              • jmlundefined
                                jml
                                last edited by jml

                                I will do it that way next time i create a new workspace. For now, I will just import DuetWiFiSocketServer. Here is how it went.

                                When I import DuetWiFiSocketServer, and right click it, and go to Properties, C/C++ Build, Settings, the path there is:
                                C:\Users\David\AppData\Local\Arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2\bin

                                I assume this should be changed (I'm on a Mac), but not sure to what. I put it as /usr/local/bin/ not sure if thats correct. I was able to select the checkbox for DuetWiFiSocketServer in the settings for RepRapFirmware by the way.

                                I checked /Users/John/Library/Arduino15/packages , but the only folder in there is a folder called "arduino"

                                The error I get when building RRF (after building coreng and freertos) is:

                                In file included from ../src/Networking/ESP8266WiFi/WiFiInterface.cpp:9:0:
                                ../src/Networking/ESP8266WiFi/WiFiInterface.h:128:22: error: 'NumWiFiTcpSockets' was not declared in this scope
                                WiFiSocket *sockets[NumWiFiTcpSockets];

                                Not sure if I am making progress now. Time to go to sleep.

                                JoergS5undefined 5 Replies Last reply Reply Quote 0
                                • JoergS5undefined
                                  JoergS5 @jml
                                  last edited by

                                  @jml well, my help is limited, as I have no Mac.

                                  Path names should be ok as you wrote.

                                  The documentatio is bit limited for the Mac, you should check the Windows documentation also, as there is some important information found like the reference into about MessageFormats.h

                                  Dream well of Eclipse 😉 and tomorrow you can restart with new ideas.

                                  1 Reply Last reply Reply Quote 0
                                  • JoergS5undefined
                                    JoergS5 @jml
                                    last edited by

                                    @jml I saw the solution for your coreDelay problem:
                                    in Eclipse you have to set the build target. The default is Duet085. When you build with this, the error coreDelay appears.
                                    Please set the target to Duet2_RTOS, then this error does not appear when you build:

                                    0_1532863611479_duet_rtos_target.jpg

                                    jmlundefined 1 Reply Last reply Reply Quote 0
                                    • JoergS5undefined
                                      JoergS5 @jml
                                      last edited by

                                      @jml some of your make errors may be this cause:

                                      I used MessageFormats.h according to step 5a of documentation directly. I had error messages and found forum message
                                      https://reprap.org/forum/read.php?416,818300
                                      so I used dev version, worked good after this change.

                                      1 Reply Last reply Reply Quote 0
                                      • JoergS5undefined
                                        JoergS5 @jml
                                        last edited by JoergS5

                                        @jml I made an error and want you to avoid it: I had a lot of compilation errors. Now I found out that I used CoreNG-master. It is necessary to use CoreNG-2-dev (branch v2-dev) instead.
                                        Rename unzipped CoreNG-2-dev to CoreNG before importing.

                                        Before compiling, the following settings are necessary: in properties - C/C++ Build - Settings

                                        • Build Variables - GccPath must be on the new GNU Tools path for 2018q2
                                        • in Environment with PATH must include the path to the make tool
                                          Before I set the values, I choose Configuration - All configurations in the drop box above.
                                          Then set Build configurations - Set Active - SAM4E8E_RTOS.

                                        I used make from
                                        https://gnu-mcu-eclipse.github.io/https://gnu-mcu-eclipse.github.io/
                                        They have a Mac version also.

                                        This compiled NodeNG without errors.

                                        1 Reply Last reply Reply Quote 0
                                        • JoergS5undefined
                                          JoergS5 @jml
                                          last edited by JoergS5

                                          @jml ok, now RepRapFirmware compiled correcly also (at last!).

                                          I created a file MessageFormats.h in the src folder and copied the content of the Wifi-dev into it.

                                          Crosssetting, Path and Gccpath set.
                                          Duet2_RTOS as target set.
                                          Clean Project
                                          Build Project

                                          It is not necessary to set any Build dependencies as I wrote earlier. The projects are connected by their project names (that's the reason why they need to be renamed).

                                          I was not able to compile DuetWifiSocketServer yet. I get a lot of Arduino.h not found and such errors.

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

                                            @joergs5 said in Setting Up Eclipse For the new Firmware:

                                            I was not able to compile DuetWifiSocketServer yet. I get a lot of Arduino.h not found and such errors.

                                            You don't need to compile that project, unless you want to build new WiFi firmware. But RepRapFirmware uses one include file from it (MessageFormats.h), so you need to import the project into your workspace, or at least that one file.

                                            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

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