I'm building my project via the command line using something like this:
"C:\Program Files\Keil\UV4\Uv4.exe" -b ".\myProj.uvproj"
The problem is that this command does not send anything to the stdout. The only option I see is to output the results to a file, using the -o option. Is there any way of just showing the results in the same command prompt window without resorting to some ugly hack?
Also, is there any way to perform a clean on a project via the command line?
I ran into this when integrating my project with Eclipse. I have a batch file called "build.cmd" with the following contents:
c:\keil\uv4\uv4.exe -b RSN_BB0.uvproj -o errors.txt type errors.txt
Not sure if it's doable without an intermediate file, I tried various tricks with stdout to no avail.
Thanks for the answer; I'm doing roughly the same thing, but it feels like a hack. I don't really understand why it can't output directly to stdout. I though that I missed something in the documentation...
This is real pain in an automated build process / production software environment! Isn't there some other option?
I don't really understand why it can't output directly to stdout.
Largely because Windows GUI programs (like uVision) don't have any stdout stream in the first place, so nothing to output to.
Isn't there some other option?
There's always make, and it's load of descendants/variations.
Ah, but then you have to try to maintain synchronization between the make files and the UVPROJ/UVOPT file.
It appears that even the batch file creation hasn't been regression tested for some time. The "Make Batch files" functionality generates a batch file that will only work if you already have the intermediate files generated, i.e. it won't work for a clean build. NOT USEFUL FOR PRODUCTION.
If I go to make files, msbuild, maven or [N]ANT, then I don't see sufficient value in the licensing fees and will go with GNU tools and encourage others to do likewise.
True.
Doesn't really say much for uVision as a truly professional toll, does it?
"batch file that will only work if you already have the intermediate files generated, i.e. it won't work for a clean build"
I think that was the case when I tried this feature about 6 years ago!
"NOT USEFUL FOR PRODUCTION"
Indeed!
I misunderstood what the "*.__i" files are. They are compiler line inputs for each source file. I've never seen that arrangement for a build process. Quite unconventional. I thought they were some sort of intermediate file. My bad.
The batch file system does not return a non-zero value on error. As Per Westermark mentioned, one must write a tool that parses the "*.bat" files and generate new files (Ant XML, Makefile, etc.) so that return codes are checked, at a minimum. More complete would be to parse the "*.d", "*.__i", "*._ia", "*.lnp", and "*.bat" files into new build scripts (for the build tool of your choice.)
View all questions in Keil forum