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.
Because it is, essentially, an interactive tool - so everything happens through the GUI (Graphical User Interface).
For non-interactive use - when there is, effectively, no User - make or some equivalent would be more appropriate.
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 used the contents of the output directory as information to manually write a Makefile.
*.__i contains the compiler options needed when compiling each object file. *.d contains the dependancies for each source file. <proj>.lnp contains information for linking.
All that is missing is an automatic tool to scan these files and create a real Makefile.
View all questions in Keil forum