LPC1768: Keil Project For Hex File
Objective
In this tutorial we will see how to setup a keil project to generate .hex file for LPC1768
Open the Keil software and select the New Microvision project from Project Menu as shown below.
Browse to your project folder and provide the project name and click on save.
Once the project is saved a new pop up “Select Device for Target” opens, Select the controller(NXP:LPC1768) and click on OK.
Select the controller(NXP:LPC1768) and click on OK.
As LPC1768 needs the startup code, click on Yes option to include the LPC17xx Startup file.
Create a new file to write the program.
Type the code or Copy paste the below code snippet.
After typing the code save the file as main.c.
Add the recently saved file to the project
.
Add the main.c along with system_LPC17xx.c.
Build the project and fix the compiler errors/warnings if any.
Code is compiled with nor errors. The .hex file is still not generated.
Click on Target Options to select the option for generating .hex file.
Set IROM1 start address as 0x0000.
Enable the option to generate the .hex file