In previous article we have described creation of project. In present article we will discuss project setting. Main setting is processor, CPU clock, Generation of List file (output from compiler), Map file (Output of linker) etc. All these options are described in keil documents. Here we will see how to set option for generation of hex file.
Now we have to add this file in Project, For that Right Click on Source Group 1 then Add Files to group Source Group and Open folder Keil Test. You will see Craft.C File.
Click on Craft.C and Add.
After adding of source file in project, we have to set the project option to generation of HEX file. Now Right Click on Target and Click on Options for Target 1
Option for Target window will open. Here click on Output tab and check on box Create HEX Files.Then Click OK.
Now before proceeding further just Save Files.
Then Click on Build Options. In bottom site you will see
MY PROJECT-0 Error(s),Warning(s)
After that you can see that hex file will be created. This hex file can be downloaded to target board. For that we can use programmer. Or if processor has support for ISP, then this can be downloaded via serial port. For example if you will use P89V51RD2 processor from NXP, then with the help of flash magic tool you can download hex file.