Uploaded image for project: 'Qbs ("Cubes")'
  1. Qbs ("Cubes")
  2. QBS-472

Add a new property to specify a list of linker scripts

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Done
    • P2: Important
    • 1.2.0
    • 1.1.1
    • General
    • None
    • c99d3367f832ff463bebb3bbdeffb1089224b4b5

    Description

      The main idea of this - to add support of some new cpp.linkerScripts property for the CppModule in QBS. It is required only for the embedded projects which have no OS, e.g. with use of the BareMetal plug-in from the QtCreator.

      Such projects, e.g. for a ARM MCU's targets (like stm32 and so forth) require a manual configuration of the placement of executable code in RAM/ROM/FLASH according to the specification of the memory address space on the each model of MCU.

      Usual, this configuration is set in the linker scripts files. Names of these files are passing to the compiler (linker).

      For example, for the GCC compiler these files have extension as *.ld (as usual) and are passed with the parameter "-T script_file". For more detail see:

      http://gcc.gnu.org/onlinedocs/gcc/Link-Options.html#Link-Options

      http://www.math.utah.edu/docs/info/ld_3.html#SEC4

      When using QBS these parameters can be passed so:

      cpp.linkerFlags: [ "-T", "<path/to/script/file>" ]

      But it is inconvenient because in this case it is necessary to rewrite each time a path to a script file in case change the source directory of the QBS project and so on.

      Thus, I suggest to introduce a new linkerScripts property for CppModule which contains the list of required scripts for a linking, by analoggy with the includes directories and so on, e.g.:

      cpp.linkerScripts: [ "<scriptfile1>", "<scriptfile2>" ]

      In this case:

      • There is no need to rewrite paths to the scripts files each time. Because paths are specified as relative to the main *.qbs file of the project.
      • There is no need a pass the "-T" key because it will be done automatically.
      • On future can be add a some set of patches to the QbsProjectManager to display a list of script files in the project tree to edit or view it.

      Note: Of course, this suggestion while only for the GCC compiler for the BareMetal projects. On future maybe extend it to the something others..

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            kuzulis Denis Shienkov
            kuzulis Denis Shienkov
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes