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

    How to get eclipse use the correct Pins_*.h?

    Scheduled Pinned Locked Moved Solved
    Firmware developers
    2
    5
    433
    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.
    • wilrikerundefined
      wilriker
      last edited by

      I have everything for RRF setup in eclipse. It is working. I can compile successfully and get working binaries out of it. There is just one annoying thing that I cannot get to work correctly:

      It only looks at Pins.h for the feature flags like SUPPORT_WORKPLACE_COORDINATES or SUPPORT_LASER and all of the others.

      In my case I use Duet2_RTOS as the active build configuration and to all I can see it should recognize src/DuetNG/Pins_DuetNG.h but it doesn't.
      This leaves me with sometimes hard to navigate code parts where something is enclosed in #ifdef XXX ... #endif and eclipse evaluates XXX to 0 because that's the value in Pins.h but in Pins_DuetNG.h it is redefined to be 1. And it just won't let me navigate code in this case.

      What could I check/do about that?

      Manuel
      Duet 3 6HC (v0.6) with RPi 4B on a custom Cartesian
      with probably always latest firmware/DWC (incl. betas or self-compiled)
      My Tool Collection

      1 Reply Last reply Reply Quote 0
      • wilrikerundefined
        wilriker
        last edited by

        Found it. Although the indexer was enabled in global settings with correct values I had to go to
        Project -> Properties -> C/C++ General -> Indexer
        and tick Enable project specific settings.

        All of the so called project specific settings are absolutely identical to the ones of the global indexer but now it works. 🤦

        Manuel
        Duet 3 6HC (v0.6) with RPi 4B on a custom Cartesian
        with probably always latest firmware/DWC (incl. betas or self-compiled)
        My Tool Collection

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

          It works for me. What version of Eclipse are you using? I use Version: 2018-09 (4.9.0).

          There is a setting in Eclipse to rebuild the index when you switch build configuration, and I have that selected.

          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

          wilrikerundefined 1 Reply Last reply Reply Quote 0
          • wilrikerundefined
            wilriker @dc42
            last edited by

            @dc42 I am using Version: 2018-12 (4.10.0) but it never worked in any version for me. I rebuilt the index about a million times already. Also it shows the src/DuetNG folder as excluded in the Project Explorer even though it obviously includes it when compiling because it builds the binaries without any issues.

            I also tried to add the folder explicitly to
            Project Properties -> C/C++ General -> Preprocessor Include Paths, Macros etc. -> CDT User Setting Entries
            in all of the available forms. It just does not want to read this file.

            Switching build configurations back and forth also did not help. I mean, I can work with it and found my ways around it but it would be nicer not to have to use global search to find things that I cannot jump to because they are inside #ifdef blocks.

            Manuel
            Duet 3 6HC (v0.6) with RPi 4B on a custom Cartesian
            with probably always latest firmware/DWC (incl. betas or self-compiled)
            My Tool Collection

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

              I sometimes find that in order to get the correct folders shown, I have to select another configuration, then go back to the one I want.

              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
              • wilrikerundefined
                wilriker
                last edited by

                Found it. Although the indexer was enabled in global settings with correct values I had to go to
                Project -> Properties -> C/C++ General -> Indexer
                and tick Enable project specific settings.

                All of the so called project specific settings are absolutely identical to the ones of the global indexer but now it works. 🤦

                Manuel
                Duet 3 6HC (v0.6) with RPi 4B on a custom Cartesian
                with probably always latest firmware/DWC (incl. betas or self-compiled)
                My Tool Collection

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