Hello All, I have an up and running batchfile (please refer to my earlier request), to compile, link and creat a hex file from the command prompt. I want to migrate onto 'using minimum tool installation' i.e. to build using a batchfile without the entire KEIL installation on my PC. (1) What would I require as minimum tool installation? (2) What are the precautions or procedures that I follow and observe?? Thanking you in advance. Kathy. /**********************************/ Message posted on 01/16/06 " I am trying to understand how to build a uv2 project from command line. Presently when the (eg test.uv2) project is clicked open, it defaults to the uv2 IDE for build, compile and link. Is there any way,that a project can be built, compiled and linked from command line without resorting to the IDE? The idea is that someone without a knowledge of the IDE, should simply be able to compile the project with a given set of instructions."
To out do use of dongle If this means "use full keil without the dongle" than it should read "how do I violate the agreement I have made with keil re the use of the software. Is there any way,that a project can be built, compiled and linked from command line without resorting to the IDE? sure, that is the only way I operate, I can not use the IDE for two reasons 1) it will not integrate with a decent editor and 2) it will not build 47 versions of the same project. If you want an example batchfile, here it is Erik
@ECHO OFF REM 'nod' (default) to kill list and obj in b dir, 'dls' to bring it out cd ..\bupl del *.a51 del *.c del *.h if "%MUSDEB%"=="0" goto setmdb goto setno :setmdb @ECHO ON REM ********** DEBUG INFO IN FILE ********** @ECHO OFF copy ..\supl\cond\dbgflad.h dbgflga.inc >..\trash\trashbin copy ..\supl\cond\dbgflcd.h debflgc.h >..\trash\trashbin goto setdn :setno copy ..\supl\cond\dbgflan.h dbgflga.inc >..\trash\trashbin copy ..\supl\cond\dbgflcn.h debflgc.h >..\trash\trashbin :setdn copy ..\supl\*.h *.* >..\trash\trashbin copy ..\supl\*.c *.* >..\trash\trashbin copy ..\supl\*.a51 *.* >..\trash\trashbin xcopy C:\ams\*.h *.* >..\trash\trashbin rem hello there copy C:\aglobal\keil.h *.* >..\trash\trashbin copy C:\aglobal\cyf120.h *.* >..\trash\trashbin copy C:\aglobal\cyf120.inc *.* >..\trash\trashbin copy C:\aglobal\c51s.lib *.* >..\trash\trashbin if not exist cmplst.txt goto nocmdl del cmplst.txt :nocmdl call batasm UPstart call batasm UPxdata call batcmp UPmain call batcmp UPccode call batcmp UPisr if not exist cmplst.txt goto naser echo on REM ///////////////////////////////// REM ///////// COMPILE ERRORS //////// REM ///////////////////////////////// type cmplst.txt | more REM saved in file cmplst.txt pause @ECHO OFF :naser if not exist UP.lib goto usliex del UP.lib :usliex c:\tools\keil\c51\bin\lib51 c UP.lib >..\trash\trashbin c:\tools\keil\c51\bin\lib51 a UPccode.obj to UP.lib >..\trash\trashbin c:\tools\keil\c51\bin\bl51 UPstart.obj, UPisr.obj, UPmain.obj, UPxdata.obj, UP.lib, c51s.lib TO upl.omf RS(256) IX >protl.log IF errorlevel=2 GOTO tell goto show :tell echo on REM //////////////////////////////////////// REM //////////// linker ERRORS ///////////// REM //////////////////////////////////////// REM errors and warnings are in protl.log REM link map is in upl.m51 pause :show echo on type protl.log | more pause if "%NODEL%"=="0" goto nodel del *.lst del *.obj del *.lib del *.txt del *.log :nodel :hexc1 c:\tools\keil\c51\bin\oh51 upl.omf HEXFILE (..\hex\upload.hex) echo on fc ..\hex\upload.hex ..\mtc\upload.hex goto hexit :setdbw :dexc1 c:\tools\keil\c51\bin\oh51 as.omf HEXFILE (..\hex\%MUSTYP%%MUSMFG%%MUSWDT%%MUSHGT%DBG.hex) echo on fc ..\hex\%MUSTYP%%MUSMFG%%MUSWDT%%MUSHGT%DBG.hex ..\mtc\%MUSTYP%%MUSMFG%%MUSWDT%%MUSHGT%DBG.hex goto hexit :hexit pause type x.log goto getout :wdtmiss echo on rem ERROR !!!!!!!!wdt!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! goto getout :hgtmiss echo on rem ERROR !!!!!!!hgt!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! :getout cd ..\mk
Hello Erik, LoL :)...guess u rephrased it perfectly... Well Erik, I came up with a model batch file which calls for C51.exe (end product: *.obj files) , BL51.exe (end product : *.omf file) and OH51.exe (end product : *.hex file). I am able to successfully generate, the hex file on my PC, where a full version of KEIL (of course :) with the security key and all) has been installed. I tried my hands at migrating to a PC without KEIL installation. Copying with me, the needed *.exe and *.dll files. It asked me for the sentinel driver installation. I went ahead with it. And was forced to use the dongle (why cant life be fair at times) But say I sit at a comp without a dongle then there is no way that I can work :( Say I want to work by simply copying a couple of exe, dll and lib files and without having to worry about a dongle....anyway outta it :) :) I was able to understand what you do in your batch, but only to an extent.....beyond that I am lost :) Please do send across your feedback. Best regards, Kathy.
"And was forced to use the dongle (why cant life be fair at times)" What's unfair about that? You have purchased a licence to use a single copy of the Keil tools - the dongle is just enforcing the terms of that licence! In many ways, a dongle is a much fairer way of enforcing the licence terms - it allows you to install the software on every single PC in your facility, if you want, but only actually use the number of copies that you've paid for! If you want more copies of the tools, you must buy more licences! You can see the various Keil product offerings here: http://www.keil.com/c51/ You need to speak to your local Keil distributor - you never know, they might be open to negotiate some sort of a deal for you...?
"The idea is that someone without a knowledge of the IDE, should simply be able to compile the project with a given set of instructions" How often would you actually need to do that? Usually, building would be done by the development team. When all the necessary validation & approval has been done according to your processes, the development team would do a final "release" build. The final "release" build would create the master HEX file, or master device, or whatever to be delivered to production. Production would then just use the master HEX file, device, or whatever. Why would you need anyone else to rebuild the project from source?
"The idea is that someone without a knowledge of the IDE, should simply be able to compile the project with a given set of instructions" How often would you actually need to do that? I, actually, had a case where that might be applicable. I did some code for a friend far away where 7 constants need be entered (other means give huge cost) and the code compiled and linked. It would be a great help if he could enter these 7 values in the source and compile/link. Alas, the way it works, that is not possible, so I do it when needed, thanks to e-mail attachments. Erik
I am able to successfully generate, the hex file on my PC, where a full version of KEIL (of course :) But say I sit at a comp without a dongle then there is no way that I can work :( my mother had a saying "what you do not have in your head, you need in your feet". If you forgot to bring tyhe dongle, go home and get it. Erik