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

linker error: invalid constant

Can anyone tell me what goes wrong while linking the files:

linking...
*** FATAL ERROR 206: INVALID CONSTANT
POS:75
EXE filename1.obj, filename2.obj TO filename RAMSIZE (256) CODE (0X0000) #
Target not created

  • You should be able to just click on the message in uVision, press F1, and the description will pop up.

    Also, all the error messages for the Keil tools are described in the appropriate manual, and all the manuals are supplied in PDF format on the free CD and are accessible on the 'Documents' tab of the uVision Project window.

    See p345 of the "Macro Assembler and Utilities for 8051 and Variants User's Guide 07.2000:"

    206 INVALID CONSTANT
    A constant in the invocation line is invalid; e.g., a hexadecimal number with a leading letter. The command line is displayed up to and including the point of error.


    So it looks like the '#' is your problem?

  • Can we have the complete linker command line from the .m51 file?

    EXE filename1.obj, filename2.obj TO filename RAMSIZE (256) CODE (0X0000) #

    The (0X0000) seems wrong, I think it needs to be a range like this:

    CODE (0X0000-0XFFFF)
    - Mark