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

How to specify a C source file on the command line

Instead of open a C source file from the menu in IDE, I want to load project file along with a C source file (possibly including a line number) on the command line. How to achieve it? Thanks.

Jau-Hung Chen

  • The uVision2 command line options are described (briefly) on p169 of the User's Guide 06.2000, "Getting Started and Creating Applications with µVision2 and the C51 Microcontroller Development Tools" (snappy little title, eh?!)

    Unfortunately, the list doesn't include the option(s) you require. :-(

    Note, however, that you can open a file by just double-clicking it in the Project window - you don't have to go via the file menu.
    To go to a line, right-click anywhere in the text of the file, and 'Go To Line' is in the pop-up menu.

    There is an App Note which suggests that you can drive uVision via DDE.
    Unfortunately I can't find any documentation on the DDE interface; I've asked Keil support, but nothing yet. [Hint to Keil!]

    I presume that this must be possible: after all, uVision manages to jump to the right line in the right file when you double-click an error in the Build window.
    So come on Keil; spill the beans!