Keil™, An ARM® Company

Technical Support

µVISION: CHANGING FILE PATHS IN A PROJECT AFTER IMPORTING


Information in this article applies to:

  • C166 Version 4.03
  • C51 Version 6.00

QUESTION

I have just successfully imported a µVision project into µVision Version 2 (V2). However, I need to change the paths to my source files since I moved them to a new directory. Is there a way to do that in µVision V2?

ANSWER

The Import project file feature is intended only to facilitate upgrading from µVision Version 1.x to µVision V2. Reorganizing the project directory structure is a different task.

Deleting and re-adding each file is the safest way to do what you want.

If that is not desirable, you may edit the project file using a text editor, like notepad. To use this approach:

  1. Exit µVision V2.
  2. Make a copy of the project file (just in case the modified version doesn't work right).
  3. Look in your UV2 file for a line that says something like:
    PrjPath <C:\foo\junk\>
    
  4. Look for all the lines similar to:
    File 1,1,<.\sub\y.c><y.c>
    

    The first item in angle brackets is the pathname for the file, relative to the PrjPath. You must change the pathname. Don't change the filename part ('y.c' in this example) - it has to match the name in the second set of angle brackets.

    The directory name '.' means the current directory, i.e., the directory in the PrjPath line. So in this example the full pathname is 'C:\foo\junk\sub\y.c'

If this does not work for your project, you'll have to fall back on adding each file through µVision V2.

SEE ALSO

FORUM THREADS

The following Discussion Forum threads may provide information related to this topic.

Last Reviewed: Saturday, July 09, 2005


Did this article provide the answer you needed?
 
Yes
No
Not Sure