Hi .. Now we are going to see how to install Keil for LPC2148 ARM controller. Lets 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 computer by clicking YES.
3. Then click Next.
4. After that check that box which is in red colored for agree the terms and condition. Then click Next.
5. Then leave the Destination folder as it is. Then click Next.
6. After that Fill 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.
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 red mark.
3. Create the folder (directory) where ever you want to save the project. Then give project name. In my case i gave first_pro as my project name. You can give whatever name you want. Then click 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 ARM microcontroller. Project has been Created. Now we need to create the file for edit our code. Click File then click New.
8. We created file for 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 code name is code.c. As of now we have created project and code. But now we have to put the code inside into 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 demo. So i entered only main function and header file. Nothing in that code. So it wont do anything in the LPC2148. In this code section you have to write your project code based on your application you need.
14. After editing your code we have to set the clock frequency. So click Project and Options for Targer ‘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 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. Shortcut is F7.
17. After built you can see the error and warnings in the bottom of the window.
Thats all guys. We were created the project for LPC2148. From now we can develop our projects. See you all on our next post. If you have any doubt please ask us by commenting below.