Author Topic: Adding a new Coldfire linker script file  (Read 4357 times)

Offline FAQ

  • Newbie
  • *
  • Posts: 26
    • View Profile
Adding a new Coldfire linker script file
« on: October 24, 2010, 05:09:02 PM »

When building for a spacial case (example to work together with the SREC loader) I need to be able to use a modified linker script file. How can I configure the project to use the new .lcf file that I have prepared for this?

Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3191
    • View Profile
    • uTasker
Re: Adding a new Coldfire linker script file
« Reply #1 on: October 24, 2010, 05:12:49 PM »

The best solution is to create a target for use when building for this configuration. In the explorer window on the left hand side of the CodeWarrior window, click on targets to see the ones presently available. Then, in the project menu select “create target” [the focus must be in the target window for the menu to appear]. Chose "clone existing target" and chose the one that is closest and it will make a copy of it. Then you can select this new target for use.

Back in the files view you can add your .lcf file. Click on the “linker command files” directory; right click mouse and “add files” - it will ask you which targets it is to be added to - so select only your new target.
You will now have several .lcf files in the “linker command files” directory. Two of these will have a black dot next to them in the target column – the one that was originally used and your new one. To remove the original one, double click on the dot next to it so that it disappears. This will leave just your own new one, which will then be used as linker script file when building this target. Other targets still exist unmodified so can be build as previously when required.