Search 8052.com...


User (Email)

Password

Remember Logon

Forgot password?
Create Account


8052.com Online Store
Back to 8052.com Main Page



























My compile Batch, do all with a single key click

Easy Compile with Keil

Introduction:

For daily usage I have seen, that professional software developer aviod using an IDE. Since it was dangerous and you have no control how the complete compile and linking process was done. So any profesional developer use always a MAKE tool and a script, which tell 100%exactly , how compiling and linking must be done. And thus only a make tool can exactly rebuild the project on a later time.

In opposition its very complicated or impossible to rebuild all more or less hidden control switches of an IDE. Furthermore an IDE was seen as slow working in comparison to command line tools like MAKE. And if you want to catch an error and insert some debug functions into the source, then every second count, which are wasted by longer doing the same things again  and again.

I know, that such MAKE tools are useful for all professional developers, but I have seen, that Keil add an AMAKE tool, which need no longer to write a script file to control the make process. So this AMAKE act like a full automatic MAKE.

To make it most usable I wrote a batch file, which do all things furthermore full automatically. So the only action on starting a  new project was to create a new directory and place all source files which  I want to reuse and also the source files, which I have created new in this directory. Then only by typing "C" and ENTER the rest was done fully automatocally.

If new source files must be added, then typing "C N" causes, that the AMAKE check all dependencies completely new and add this new sorce file. Otherwise on typing only "C" only the previous dependencies are checked, which contain not this new created source file.

Working:

In use a relative old version of the Keil, but I hope, also newer versions support this fantastic feature. Following the version numbers:

  • Assembler: V4.6
  • Compiler: V5.02
  • Linker: V3.52
  • Amake: V1.3

The working was quite simple:
At first all *.C51 files are compiled in the order, on which they are inserted in the project directory.
Then all *.A51 files are assembled. So e.g. on using inline assembler on C sources they are assembled, if the assembler output file was named *.A51. Aditional the STARTUP.A51 file was assembled..
Then all created object files are linked togehter. Additional linker control arguments can be placed in a file named "LINK.OPT". I use this e.g. to place a description text exact on the address 0x0100. So on viewing the HEX file I can see, which gadget was it and which version number on looking on the text at 0x0100.
Then the HEX file was generated and if exist any file which was named "PROGRAM.BAT" or "DOWNLOAD.BAT", the HEX file was sent to this batch to automatically program the target.

My powerful C.BAT:

Finally now the magic C.BAT, which should do furthermore all what you need on a single key click only. No longer thousands of menus and submenus of an IDE must be configured on every new project.


(C) Copyright 1997 - 2008 by Vault Information Services LLC. All Rights Reserved.
Information provided "as-is" without warranty. Please see details.
Contact us for usage and copy permission.