Today I created 6 new projects to run under uVision 3. Every time I had to:
============================================================ Gary Lynch | To send mail, change no$pam in lynchg@no$pam.com | my domain name to stacoenergy
With uv2, I'd cheat, and edit the .uv2 file. It's just a text file. And while it has many a mysterious list of comma-separated integers or bitmap hex values, the target and group lists were pretty easy to modify.
"With uv2, I'd cheat, and edit the .uv2 file." I believe that uVision-3 uses exactly the same .uv2 and .opt files as uVision-2. I think that some of the settings mentioned by the OP would be in the .opt file. I'm sure I've mentioned this one before - it would be really useful to set up one's own set of defaults for all new projects. The closest I came was to create a "skeleton" project with the required settings (and directory structure) and then copy & rename the .uv2 and .opt files (and directory structure).
Erm.. a project definition is just a single file (the other one is just desktop settings --- it doesn't really hurt to lose it). So there's no need for a special instruction how to clone a default project: just copy it to a new name/location, and that's that.
"Erm.. a project definition is just a single file (the other one is just desktop settings --- it doesn't really hurt to lose it)." Actually, for C51 projects, the XTAL value is in the .opt file. :-( This is generally not too important, but worth noting. The .opt file also contains your custom file extension definitions, and possibly also custom Books, etc. If you "lose" the .opt file, you will have to re-do all those settings - I generally want the same (or very similar) settings for these options, so I do need to copy both the .uv2 and the .opt file.
I was not aware the .uv2 files were ASCII, and that presents interesting possibilities. I'm going to try to slap together a batch file with a modicum of programmability; will report back here later. Thanks to all who contributed!
Actually, for C51 projects, the XTAL value is in the .opt file. :-( Yeah. But the default value for that is taken from the device database. Which in turn is not completely out of bounds for editing itself. C'mon guys, show a bit of creativity! ;-) And BTW: I'm reasonably sure you can configure defaults for books and some other things in ...\keil\tools.ini without too much risk of breakage.
it seems that Keil address the IDE to the lowest common denominator. you can not replace the editor with a real editor. you can not create multiple variants of same code (e.g. for various types of the attached display) in one run. you can not do "dynamic replacemet" I got that far, had I gone on I would have found, I'm sure you can not you can not But if, like a good little programmer, you sit in your little corner and behave "normally" it seems OK Thank heaven for the .bat Erik
"you can not create multiple variants of same code (e.g. for various types of the attached display) in one run." True - a "Build All Targets" button would be useful. "you can not do 'dynamic replacemet'" What do you mean by that?
"I'm reasonably sure you can configure defaults for books and some other things in ...\keil\tools.ini without too much risk of breakage." The default set of books is defined in TOOLS.INI. The file extension stuff is in the .opt file alone.
"you can not do 'dynamic replacemet'" What do you mean by that? My "variants" use ~20 common files and ~3 files are "picked" e.g. for variant 3 copy ralph.cvar3 ralph.c Erik
True - a "Build All Targets" button would be useful. not really I have ~7 products each with 1-23 "targets". Were I to build the product with one "target" I would not want to spend the time to build the one with 23 "targets" at that time. I have sent Keil an example of what I am doing and - with no grudge, it is rather "advanced" - I do not see it becoming possible in the IDE. I am happy with my .bat procedure refined over 5 years. My acceptance of the fact that an IDE will not be able to do this in my lifetime, has stopped me arguing the shortcomings for any other purpose than getting other users with "advanced" needs, in this case Gary, to realize that you can do it beautifully in a .bat file and if you try to get such a setup wrestled into the IDE you will lose. You get (maybe with a new release) one step ahead, just to run into the next block. Erik
Those with complex project structures that want a more powerful build environment might be interested in Jam. http://www.perforce.com/jam/jam.html It's free. It's sort of like a smarter and more powerful make facility.
"Those with complex project structures that want a more powerful build environment might be interested in Jam." Looks interesting! Are you recommending this from experience, or is it just something you've seen?
C'mon guys, show a bit of creativity! ;-) Actually I'd rather put my creativity in producing some nice code instead of messing around with the tools.
"Actually I'd rather put my creativity in producing some nice code instead of messing around with the tools." Absolutely! Tools are supposed to help - not get in the way!