Spaces in file names giving me L204 errors from BL51

I am attempting to use the BL51 linker from the command line using the following as input:

c:\Keil\C51\BIN\BL51.exe C:\Documents and Settings\fya\My Documents\Design05\main.OBJ TO C:\Documents and Settings\fya\My Documents\Design05\Design05.hex IX

But I get the following output:

BL51 BANKED LINKER/LOCATER V5.03 - SN: K1S7U-T9879U
COPYRIGHT KEIL ELEKTRONIK GmbH 1987 - 2002

*** FATAL ERROR L204: INVALID KEYWORD POS: 17 C:\KEIL\C51\BIN\BL51.EXE C:\DOCUMENTS AND #

I tried putting quotes around the file names, so that they would be passed in as single arguments, but I get the same error message.

Additionally, I ran an experiment using the uVision2 IDE. I created a project with an object file in it and had it link. I then looked in the resulting M51 file to find the linker command line. It looked as follows:

C:\KEIL\C51\BIN\BL51.EXE W:\Design 01\main.obj TO My Spaces RAMSIZE (256)

The linking was successful. I then tried to link from the command line using the above and got the following:

BL51 BANKED LINKER/LOCATER V5.03 - SN: K1S7U-T9879U
COPYRIGHT KEIL ELEKTRONIK GmbH 1987 - 2002

*** FATAL ERROR L204: INVALID KEYWORD POS: 22 C:\KEIL\C51\BIN\BL51.EXE W:\DESIGN 01\MAIN.OBJ #

I assume BL51 plays nice with files that have spaces in their names, since I am able to link files with explicit spaces through the uVision2 IDE. Any hints as to what I am doing wrong here?

Thanks,

Ian

  • BL51 BANKED LINKER/LOCATER V5.03

    You're aware that this version is quite old, right?

    I tried putting quotes around the file names,

    ... and it didn't occur to you that it might be a good idea to show us how you tried that?

    I then looked in the resulting M51 file to find the linker command line.

    That's not really the right place to look. The M51 file is output by the linker, so it shows you the command line as seen by BL51, not how the IDE constructed that command. Actually the IDE didn't even have to build a command line, as it doesn't go through the command line shell to invoke BL51.

    My general recommendation is: avoid blanks-in-filenames, period.

  • There is a discussion of spaces in filenames towards the end of this thread: http://www.keil.com/forum/docs/thread10545.asp

    I certainly remember that uVision-2's handling of quoting filenames (to cope with spaces) was faulty - as mentioned in that thread.

    Just don't do it!

More questions in this forum