This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Using multiple linker CMD files

Are all linker CMD files within a project used in a build of that project?

EG: If I have several .cmd files linked in the project explorer, but not add to the linked --library input property in the project properties, it seems they still added correctly?

Moreover, what controls the order they are added in? Does order matter (like cascading styles, etc)? 

I note a default project may automatically add F28027.cmd (as that's the device I have selected in the project setup) but I can also link F2802x_Headers_nonBIOS.cmd.

If I would like to add the files via properties instead of linking them in the explorer, do I need only add them in project > properties > Build > C2000 Linker > File Search Path > Include, or, should they be added in project > properties > build > link order as well/instead?

Thanks

EDIT: I have added the F28027.cmd and F2802x_Headers_nonBIOS.cmd files via the linker --library properties, I also have added a cmd file of my own with additional SECTIONS that resides in the project file and so is automatically added to the build. According to the .map file, this appears to work as intended, so maybe the order is not so important.

But is this the "correct" or intended way for such to work? Do the cmd files need to be specified anywhere else in the properties?

The reason I am looking at this is because I'd like to make some of my projects as portable as possible for sharing across a git installation, plus I also like to keep my project directory as clean as possible. This method of course also removes the need to add custom sections to the TI supplied cmd files.

Thanks

  • Hi Toby,

    Toby Mole said:
    Are all linker CMD files within a project used in a build of that project?

    Yes, unless it is explicitly excluded from the build

    Toby Mole said:
    Moreover, what controls the order they are added in? Does order matter (like cascading styles, etc)? 

    I believe it is alphabetical by default. But you can change the order via the Link Order

    Toby Mole said:
    If I would like to add the files via properties instead of linking them in the explorer, do I need only add them in project > properties > Build > C2000 Linker > File Search Path > Include, or, should they be added in project > properties > build > link order as well/instead?

    The former (-l) will work.

    Toby Mole said:
    EDIT: I have added the F28027.cmd and F2802x_Headers_nonBIOS.cmd files via the linker --library properties, I also have added a cmd file of my own with additional SECTIONS that resides in the project file and so is automatically added to the build. According to the .map file, this appears to work as intended, so maybe the order is not so important.

    It will work fine as long as you have no SECTIONS that overlap or are redefined

    Toby Mole said:
    But is this the "correct" or intended way for such to work? Do the cmd files need to be specified anywhere else in the properties?

    There is no specific rule on how to include cmd files to your project. Whatever works best for your environment. 

    Thanks

    ki

  • Many thanks Ki!