This article is a continuation of the series of tutorials on the LPC2148 Microcontroller (ARM7). The aim of this series is to provide easy and practical examples that anyone can understand. In the previous tutorial, we have seen the introduction of the LPC2148 (ARM7). Now we are going to see how to install Keil for the LPC2148 ARM controller. Let’s Start Setting up Keil for LPC2148.
Setting up Keil for LPC2148
1. First download the Keil IDE (MDK- ARM) from Here. Then start to install that by double-clicking that downloaded application.
2. Then allow to change in the computer by clicking YES.
3. Then click Next.
4. After that check that box which is red-colored to agree on the terms and conditions. Then click Next.
5. Then leave the Destination folder as it is. Then click Next.
6. After that Fill in your name and email. Then click Next.
7. Let’s wait until it completes.
8. Then click Next.
9. Check that Launch Driver Installation then click finish.
10. Finally Install that Driver.
11. Here we go. Our Keil IDE for ARM has got installed in our system.
So successfully we have installed the Keil IDE for ARM development. Then we have to create the project. Now we can see how to create the project.
1.Open the application which we were installed previously by double click.
2. After opening just click the project. That I’ve mentioned with the red mark.
3. Create the folder (directory) where ever you want to save the project. Then give the project name. In my case, I gave
first_pro as my project name. You can give whatever name you want. Then click the save button.
4. After saving that project this window will pop up. So here we need to select our microcontroller. Our case is LPC2148. Just scroll down and find NXP.
5. Double click the NXP. Then again scroll until you found LPC2148 then click Ok.
6. Click Yes. It will add the startup code to the project.
7. So until now we have created the project for the ARM microcontroller. The project has been created. Now we need to create the file to edit our code. Click File then click New.
8. We created a file to edit our code. Now we are going to save our code. Click File and Save.
9. Give the code name. Here I’m giving just
code.c. You can give whatever you want. But you should mention with .c. Because this is C language code (Embedded C).
10. So now our project name is first_pro and the code name is
code.c. As of now, we have created projects and code. But now we have to put the code inside the project. For that double click the Source Group 1.
11. It will pop up in your project folder. Find your code. In our case, we can see code.c there. So click code and click Add.
12. See there our code is added into the project (Source Group1).
13. In that file you can edit your code. This is a demo. So I entered only the main function and header file. Nothing in that code. So it won’t do anything in the LPC2148. In this code section, you have to write your project code based on the application you need.
14. After editing your code we have to set the clock frequency. So click Project and Options for Target ‘Target 1’.
15. It will pop up one window. After that click Output. There find Create HEX file. Then check that box. Then click Ok. Why do we need to select this Create HEX file? We can’t flash our code or project into the LPC2148 microcontroller. We have to flash the hex file. If we enable this we can get the hex file whenever we build our project.
16. Now I’m going to build my project. The shortcut is F7.
17. After built you can see the error and warnings at the bottom of the window.
That’s all guys. We have created the project for LPC2148. From now on we can develop our projects. See you all in our next post.
You can also read the below tutorials.
Embedded Software | Firmware | Linux Devic Deriver | RTOS