It seems that the order of the files within a Group, and the order of the Groups within a Target matters to uVision: the build process always examines the files in order as they appear within the Group, and the Groups in order as they appear within the Target. So, If I need to add file(s) and/or Group(s), how do I get them into the right order? Similarly, how can I re-order files and/or Groups if this becomes necessary? I'm using uVision v2.23.
For files, you can simply drap and drop then wherever you want. To move a file from one group into another group, simply drag it and drop it. For groups, you must modify the UV2 file directly with an editor like notepad. The format of this file is pretty obvious once you start looking at it. Be careful that you re-associate the files and options with the correct group. Jon
"modify the UV2 file directly with an editor like notepad" Ignoring the bit at the top, which says:
### uVision2 Project, (C) Keil Software ### Do not modify !
This highlights another problem with uVision's Project management: there is no way to control when a Project is saved; if you make a mistake, there's no way to discard the changes (apart from the hacking about with renaming the backup files). I think this needs to be high on the list of enhancements for the next release!
uVision2 V2.39 now allows provides a dialog where you can easily reorganize targets, groups, and files in a project. From the Project Menu in uVision2, select the Components, Environment and Books and there you go. uVision2 V2.39 is available in the C51 V7.07a update. Jon
I put my uVision project files (.uv2 and .opt) into version control along with the source. The previous version is always a click away. (You actually need to do this anyway for configuration management; if your goal is to reproduce an old configuration, it doesn't do you much good to be able to produce a set of 1.21 source without the 1.21 build options. And to be really correct (or paranoid), you need to version the entire toolset! If 1.21 was built with version 6 of the compiler, and now you're using version 7, you may not be able to reproduce the object code exactly.)
"I put my uVision project files (.uv2 and .opt) into version control..." Me too "You actually need to do this anyway for configuration management.." Absolutely. It is annoying that uVision doesn't give you the option to abandon changes to a Project. It is also annoying from the version-control perspective that uVision keeps user preferences in the same files as the "real" project configuration info. eg, this means that you have to remember to close all windows before you close a project to check it in to your version control system; otherwise the next guy to get it out of version control will be faced with all the open editor windows you last used!
uVision2 has two files. The *.UV2 file contains the project configuration. The *.OPT file the user preferences (local debugger settings, ect.). So it is enought to save the *.UV2 file under version control. The *.OPT file is not needed.