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

    Help me find "linker script" in source code

    Scheduled Pinned Locked Moved
    Firmware developers
    6
    14
    667
    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.
    • botundefined
      bot
      last edited by

      I'm a total newb. I'm trying to learn about embedded C programming, to better understand how RRF works. Where can I find the linker script? What is its filename and location? I'm such a newb I have no idea about conventions like this.

      arhiundefined 2 Replies Last reply Reply Quote 0
      • oliofundefined
        oliof
        last edited by

        I assume you already did read through https://github.com/Duet3D/RepRapFirmware/blob/dev/BuildInstructions.md and have a working build setup?

        <>RatRig V-Minion Fly Super5Pro RRF<> V-Core 3.1 IDEX k*****r <> RatRig V-Minion SKR 2 Marlin<>

        botundefined 1 Reply Last reply Reply Quote 0
        • arhiundefined
          arhi @bot
          last edited by

          This post is deleted!
          1 Reply Last reply Reply Quote 0
          • A Former User?
            A Former User
            last edited by

            i was under the impression eclipse generate that on the fly behind the scenes?

            arhiundefined 1 Reply Last reply Reply Quote 0
            • arhiundefined
              arhi @bot
              last edited by

              @bot said in Help me find "linker script" in source code:

              Where can I find the linker script? What is its filename and location?

              not that simple for project as complex with so many targets

              e.g. for duet2ethernet linker scripts are (flash.ld is what you want to look at):

              https://github.com/Duet3D/CoreNG/tree/master/variants/duetNG/linker_scripts/gcc

              1 Reply Last reply Reply Quote 1
              • arhiundefined
                arhi @A Former User
                last edited by

                @bearer said in Help me find "linker script" in source code:

                i was under the impression eclipse generate that on the fly behind the scenes?

                not really 🙂
                there are are some "default" linker scripts that come with "chip support" and some tools can create the linker script using input (what cpu, do you have external sram etc etc) but usually you have to deal with it yourself (I must say I'm far from master wrt that 😞 but I dabble)

                1 Reply Last reply Reply Quote 0
                • botundefined
                  bot @oliof
                  last edited by bot

                  @oliof said in Help me find "linker script" in source code:

                  I assume you already did read through https://github.com/Duet3D/RepRapFirmware/blob/dev/BuildInstructions.md and have a working build setup?

                  Lol. No. Not at that point yet. I'm just learning about everything first. Like, introductory courses in C and embedded C. In these courses they mentioned linker scripts. I then searched the codebase on GitHub for linker script, and found comments referencing it but alas found no "linker script."

                  At the moment, I'm just curious about what would be in there, and how the memory is mapped for the different boards. I'm getting the sense that these scripts are built at compile time automatically?

                  @arhi said in Help me find "linker script" in source code:

                  @bearer said in Help me find "linker script" in source code:

                  i was under the impression eclipse generate that on the fly behind the scenes?

                  not really 🙂
                  there are are some "default" linker scripts that come with "chip support" and some tools can create the linker script using input (what cpu, do you have external sram etc etc) but usually you have to deal with it yourself (I must say I'm far from master wrt that 😞 but I dabble)

                  @arhi said in Help me find "linker script" in source code:

                  @bot said in Help me find "linker script" in source code:

                  Where can I find the linker script? What is its filename and location?

                  not that simple for project as complex with so many targets

                  e.g. for duet2ethernet linker scripts are (flash.ld is what you want to look at):

                  https://github.com/Duet3D/CoreNG/tree/master/variants/duetNG/linker_scripts/gcc

                  Well, thank you!! I will check these out. [edit: these are exactly what I was looking for, thank you!]

                  I wish that GitHub repos were more noob-friendly, with a "description" in the directory/file tree structure, rather than just commit messages.

                  [edit: I get it now. I was looking in the RRF repo. That's an abstraction layer. I wanted to be looking at CoreNG, which is the... part that comes before the OS? Or the part that comes after the OS? Or whatever it's not RRF! 😛 ]

                  arhiundefined 1 Reply Last reply Reply Quote 0
                  • arhiundefined
                    arhi @bot
                    last edited by

                    @bot said in Help me find "linker script" in source code:

                    I wanted to be looking at CoreNG, which is the... part that comes before the OS? Or the part that comes after the OS? Or whatever it's not RRF! 😛 ]

                    The structure of the whole RRF is not to my liking (nothing wrong with it, just not what I am used to. For example, smoothieware, while waaaaaaaaaaaaaay less powerful than RRF, has the structure that's something I'm used to) and that's the main reason I was delaying my move to RRF for many years... but I bit the bullet and I didn't regret it. I'm still not fully clear on the RRF structure myself. I can build the firmware and make small adjustments but that's it. Still more time needed till I fully grasp the structure.

                    It would be cool if a document explaining the RRF structure existed, but it's not a simple thing to write, even harder to maintain, if not done by the firmware developer. And takes a huge amount of time from the firmware developer so... and I guess we all prefer bugfixes and new features to documentation 😄 😄 😄

                    IMHO the best way to understand embedded development and how RRF work is to make this documentation 😄 .. bug dc42 trough PP/Forum/email/phone to gather info and than articulate it into a wiki :). Starting point can be

                    • readme.md from all the projects
                    • https://github.com/Duet3D/RepRapFirmware/blob/dev/BuildInstructions.md
                    • https://github.com/Duet3D/RepRapFirmware/blob/dev/RTOS_notes.md
                    • https://github.com/Duet3D/RepRapFirmware/blob/dev/AddingNewKinematics.md
                    botundefined jazbaatbadalgayeundefined 2 Replies Last reply Reply Quote 1
                    • botundefined
                      bot @arhi
                      last edited by bot

                      This post is deleted!
                      1 Reply Last reply Reply Quote 0
                      • jazbaatbadalgayeundefined
                        jazbaatbadalgaye @arhi
                        last edited by

                        This post is deleted!
                        arhiundefined 1 Reply Last reply Reply Quote 0
                        • arhiundefined
                          arhi @jazbaatbadalgaye
                          last edited by

                          @jazbaatbadalgaye each of those links show you where the page moved?!

                          https://github.com/Duet3D/RepRapFirmware/wiki/Building-RepRapFirmware
                          https://github.com/Duet3D/RepRapFirmware/wiki/Notes-on-using-FreeRTOS
                          https://github.com/Duet3D/RepRapFirmware/wiki/Adding-New-Kinematics

                          @dc42 there's an issue with https://github.com/Duet3D/RepRapFirmware/wiki/Notes-on-using-FreeRTOS does not allow me to view it

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

                            @arhi said in Help me find "linker script" in source code:

                            @dc42 there's an issue with https://github.com/Duet3D/RepRapFirmware/wiki/Notes-on-using-FreeRTOS does not allow me to view it

                            Where did you find that link?

                            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

                            oliofundefined 1 Reply Last reply Reply Quote 0
                            • oliofundefined
                              oliof @dc42
                              last edited by

                              @dc42 said in Help me find "linker script" in source code:

                              Where did you find that link?

                              It's linked at https://github.com/Duet3D/RepRapFirmware/blob/dev/RTOS_notes.md

                              <>RatRig V-Minion Fly Super5Pro RRF<> V-Core 3.1 IDEX k*****r <> RatRig V-Minion SKR 2 Marlin<>

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

                                @oliof thanks, I've added that page.

                                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
                                • First post
                                  Last post
                                Unless otherwise noted, all forum content is licensed under CC-BY-SA