Create Project using Keil uVision4 for LPC1768 Microcontroller

In this tutorial, I am going to show you how to create project using Keil uVision4 for LPC1768 Microcontroller. I believe you have already installed Keil µVision and Co-MDK Plug-in + CoLinkEx Drivers required for CoLinkEx programming adapter. If you are not yet then please follow previous tutorial.

This is probably first tutorial in this series where we’ll create fresh new project from scratch and program NXP LPC1768 Microcontroller. Lets get start to create new µVision project to blink LED by adding simple delay. First create a test folder on desktop to manage your project and related files. There would be several files to take care during whole procedure. Copy system_LPC17xx.c and main.c file into test folder. I will explain to you later on about what are those files?

Launch/Open “Keil µVision4” default workplace and then go to Project –> “New µVision Project and then browse your project into test folder on the desktop and give it name as blinky  and hit on save.

Create New µVision Project
Give Name to µVision Project

At this stage we get pop-up box onto the screen. There we have to select “LPC1768” from NXP and then hit on “ok”

Select Type of Microcontoller in uVision
Select Type of Microcontoller in uVision

Now it ask you to copy Startup_LPC1768xx.s and hit on Yes”

Add Startup File to uVision Project

Now right click on Target 1 in project pane and click on Manage Project items…

Manage File in uVision4 Project

Here click on Add Files… and select system_LPC17xx.c and main.c file. Now we just need to hit on “Add” button and then Close that dialog box and hit on “Ok”

Add System File and Source Code

At this point we need to configure programming adapter CoLinkEx. So click on Options for Target on menu bar and then go to Debug” –> select “CooCox Debugger from drop down menu.

Setup CooCox Programmer to uVision4

then hit on Setting –> choose SYSRESETREQ from drop down menu –> hit on Ok

Set Frequency and Reset Parameter

Now go to “Utilities” –> uncheck “Use Debug Driver” and then choose CooCox Debugger” from drop down menu.

Set Utility Option for LPC1768 Microcontroller

Here again we have to go to “Setting” –> click on “Add” –> and choose “LPC17xx IAP 512kB Flash” from list and hit on “ok”

Set Flash Memory for LPC1768 Microcontroller

Finally we have done with all house keeping stuff for our project and the only thing left is to build and load output file into microcontroller. So after returning back to our workplace. Hit on Build icon on main menu and once we build successfully without any error. Then simply hit on Load”. And that’s it…!!!!

Build and Load file into LPC1768 Microcontroller

Now we can see that LED connected to P1.29 is blinking with delay. Download complete project by simply Click Here. I think this is enough for today. In next tutorial we would discuss more about program i.e main.c file and also will have little fun with setting different delay. I hope you will find this tutorial educational. I wish you great time and see you in next tutorial.

Get Free Courses & Webinars
You'll receive only high quality learning material, tips & tricks
I agree to have my personal information transfered to MailChimp ( more information )
We respect your privacy

About Umesh Lokhande

Umesh Lokhande holds a Master degree in Scientific Instrumentation from University of Applied Sciences Jena, Germany. and has previously worked at Orbotech, Alere Technologies etc. Umesh is also a founder and first author of BINARYUPDATES.COM


Register | Lost your password?