LPC2148 – FreeRTOS Porting with Keil IDE

Hi all…. Today we are going to see FreeRTOS Porting for LPC2148 Using Keil. 

Requirement

1. Keil IDE for ARM            –    Download Here

2. FreeRTOS exe File          –   Download Here

3. FreeRTOSConfig.h         –    Download Here

4. Startup.s                           –    Download Here

FreeRTOS Porting for LPC2148 Using Keil

I assumed that you already installed Keil IDE for ARM and you know how to create a project in that. If you dont know please See Here. Now we will start. 

Initial Steps(Installing Time)

NOTE : This two steps are required for First time (Installation time). Not required for each time project creating.

1. Extract the FreeRTOS exe to C:\Keil

2. Then paste the FreeRTOSConfig.h file in include folder of source in FreeRTOS

Again i’m reiterating these two steps only for Installation time. No need to copy every time.

Create the project(Each time):

1. Open keil4uvision and create new project. If you don’t know how to create project Please go through Here.

2. click Project and Options for Target ‘Target 1’.

3.  Click C/C++

4. Click on Define and type the context below.

ARM7_LPC21xx_KEIL_RVDS KEIL_THUMB_INTERWORK

5. Then in Include paths, add paths as like below.

1. C:\Keil\FreeRTOS_V9.0.0rc2\FreeRTOS\Demo\Common\include

2. C:\Keil\FreeRTOS_V9.0.0rc2\FreeRTOS\Source\portable\RVDS\ARM7_LPC21xx

3. C:\Keil\FreeRTOS_V9.0.0rc2\FreeRTOS\Source\include

4. . ( add this path as dot in include path which indicates the current directory)

6. Then click Asm then paste below line in include paths.

C:\Keil\FreeRTOS_V9.0.0rc2\FreeRTOS\Source\portable\RVDS\ARM7_LPC21xx

7. Then add following files to the project from C:\Keil\FreeRTOS_V9.0.0rc2\FreeRTOS\Source

1. Task.c
2. List.c
3. Queue.c

8. Then add following files to the project from  C:\keil\FreeRTOS_V9.0.0rc2\FreeRTOS\Source\portable\RVDS\ARM7_LPC21xx

1. Port.c
2. portASM.S (this file appears only when we select all files in file type).

9.  Then add following file from C:\keil\FreeRTOS\FreeRTOS_V9.0.0rc2\FreeRtos\portable\memmang

1. heap_2.c

10. Final step. Copy the whole content in downloaded startup.s file  and paste it into the startup file which is attached in the project.

The thing is you should do this for every time you are creating new project. when you are doing lot of projects you will fed up with this. But what to do? We have to do this. Because we are Engineers 😆 If you have any doubt please comment below.

0 0 vote
Article Rating
Subscribe
Notify of
guest

This site uses Akismet to reduce spam. Learn how your comment data is processed.

7 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
vishnu
July 24, 2017 5:01 AM

Hi, thank you for your tutorial,i have a doubt in step 10…do i have to replace the content of startup.s with your startup.s file….?

Anonymous
Anonymous
February 27, 2018 5:09 AM

while simulating Task creation code 7 times its executing properly after that error is through s like(Data Abort: ARM Instruction at 00000028H, Memory Access at 1020F64CH) can u please tell me the reason.

santhoshkumar M
santhoshkumar M
February 27, 2018 5:13 AM

I flashed LED & LCD Task code to controller, no output ?? tq in advance

Rahman
Rahman
May 2, 2020 7:14 PM

Well explained. Thanks.

7
0
Would love your thoughts, please comment.x
()
x
%d bloggers like this: