If you are new to Keil uVision IDE, you may have noticed that whether you use ASM code or C code, the HEX files are not generated when you compile your programs. This is because Keil does not generate the HEX file by default. In case you are wondering what HEX file is, HEX file is the output of Keil that is generated after compilation and linking of your application and this is the file that is 'burned' or programmed into your microcontroller or microprocessor.
So, to enable generation of the HEX file follow these steps:
Step 1) Create the Keil project by adding your ASM and/or C source files
Step 2) Open the project options. Use any of the three methods given below:
- Click on Project->Options for Target (Fig. 1)
OR- Right-click on the Target 1 in the project window on the left side of the IDE (Fig. 2)
OR- Simply press ALT-F7 to open the project options:
Step 4) Now if you build your target, you will see the associated HEX file in the output directory.
IMPORTANT - You must repeat this process for each new project that you create.