This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Problem with "TO" command in linker command file

I have quite a lengthy (but otherwise functional) linker command file I use to position all my segments to my liking.

What I want to do, however, is force the output name of the ABS and the HEX file.

The Utilities book shows the "TO Sample.ABS" as a way to do this, but I cannot find a place to put such a line in the linker command file where it doesn't cause a linker error.

Example of my .lin file (clipped)

CODE (2000H, seg1( 100h), seg2) &&
STACK( ?Stack ( 0B0H ) ) &&

RAMSIZE(256) &&
NOOVERLAY NOLINES PAGELENGTH(10000)

Where in this file can I place the "TO" directive where it won't hatch the command line?

Parents
  • uVision1 automatically specifies the TO command. If you specify it ALSO, the liker doesn't know which one to use and so it probably generates something lik "respecified directive" or something like that.

    If that's the case, you can create a complete linker response file and tell uVision not even to generate the list of OBJ files. However, whenever you change the project, you'll have to update the linker response file.

    Jon

Reply
  • uVision1 automatically specifies the TO command. If you specify it ALSO, the liker doesn't know which one to use and so it probably generates something lik "respecified directive" or something like that.

    If that's the case, you can create a complete linker response file and tell uVision not even to generate the list of OBJ files. However, whenever you change the project, you'll have to update the linker response file.

    Jon

Children
  • That's what I just did and it works fine.

    I added my OBJs to the top of my command file, then created a batch file to invoke BL51 as such:

    BL51 @mycmd.lin TO myprog.abs
    OH51 myprog.abs HEXFILE(myprog.hex)
    

    This actually isn't a bad thing because I can then invoke the bat file from within a custom tool in the MSVC++ editor (which I use for its features...and I also have it voice trained)

    I suppose I could even add the A51.exe and C51.exe commands to the bat file and build the whole shmear in one shot...considering that they all compile in the blink of an eye anyway.