#26 'Browse' button for the linker file

Next Release
closed
None
5
2014-02-14
2014-01-19
No

Windows7 64bit, using Version 1.8.1-201401111229 released.
It would be great if the dialog for the linker file (-T option) would have a 'browse' or similar button (like for the assembler/compiler Include paths), so I could browse for the linker file.
Right now I need to type in the path/file name, so browsing and selecting the linker file would be a great feature.

Thanks!

1 Attachments

Discussion

  • Liviu Ionescu (ilg)

    • status: open --> open-accepted
    • assigned_to: Liviu Ionescu (ilg)
     
  • Liviu Ionescu (ilg)

    I'm a bit confused, the GUI element to manage the script files is a multi-line edit (see attached picture), and, as far as I know, there are no buttons there (I need to check for details).

    As a general idea, this is just a list of names, without paths.

    The path is separately configured with -L.

     
    • Liviu Ionescu (ilg)

      As a general idea, this is just a list of names, without paths.
      The path is separately configured with -L.

      I just noticed that this configuration, although extensively used in my templates, is not explained at all in the documentation...

      I need to address this...

       
      • Erich Styger

        Erich Styger - 2014-01-19

        Yes, the -L is for the library search path. But I see -L used for the libraries (*.a files), but common usage is not to use -L for the linker script file (altough it could). At least the projects I remember (and did for myself) are using -L for the library search path, but the linker file is handled outside of this.

         
        • Liviu Ionescu (ilg)

          From the GNU ld manual:

          -L searchdir
          --library-path=searchdir

          Add path searchdir to the list of paths that ld will search for archive libraries and ld control scripts. You may use this option any number of times. The directories are searched in the order in which they are specified on the command line. Directories specified on the command line are searched before the default directories. All ‘-L’ options apply to all ‘-l’ options, regardless of the order in which the options appear. ‘-L’ options do not affect how ld searches for a linker script unless ‘-T’ option is specified.
          If searchdir begins with =, then the = will be replaced by the sysroot prefix, a path specified when the linker is configured.
          The default set of paths searched (without being specified with ‘-L’) depends on which emulation mode ld is using, and in some cases also on how it was configured. See Section 2.2 [Environment], page 36.
          The paths can also be specified in a link script with the SEARCH_DIR command. Directories specified this way are searched at the point in which the linker script appears in the command line.

           
  • Erich Styger

    Erich Styger - 2014-01-19

    Attached is a screenshot of the dialog for the linker -T option. What I'm asking for is the 'Workspace...' and 'File System...' buttons (see other screenshot) to browse for the file.

     
  • Erich Styger

    Erich Styger - 2014-01-19

    somehow can only attach one file? here is the screenshot with what I suggest to have as buttons.

     
  • Erich Styger

    Erich Styger - 2014-01-19

    not sure if you could browse for files (the includes for assembler and linker are for directories, not files). Attached is what CW has in the plugin as browse button for reference.

     
    • Liviu Ionescu (ilg)

      Does the Browse button automatically generate the ${ProjDirPath} prefix? Or it generates absolute paths and you have to manually trim the path?

      Using macros in paths is ok, but without the plug-in automatically generating them, the plain absolute paths are a big pain in the... rear, especially when sharing projects, since those projects are no longer portable and need manual adjustments.

      Thank you for your research, I'll try to find a solution to add the Browse button, but the default should be to generate relative paths.

       
  • Erich Styger

    Erich Styger - 2014-01-19

    actually, your plugins have that additional buttons in the Linker>Miscellaneous>Other objects, so it is possible to have it for files (see attached).

     
  • Erich Styger

    Erich Styger - 2014-01-22

    YES! This was exactly what I was looking for :-)
    Thank you so much!
    Just one thing: 'File System...' button works, but when I press 'Workspace...' nothing happens?

     
    • Liviu Ionescu (ilg)

      that's strange, I just checked on windows and it allowed me to browse the workspace files, and generated the following entry, which looks as expected:

      "${workspace_loc:/${ProjName}/ldscripts/sections.ld}"

      could you restart Eclipse, create a new project, and test again?

       
  • Erich Styger

    Erich Styger - 2014-01-22

    I even tried rebooting, it did not help.
    But I have found now the problem.
    The browse button works if the text in the dialog is empty.
    But it does not work if I have already a path in it like
    ..\Project_Settings\Linker_Files\ProcessorExpert.ld
    Looks like the dialog/buttton tries to use this as the start, and fails?

     
  • Liviu Ionescu (ilg)

    I confirm this behaviour, editing existing entries fails, and require clearing the content first.

    It looks like a CDT bug, I'm not sure I can do something in the plug-in to avoid it.

     
  • Erich Styger

    Erich Styger - 2014-01-23

    Yes, I believe this is a CDT bug too, as it happens for other panels too. Ironiquly, I had not noticed this bug until I started to use relative paths as you suggested, like
    ..\Project_Settings\Linker_Files\ProcessorExpert.ld
    and it works with 'absolute' paths using macros like:
    ${workspace_loc:/gnuarm_test/Project_Settings/Linker_Files/MKL25Z128_flash.ld}

     
  • Liviu Ionescu (ilg)

    Ironiquly, I had not noticed this bug until I started to use relative paths as you suggested

    :-)

    I was sure you'll say this... Then it looks like I have to fix this CDT bug...

    I'll do this as soon as Kepler SR2 is out (in Feb), since now I doubt they'll have time to analyse my patch.

     
  • Erich Styger

    Erich Styger - 2014-01-23

    Sounds good to me!
    Anyway, it works the first time you set up things, and with the two buttons it is easier then before :-)

     
  • Liviu Ionescu (ilg)

    • status: open-accepted --> closed
     
  • Liviu Ionescu (ilg)

    available from 2.1.1-201402140758

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks