Use Keil uVision5 for LPC2148 ARM7 Microcontroller

In this tutorial, we will look at how to use Keil uVision5 for LPC2148 ARM7 Microcontroller. This tutorial is requested by one of our fellow readers. There are many folks want to migrate from uVision4 to Keil uVision5. It’s been years now, Keil-MDK5 has been released. I remember when I tried my hands first time with Keil uVision5. It took me for a while to figure out why LPC2148 is not listed in “select device for target” menu while creating new project. I am sure this post will answer all of your questions regarding Keil-MDK5.

Also, we will Create Fresh New Project using Keil uVision5 for LPC2148 ARM7 Microcontroller. Anyways it’s very simple we only have to follow few tricky steps while installing Keil uVision5 for LPC2148 ARM7 Microcontroller. If you’re already using Keil uVision4 then you might be familiar with installation of Keil uVision5 which is similar. For first time users, we need to download setup Click Here. Make sure to fill registration form while downloading setup file. All the information such as name and email address you may need to provide while using Keil uVision5 for first time. Let’s download Keil uVision5.

Get_Keil_uvision5_for_ARM_Microcontrollers
Get Keil uvision5 For ARM Microcontrollers

Once we fill registration form we will be directed to following page. Just click on .EXE file and download setup.

Download_Keil_uVision5_Setup
Download Keil uVision5 Setup
Once we’re ready with download. We need to install Keil uVision5. After installation of Keil uVision5 here comes tricky part. At this point if we try to create fresh new project using Keil uVision5 for LPC2148 ARM7 Microcontroller. We would not find LPC2148 or NXP into device list. To get list of all ARM7 microcontroller chips into device list we need to install software packs which will support LPC2148 ARM7 Microcontroller. Although in uVision4 we need not to do this but in Keil uVision5 we must install software packs prior to create project for our target chip. Here is the link to get software packs: http://www2.keil.com/mdk5/legacy
download_software_packs_for_ARM7_Microcontrollers
Download Ssoftware Packs for ARM7 Microcontrollers

I believe at this point we all have successfully installed Keil uVision5 and legacy software packs for ARM7 Microcontrollers.

Check out this ARM7 LPC2148 Development Kit I found on Amazon

Create Project using Keil uVision5 for LPC2148 ARM7 Microcontroller:

  • Create a folder on desktop
  • Open Keil uVision5 Application
  • Go to Project –> New uVision Project
create_project_using_keil_uVision5
Create Project using Keil uVision5
  • Give Name to Project e.g. “test” –> Save (Browse this project file into newly created folder on desktop).
name_keil_uVision5_project
Name Keil uVision5 Project
  • We will get popup box Select Device for Target “Target1”. There will be a drop down menu where we have to choose Legacy Device Database [no RTE]. We notice that extended list of device families will be added into left pane of popup box.
select_legacy_device_in target_options
Select Legacy Device in Target Options
  • Just search for our target chip in search box, which is NXP LPC2148 in this case. Then Select LPC2148 from the list and hit on OK.
Keil uVision5 for LPC2148 ARM7 Microcontroller
Select LPC2148 in Keil uVision5
  • Next step is to add startup file, simply hit on Yes. Workplace is ready to write code for application development.
add_startup_file_in_uVision5
Add Startup File in uVision5
  • Now we need to add c file to write simple application. Go to File –> New –> We will get text file Save As this text file as main.c.
Keil_uVision4_Project_pane
Keil uVision4 Project Pane
  • At this point we need to add this main.c file to our project tree. Right click on Target1 and click on Manage Project Items…
manage project items_in_uvision5
Manage Project Items in uVision5
  • On a dialog box hit on Add Files and select main.c file and hit on Add button. Just click close and then hit on Ok. At this point main.c file is listed into source tree of project pane. Now we’re ready to write code.
add_c_file_to_uVision5_project
Add C File to uVision5 Project
  • Once we build our project, we will generate .HEX file to load onto LPC2148 ARM7 Microcontroller.
Write_and_build_uVision5_Project
Write and Build uVision5 Project
  • To find HEX file, we need to look into Project Folder –> Objects folder –> .HEX file.
output_hex_file_in_keil_uVision5
Output HEX File in Keil uVision5

We hope this tutorial will guide you through how to create project using Keil uVision5 for LPC2148 ARM7 Microcontroller. The procedure remains same even for other Microcontroller architectures such as ARM7, ARM9, and Cortex-R. Just make sure that you have installed proper legacy software packs for your target device. If in case you have any question regarding Keil uVision5. Please feel free to post into comment section. Thank You!!!

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

12 comments

  1. sir i want to simulate the simple codes but on proteus lpc2148 is not available….pls suggest me wat should i do?

    • hey
      use lpc2138 for simulating in proteus as there is small differences between lpc2138 and lpc2148 from our practical point of view.

      follow this minor changes
      TRY to include header 21xx.h instead of 214x

      in proteus
      pin 57,49,23 must be given +3.3V
      pin 59,6 must be given 0V.
      it really works.Try it

    • Is this Surbhi Patel?

  2. Pls let us knw to write codes for lpc 2148

  3. sir we have done the entire coding of lpc 2148 using keil 5 and while creating the hex file for this and whle we burn it in controller the code is not dumped into the controller and the total problem is with the creation of hex file can u please help me

    • Hi Raj,

      I think you have to check some setting before you hit build button. Please go to Options for target –> Linker –> Check Use Memory Layout from Target Dialog box and try to Rebuild. This can happen because of memory mismatch so when we dump HEX file it won’t work. I hope with this setting your HEX file will work on real hardware.

      If problem continues provide me more details on issue….Good Luck !!!!

  4. sir i m not getting LPC2148 in NXP in my KEI software while creating new project. What i should do??

  5. Cannot thank you enough! i was banging my head for not finding lpc2138

  6. hi, I don’t get the option of “Legacy Device Database [no RTE]” in the drop down menu, I have only one and that is “Software Packs”. Help me i want to compile program for lpc2148, I tried using keil mdk3 but it gives error message of expiration. Or tell me how to add devices to keil mdk5.

  7. hello please someone should help out on how to write the code for lpc2148 using gsm. thanks

  8. vijendrakumar Y

    Thanks. This page is very useful

Leave a Reply

Your email address will not be published. Required fields are marked *

Login

Register | Lost your password?